Is there anyway you can encrypt/code a pice of script so that it cant be read or modified?

I can make the script work only if a certain IP runs it, but if someone else who has basic knowledge of scripting modifies it to his IP, it will work.

Can I prevent the script from being modified?