Port gdi02 to New Lua