Made LuaScript more flexible