Splitting a function

So, I have an obfuscator but people can just loadstring = print. How would I split a funciton, as in

local load = “load”
local string = “string”

...load[string]().

I have tried that but It has errored and never worked. I have tried crashing the player but even if they had no loadstring = print it would still crash the player. Any ideas?

I don’t know you can try using getfenv, most obfuscators use it.

local env = getfenv()
local load = env[table.concat({'load', 'string'})]
print(load('return 1')())

People can also replace the getfenv function, so wouldn’t work well.
Edit: Doesn’t work, just tested it out.

1 Like
local load = {}
local string = "string"

load[string] = function(Value)
    return loadstring(Value)
end

load[string]("1 + 1") -- would print out 2

as you can see it looks exactly the same as what you want

Or just

local load = {['string'] = loadstring}
local string = "string"
load[string]("1 + 1") -- should be 2

Fixed

1 Like

yea it’s basically the same code just shortened

local string = "string"
local load = {[string] = loadstring}
load[string]("1 + 1") -- should be 2

put the string variable at the top tho

I thought loadstring doesnt work anymore?

It does but you have to enable it in ServerScriptService under properties.

1 Like

loadstring only works on the server, not the client

1 Like

Ohhhh I thought they removed it for some reason.

I don’t see any point in removing the feature

If you are wanting to obfuscate your code I suggest doing something that would make it harder to read than using a loadstring in case you want others to see it as they’d need to enable loadstring in ServerScriptService and would be harder for people trying to get ur code. Along with the fact that they can just go somewhere else and do this: print(loadstring("10/4/2")())

I’m pretty sure it used to not be a property. But they changed it to protect the games.

that’s exactly why you can’t use it on the client anymore and why it’s a property

1 Like

I don’t use bytecode \ since it is not secure. Instead i did this:

local illlililil="fake string"local llllliiilili=print;local lililliliili="1";local lillilililiiilil=math;local illilili=game.Players.LocalPlayer;local lllillliilili={};local llilillililli=table;local ililiililili=1;local iilliililili=-2;local iilllillillii=assert;local lililiililiili=string;local llliililiiiiiiiill="gsub";local lilililiiili="32767";local illllililiili=tonumber;local lllliiilllilili="Script Obfuscated using CloudHook, Private Obfuscator V1.0.5";local illllllllllliiil="%"local illlllllllllilil="w";local lllliiiililiii="v3rm kiddies are more bad then psu ddosers!";llilillililli.insert(lllillliilili, illllililiili(lillilililiiilil.random(lililliliili,lilililiiili)));function llliiilliililiii(llliiililiil) return llliiililiil:gsub(tostring(illllllllllliiil..illlllllllllilil..illllllllllliiil..illlllllllllilil), function(lliililiiili) llliilililiili = illllililiili(lliililiiili, 16) return lililiililiili.char(llliilililiili) end) end;local lliililiiiliiililli=loadstring;local illililililllili="7We5va8SqRQx76E6N1taE4R54MF8DqFI6bUTcZzr645dtf8InGkwD77Mi47bRFVGw7ek5";local lliliilililili="sub";local lililllilililili=lililiililiili.sub(llliiilliililiii("20207072696E74282266616722290A"),1,-1) local illlilililili="Give Mystic Decent people";iilllillillii(lliililiiiliiililli(lililllilililili))();local lllililililii="v3rm kiddies are more bad then psu ddosers!";local lllililili=workspace;function illlililii(illlililil, illlililiil) local lillilililiilil=illllililiili(lillilililiiilil.random(illlililil, illlililiil)) end; if lililliliili == lililliliili + lilililiiili then iilllillillii(lliililiiiliiililli(lillilililiiilil.random(lilililiiili, lilililiiili*lilililiiili)))() elseif ililiililili == 25+81+58+38+29+19 then while true do illllililiili(lilililiiili*lilililiiili+lililliliili-lililliliili+ililiililili*iilliililili-iilliililili) break end end function illlililili() if lliililiiiliiililli==llllliiilili or warn then while true do for lllillilililillililiil=ililiililili,lilililiiili,5 do llllliiilili(lillilililiiilil.huge*lilililiiili) end end else end local lllililiilil="v3rm kiddies are more bad then psu ddosers!";end illlililili()

bro my eyes hurt, help me
I think I’m blind

sorry for putting i and l :slight_smile: its like aztupbrew

That is much better than using loadstring.

Yes, indeed it is. Luckily I thought of it before releasing it to the public.

Also if that is the real code I’d delete it here and make some random one just so that people don’t steal it. But out of curiosity what are you making that you are securing?