https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=23010 If you read what I said before you would have gone to youtube and looked for tutorials, or gone to a library for a book on How to Code in Lua. Although these books are maybe obsolete by ten years or five, it could help you out. https://youtu.be/iMacxZQMPXs
I could help you with modding in c++ but I barely ever use lua and have never touched TPT lua scripting
I just linked him to a video because it might give him the jest of lua, but your link is better.