Simulation Rotation Scripts in LUA

Looking for an example of a script in LUA programming language for use in World of Warcraft.

I want to convert Mr. Robot simulation scripts into LUA. I have a Logitech G910 keyboard, which uses LUA for button scripts. Pretty sure LUA takes IF, AND, OR etc. conditional statements, as in the rotation scripts. LUA is my 1st choice because, far as I know, in-game WoW macros (including Gnome Sequencer) cannot use those conditional script statements.

If there is way, without using LUA, to use the Mr. Robot rotation scripts (including the conditional statements) in WoW, I’d be happy with that alternative.