/moved to Minecraft Help
No. The simple answer is no. The advanced answer is no. The intermediate answer is no.
It's not possible - just like Force OP or whatever it's called now.
Either way, it wouldn't be a script, it'd be a hack. A script is like AutoIT, or something like that.