This may seem like an awkward or silly question... but hear me out. I'm going to make a plug-in that allows contributers to a game help "code" it. That is, they can press easy user-friendly buttons to build each part of the code within the limitations I set.
Think of it like this: You have two objects in two defined positions. A person needs to code a function which already happens at a preset time and switches the two objects from their positions. Because I have already given them the "Switch()" function for them to work with, they press the button that adds it into the code and then the code is done.
What I'm wondering is how I should implement this. I was thinking that the buttons in the plugin would modify a string that held the details of the required function. When the function needed to be ran, some sort of parsing function would read the string and make a proper function become actual code that could be ran.
This way, if I needed to change any pre-defined functions later on, All I would have to modify is the behavior the parser function interprets commands.
I could also use a lot of the loadstring function, but I fear that it might be a bit tedious and inefficient.
I'm not asking for code, I'm asking for concepts. Any help would be greatly appreciated.

6 comments
loadstring is the only way you're going to do it
Not necessarliy. In the parsing function, it could read a string and when encountering certain words, add a preset function to some sort of queue
Neat question. I'm interested in a valid response.
If you have a parsing function you may as well use loadstring because loading the code into a chunk is magnitudes more efficient than interpreting it yourself.
You are right about that. However, I would need to make sure that loadstring() read functions that were already defined in workspace. For example, loadstring("require(game.ServerScriptService.sampleFunction)"). That's not exactly a bad thing though it allows for much more clear control.
Do you mean like a sort of beginner friendly scripting GUI?