so i should start with i dont know how to code in lua but know javascript and dont know where to learn the kind of lua that tpt uses so i tried copying an elements cpp file and changing the name to something else and changing every instance of the name or id in the file to an instance of that name
1) Lua modding is easier than C++ modding.
2) Learn Lua, at least the basics.
3) The wiki has a tutorial on how to use Lua in order to do stuff in TPT. It's here: https://powdertoy.co.uk/Wiki/W/Powder_Toy_Lua_API.html
4) The script manager will really help you with getting Lua scripts changing TPT stuff. It's here: https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=19400