Converted script to Lua.