I do lot of bash scripting under MacOS and usually, if I need administration privileges, I run sudo from my terminal. Anyway, sometimes you need to let non-technical users run these scripts and I'm sure that they wouldn't be happy to open terminal and run your script with sudo command …