You can't encrypt the source because you'd also have to dstribute the decryption key so the program will run. You can obfuscate your source but that won't prevent people from
it. You could compile your source but that won't prevent people from
it. You'll need to decide what an acceptable levels of veils are required. Nothing is going to protect you from someone who wants to modify their source but you can at least force them to work a few minutes on it.