How to convert bytes to regular letters?

Hello, I’ve been trying to create a decoder plugin for my scripts, I’ve managed to make it loop through them and get the bytes, but I can’t seem to figure out how to turn them into regular text.

Script:

local pattern = "%b\"\"[^'\']"
local ReturnedString = string.gmatch(game.ServerScriptService.Encoded.Source,pattern)


for i,v in ReturnedString do
	local Formatted = string.gsub(i,"[\"%)]","")
	print(Formatted)
end

Script I’m going through:


Output:
image

1 Like

Convert them to base 10 with tonumber and pass them as arguments to string.char. You’ll either have to trim off the \x before the two hex digits and clarify it’s base 16 using the second argument of tonumber, or replace the backslash with a 0 (making it 0x53 or whatever).

1 Like