I don't know Lua by any stretch of your imagination. I'm just a programmer. I went and read up on the syntax as well and started from there....
If you have a programmable keyboard, like the Razer ones or even a Speed Pad, you can setup a repeatable macro to just spam one key until you stop it. Works great. lol All you have to do is stay on the boss.