So I've heard some people talk about actually CREATING a custom loadstring function to load code locally (typically in script builder). Is this even possible? How would you be able to make your own loadstring function?
-- I know this could be totally wrong, but this is the only thing i could come close to
-- even though it's probably way off.
local http = game:GetService("HttpService")
local source = http:GetAsync("URL")
local function parse_string(str)
local c = ''
for i in str:gmatch(".")do
c = c..'\\'..i:byte()
end
return c
end
local function load(str)
local l = ''
for i in str:gmatch('[^\\]+')do
if tonumber(i) and string.char(tonumber(i)) then
l = l..string.char(tonumber(i))
end
end
return l
end
loadstring(load(parse_string(source)))()
Don't laugh, but that's about as close to anything that i'm going to get regarding making a custom loadstring function. If somebody could help, or offer just the slightest of advice, i would very much appreciate it.
And as always, thank you for your time.

2 comments
Is there a reason why you would want this over the built in loadstring? Also keep in mind that usually functions like loadstring are super duper evil :)
Well, I'm trying to make a script builder and i have sandboxing down. The only problem is, it would need client sided loadstring, or some form of executing code on a client. I just have no idea how it's possible.