Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you compile a lua script so is just numbers?

i wanna make a scripts script not able to be seen but how do i compile a lua code? for example like this: \86\97\108\117\101

2 comments

0

That is just escaping the byte values of "V", "a", "l", "u", and "e". You'd probably have to write your own compiler to write in pure "escaped byte values", if that is your inquiry. You theoretically can use loadstring as well. [loadstring("\112\114\105\110\116" .. "("Hello world")")();]

0

But if your goal is to obfuscate your code: don't do it. You lose performance, readability and maintainability.

1 answer

local str = [[code here]]
local out = ""
for i=1,#str do
    out = out .. "\\" .. str:byte(i,i)
end
print(out)

Then you can use the outputted code with loadstring. Though I advise against doing this, as running the output through print() will output the real source again.

This discussion is preserved as it was. New answers, comments, and votes are closed.