Unfortunately, everyone can read it just looking at the source code of the web page your script is running into.
There are two general ways to protect the intellectual property,
legally or technically. Legally means getting copyrights or signing legal contracts against creating duplicates etc.
Obfuscation is the practice of methodically going through straight-forward source code, renaming variables, transforming and rearranging code, hiding the original algorithm, data structures or the logic of the code, all with the goal of making it virtually impossible to read and understand from prying eyes but working the same way.
If you are releasing valuable software and you are not distributing the source code, obfuscation should probably be part of your application development process.
The goal of obfuscation is to make a program 'unintelligible' without altering its functionality, thus making it extremely difficult for a hacker, cracker or competitor to reverse-engineer your application. Obfuscation is often confused with simple method renaming techniques and basic string obfuscation technologies, which can be quickly broken and easily reversed.
Name obfuscation is the process of replacing the identifiers with meaningless sequences of characters. (Of course, a name obfuscator must process the entire application to ensure consistency of name changes across all files.)
It is the process to change the control flow in a software application. The changed control flow must lead to the same results as the initial one, but produces spaghetti logic that can be very difficult for a cracker to analyze.
Inserts code that is executed when the program is run but does not affect the semantics of the program, making any disassembled code more difficult to analyze.
Crackers will frequently search for specific strings in your code to locate strategic logic. String Encryption makes this much more difficult to do, because the attacker's search will come up empty. The original string is nowhere to be found in the code. Only its encrypted version is present.
Lock your code based on IP address, domain name and much more. Create trial versions with time limiting and many other features.