I rarely ask a question on here, but I am stumped. I am trying to make a script encoder and decoder, but no matter what I have tried my output is always incorrect and heavily so, and it has me confused.

Encoder:

local Characters = "A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/1/2/3/4/5/6/7/8/9/0"
local Split = string.split(Characters, "/")
local Script = [[
	LOL translation 124
]]
local Count = 0
for i,v in pairs(Split) do
	Script = string.gsub(Script, v, "[" .. i .. "]")
end
print(Script)

Decoder:

local Characters = "A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/1/2/3/4/5/6/7/8/9/0"
local Split = string.split(Characters, "/")
local Script = "[[[5[5[61]]][[5[5[61]]][5[5[61]]]]][[5[5[61]]][[5[5[61]]][5[6[62]]]]]][[[5[5[61]]][[5[5[61]]][5[5[61]]]]][5[5[61]]]][[[5[5[61]]][[5[5[61]]][5[5[61]]]]][[5[5[61]]][[5[5[61]]][5[6[62]]]]]] [[[5[5[61]]][5[6[62]]]][5[6[62]]]][[[5[5[61]]][5[6[62]]]][[5[5[61]]][5[6[62]]]]][[[5[5[61]]][[5[5[61]]][5[6[62]]]]][5[61]]][[[5[5[61]]][5[6[62]]]][62]][[[5[5[61]]][5[6[62]]]][5[5[61]]]][[[5[5[61]]][5[5[61]]]][6[62]]][[[5[5[61]]][[5[5[61]]][5[6[62]]]]][5[61]]][[[5[5[61]]][5[6[62]]]][5[6[62]]]][[[5[5[61]]][5[5[61]]]][5[5[61]]]][[[5[5[61]]][5[6[62]]]][[5[5[61]]][[5[5[61]]][5[5[61]]]]]][[[5[5[61]]][5[6[62]]]][62]] [[5[5[61]]][[5[5[61]]][5[5[61]]]]][[5[5[61]]][[5[5[61]]][5[6[62]]]]][[5[5[61]]][5[6[62]]]]"
local Count = 0
for i,v in pairs(Split) do
	Script = string.gsub(Script, "[" .. i .. "]", v)
end
print(Script)

2 comments

0

how exactly is it incorrect? plus u forgot some characters like ~,=,(,{,[, . ,#,%,*,_,-, and a lot more

0

speedyfox66, when it trys to decode the string it encoded it returns a completely incorrect string.