So I was reading the Wiki on "LoadStrings" and it says you can convert a string value into a LUA code. So what I wanted to do was make a TextBox where the Player can write a LUA script in there, and make a LoadString script run it. But I don't know how to... And the script examples on the Wiki give me a error.
Enable loadstring from the ServerScriptService, and call something like this.
local MyCodeString = [[ for i=1,10 do print(i) end ]] loadstring(MyCodeString)()
Just a heads up, Loadstring makes your place EXTREMELY vulnerable to hackers. Suggest to NOT USE LOADSTRING. (Atleast not in published work.)