Is there a way to change a script in-game without using script.Source

I’m trying to make a game where people test code but they pasts their code in a gui. script.Source doesn’t work though are there any methods to do this. Basically where a script = a textbox’s text

I don’t think the script would function correctly if it were changed after it was executed. I think you should delete the script and then try making the new one with the source/