Interesting. Very interesting indeed.
But why the hell are you posting it UNFINISHED?
When you're done, just put the script in the damned LUA script section in Files. pl0x...
you really should keep in mind that everyone is able to type in !xxx... Unless you can devise something to differentiate between different users with regards to privileges, I doubt this will do anything to help.