Run Lines of Code Created In-Game

You know if you open up the developer console, click server and you see there’s a command bar? I want to know how it runs it’s lines of code it gets given. Because it seems to work the exact same as a script but I can’t find anyone on the internet who knows how it runs them. Does anyone know how this works?

You could try vLua to do that.

The code in the execute bar will go through Roblox’s internal conversion and simply do the same as if it were a script. If you want to recreate one, you’ll have to use loadstring. However, this will need to be sandboxed and done well otherwise your game can be compromised.

Essentially, if you want code to be run here you can write it in studio then copy and paste it into the command bar. It is essentially then just adding it to a script in some regards, this can be especially useful when you just need to make minor editations to your game whilst players are actively in it (for example I have deleted broken trees before).