I'm doing a basic script executor game and I don't want players abusing with "while true do" or "kick()". So i don't know how I can do this, but is there any feature that can detect words in the textlabel and remove them or warn the player? I don't know how I can structure this script nor i know anything to do such.
Heres basically everything about strings, I suggest reading it!
To detect words inside a string you can use:
string.find(TextLabel.Text, "kick()")
This will return the position of the second string inside the first if the first string contains it. You can use it in an if statement like this:
if string.find(TextLabel.Text, "kick()") then ... end
To erase a word, you can use:
string.gsub(TextLabel.Text, "kick()", "")
This will replace every "second string" inside the first string with "third-string", so if you leave the third empty it will erase it. It will also return how many times it replace the word.
Hope it helps