I answer on your message:
1. Compile your .py as .pyc to avoid editing, but easy be decompiled.
As you say, it is easy to decompile the code. Simply by changing back .pyc by .py, so this solution does not work for me.
2. How many lines is there in your script? Import the script after optimizing your code, deleting all of unneeded snippet, space lines and comments , then test if you can wait for it's response not smashing your mouse.
The code has 7954 lines. I have deleted the comments, spaces, etc. and I have managed to get the window that is launched when the tool runs, after 1 minute appears. But the parameters and the tool itself take a long time to complete the process.
3. Rewrite it in AO.
Do you mean Arc Objects? I had thought about creating an add-in...
4. Tool license, It's the most effective protection.
I think that although I establish a control license, the user could take the code, which is what I try to avoid.
I thank you so much for your approach and that you dedicate your time in answering me. I do not know if I will achieve my objective, but your ideas help me a lot. Thanks again.