I was under the impression that Lua was soon to be phased out, into non-standard in future versions. A Lua runtime package will need to be installed at that time.
See - and perhaps inquire here: LuCI rewrite in ucode - testers wanted
So if you write such a script, you may need to consider the programming language employed.