Lua Source Modified

more logic added
a little more to finish