Switching from JS to Lua because JSExport is so broken it's not even funny.