tell application "Finder" to move tempfile to trash user name "namehere" password "pinhere" with administrator privileges --this file requires admin rights to move it
This works:
do shell script "killall appname" user name "namehere" password "pinhere" with administrator privileges
The documentation only lists “with administrator privileges” as being a parameter for “do shell script”. If you are interested in the hows and whys of this:
Short version: AppleScript has no wiring to elevate the privileges of a running process, nor does it have the ability to launch a process with superuser privileges outside of invoking privileged shell commands.