Port gdi04c to New Lua