Hi what you need is something liek ioncube encoder. They allow you to encode your script so that only the ioncube loaders will run it. code is encrypted to prevent stealing.
Ioncube offer an encryption service based on number of lines of code so keeps cost low.