@Jibb3N
I would strongly suggest looking up some of the tutorials and read the documentation on using scripts for a basic understanding. Breaking the barrier of total obliviousness to scripting to basic understanding of structure (I feel) is very important to anyone who is going to even look at (much less work with) code. Also, since this script has to do with animation and input, I suggest going to the scripting reference section and look up part of the command you’re having problems with. Reverse engineer the scripts generously supplied by the developers and find out where pieces of the code is located.
-S