@Hasthohaha

you could create an Apple shortcut which starts your script without go via edit/run

you could start your scripts with

import os import sys os.chmod(sys.argv[0],0o100444) # set script as readonly

to make it as readonly, so your friend would not be able to change your code. Of course, he could always go in command/console mode and reset the flag.