The Lua code behind The Puzzle event.