Create main.lua

Implementation in Lua