To answer the question - you need to fix the error whether that is buildscript or source.
Another option is to contact the maintainer of the script (use the AUR page for the script)
All systems has pamac installed - but if you need yay, then it is in the repo
sudo pacman -Syu yay
Please inform yourself, see → [Need-To-Know] About Manjaro and AUR - and be sure to switch to unstable for best results with AUR.
sudo pacman-mirrors --api --set-branch --unstable
sudo pacman -Syu