When you make a script, you often need the lines that is at the top of almost every script.
These, add these at the very top of the script, those are files that needs to be in a script to get a script working, depending of what kind of script it is. So above
Note: I am not saying that this is the reason why it doesn't work, it is just an idea because in almost every script, these files are needed to get a script to work.