I don't know LUA so I can't comment on that (really ought to look it up but things just keep happening...) - how do you tell the game to use new functions you add? I'm guessing you just add calls from other scripts?
Not much of a technical guy, I'm just a 2-bit musician