The problem with encrypting the script is that you need to unencrypt it, in which case you need the password somewhere. Unless the encrypted file contains the password itself of course, hidden within in it using an algorithm that only the developers are aware of.
You wouldn't want the decryption to decrypt the entire file, otherwise a simple memory dump would show the original text. That means that you would be constantly reparsing the encrypted file with the associated processing overhead.

If the concern is obfuscating passwords used in logon scripts, wouldn't passing them as command line parameters in the logon script definition hide them better? Then they are never in the script itself and the only people who can see them are people with access to the user database.

As for hiding the working of your script, an option to compile to pseudo-code, or byte-code would be interesting. It would hide the workings from a casual browser, and speed up the run-time enormously. Of course on the downside a de-compiler for byte-code is very simple to write.