I fixed my script builder, Now I want to know how to make it so it can execute locals, too. A lot of script builders have this feature.
Can you execute locals with loadstring()?
1 answer
The short answer to your question:
Yes and No.
Why?
When you allow clients to run LocalScripts (especially on games that are not filteringenabled), it allows exploiters to use that function to just pass in a lua script, inject that into ROBLOX and simply have it run, no questions asked. It also means that malicious scripts can abuse loadstring in order to mess up your game. This is why loadstring() for server scripts is disabled by default.
However, that's a way around this. You might have noticed if you use the admin scripts EISS or Adonis, you can run scripts both on the client on the server. This is done by using a lua library which parses lua text and executes said lua. If you want to see how it works, you will need to dissect the Adonis main module.
As a side note, LogService.ExecuteScript allows you to execute server scripts on the client side provided you are the owner of the place, and also running a CoreScript..
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
loadstring can no longer be used in localscripts b/c of past exploits: the only way to use them is to use a server-side script, and have LoadstringEnabled set to true (it's in the ServerScriptService service).