Run it
Copy the script and paste it into your executor.
src =
dst =
(val, n)
.(val / ^ n)
(a, b)
pos, res = ,
a > b >
ra = a %
rb = b %
ra + rb >
res += pos
a = (a - ra) /
b = (b - rb) /
pos *=
res
ops = {
MOVE = , LOADK = , LOADBOOL = , LOADNIL = ,
GETUPVAL = , GETGLOBAL = , GETTABLE = , SETGLOBAL = ,
SETUPVAL = , SETTABLE = , NEWTABLE = , SELF = ,
ADD = , SUB = , MUL = , DIV = , MOD = , POW = ,
UNM = , NOT = , LEN = , CONCAT = , JMP = ,
EQ = , LT = , LE = , TEST = , TESTSET = ,
CALL = , TAILCALL = , RETURN = , FORLOOP = ,
FORPREP = , TFORLOOP = , SETLIST = , CLOSE = ,
CLOSURE = , VARARG =
}
opN = {}
k, v (ops)
opN[v] = k
Reader = {}
Reader.__index = Reader
Reader.(data: )
({ data = data, pos = , le = , isize = , ssize = }, Reader)
Reader:()
b = self.data:(self.pos)
self.pos +=
b
Reader:(n: number)
t = {}
i = , n
b = self:()
b
t[i] = b
t
Reader:(size: number)
t = self:(size)
t
acc =
self.le
i = , size
acc += t[i] * ( ^ ((i - ) * ))
i = , size
acc += t[i] * ( ^ ((size - i) * ))
acc
Reader:()
self:(self.isize)
Reader:()
self:(self.ssize)
Reader:()
t = self:()
t
self.le
r = {}
i = , , - r[ - i] = t[i]
t = r
sign = (t[] > ) -
exp = (t[], ) * + (t[], )
mant = (t[], )
i = , , -
mant = mant * + t[i]
exp ==
(mant == ) sign * mant *
exp ==
(mant == ) sign * ( / ) /
sign * ( + mant / ( ^ )) * ( ^ (exp - ))
Reader:()
len = self:()
len len ==
s = self.data:(self.pos, self.pos + len - )
self.pos += len
s
(r)
(r:() == r:() == r:() == r:() == , )
r:()
r:()
endian = r:()
r.le = (endian == )
r.isize = r:()
r.ssize = r:()
r:()
r:()
r:()
fnId =
(r, parent)
fnId +=
fn = {
id = fnId,
src = r:(),
lineStart = r:(),
lineEnd = r:(),
nups = r:(),
nparams = r:(),
vararg = r:(),
maxstack = r:(),
instrs = {},
consts = {},
children = {}
}
nc = r:()
i = , nc
raw = r:()
op = raw %
a = .(raw / ) %
c = .(raw / ) %
b = .(raw / ) %
bx = .(raw / ) %
fn.instrs[i] = { opcode = op, a = a, b = b, c = c, bx = bx, sbx = bx - }
nk = r:()
i = , nk
t = r:()
t ==
fn.consts[i] = { t = }
t ==
fn.consts[i] = { t = , v = r:() ~= }
t ==
fn.consts[i] = { t = , v = r:() }
t ==
fn.consts[i] = { t = , v = r:() }
nch = r:()
i = , nch
fn.children[i] = (r, fn)
nli = r:()
i = , nli r:()
nlv = r:()
i = , nlv
r:(); r:(); r:()
nuv = r:()
i = , nuv r:()
fn
(idx: number, fid: number):
.. idx .. .. (fid )
(k):
k.t ==
k.t == k.v
k.t == (k.v)
k.t == .(, k.v)
(name: ): boolean
name:() ~=
(ctx, line: )
pad = .(, ctx.indent)
.(ctx.lines, pad .. line)
(ctx, i: number):
ctx.regs[i]
ctx.regs[i] = (i, ctx.fn.id)
ctx.regs[i]
(ctx, i: number):
ctx.exprs[i] (ctx, i)
(ctx, i: number, expr)
ctx.exprs[i] = expr
(ctx, rk: number):
rk <
(ctx, rk)
(ctx.fn.consts[rk - + ])
(ctx, idx: number):
.. idx
(fn)
instrs = fn.instrs
bounds = {}
pc = , #instrs
ins = instrs[pc]
ins.opcode == ops.EQ ins.opcode == ops.LT ins.opcode == ops.LE
ins.opcode == ops.TEST ins.opcode == ops.TESTSET
nxt = instrs[pc + ]
nxt nxt.opcode == ops.JMP
tgt = pc + + nxt.sbx
bounds[tgt] bounds[tgt] = {}
.(bounds[tgt], )
bounds[pc + ] bounds[pc + ] = {}
.(bounds[pc + ], )
ins.opcode == ops.FORPREP
tgt = pc + + ins.sbx +
bounds[tgt] bounds[tgt] = {}
.(bounds[tgt], )
{ bounds = bounds }
(fn, parent)
{
fn = fn,
parent = parent,
exprs = {},
regs = {},
declared = {},
selfInfo = ,
tables = {},
closures = {},
indent = ,
lines = {},
flow = (fn)
}
(ctx, reg: number, ind: number):
ti = ctx.tables[reg]
ti
parts = {}
_, e (ti.entries)
e.safeKey
.(parts, e.key .. .. e.val)
.(parts, .. e.key .. .. e.val)
_, v (ti.arr)
.(parts, v)
#parts ==
#parts <= ti.hasFuncs
.. .(parts, ) ..
out = {}
_, p (parts)
.(out, .(, ind + ) .. p .. )
.(out, .(, ind) .. )
.(out, )
(ctx, reg: number): boolean
recon
(ctx, proto, ind: number):
child = (proto, ctx)
child.indent =
(child, proto)
lines = {}
_, l (child.lines)
.(lines, l)
.. .(lines, ) ..
recon = (ctx, fn)
instrs = fn.instrs
pc =
flow = ctx.flow
pc <= #instrs
flow.bounds[pc]
_ (flow.bounds[pc])
ctx.indent = .(, ctx.indent - )
(ctx, )
ins = instrs[pc]
op = ins.opcode
a = ins.a
b = ins.b
c = ins.c
bx = ins.bx
sbx = ins.sbx
op == ops.MOVE
(ctx, a, (ctx, b))
op == ops.LOADK
(ctx, a, (fn.consts[bx + ]))
op == ops.LOADBOOL
(ctx, a, b ~= )
c ~= pc +=
op == ops.LOADNIL
i = a, b
(ctx, i, )
op == ops.GETUPVAL
(ctx, a, (ctx, b))
op == ops.GETGLOBAL
(ctx, a, fn.consts[bx + ].v)
op == ops.GETTABLE
obj = (ctx, b)
key = (ctx, c)
c >=
ck = fn.consts[c - + ]
ck.t == (ck.v)
(ctx, a, obj .. .. ck.v)
(ctx, a, obj .. .. key .. )
(ctx, a, obj .. .. key .. )
op == ops.SETGLOBAL
(ctx, fn.consts[bx + ].v .. .. (ctx, a))
op == ops.SETUPVAL
(ctx, (ctx, b) .. .. (ctx, a))
op == ops.SETTABLE
keyRef = (ctx, b)
valRef = c < ctx.closures[c]
valRef valRef = (ctx, c)
c < ctx.closures[c] =
ctx.tables[a]
safeK =
kName = keyRef
b >=
ck = fn.consts[b - + ]
ck.t == (ck.v)
safeK =
kName = ck.v
valRef:()
ctx.tables[a].hasFuncs =
.(ctx.tables[a].entries, { key = kName, val = valRef, safeKey = safeK })
obj = (ctx, a)
tgt
b >=
ck = fn.consts[b - + ]
ck.t == (ck.v)
tgt = obj .. .. ck.v
tgt = obj .. .. keyRef ..
tgt = obj .. .. keyRef ..
(ctx, tgt .. .. valRef)
op == ops.NEWTABLE
ctx.tables[a] = { entries = {}, arr = {}, hasFuncs = }
(ctx, a, )
op == ops.SELF
obj = (ctx, b)
mname =
c >=
cm = fn.consts[c - + ]
cm.t == mname = cm.v
ctx.selfInfo = { obj = obj, method = mname, raw = (ctx, c) }
(ctx, a + , obj)
mname (mname)
(ctx, a, obj .. .. mname)
(ctx, a, obj .. .. ctx.selfInfo.raw .. )
op >= ops.ADD op <= ops.POW
opMap = {
[ops.ADD] = , [ops.SUB] = , [ops.MUL] = ,
[ops.DIV] = , [ops.MOD] = , [ops.POW] =
}
(ctx, a, (ctx, b) .. .. opMap[op] .. .. (ctx, c))
op == ops.UNM
(ctx, a, .. (ctx, b))
op == ops.NOT
(ctx, a, .. (ctx, b))
op == ops.LEN
(ctx, a, .. (ctx, b))
op == ops.CONCAT
parts = {}
i = b, c
.(parts, (ctx, i))
(ctx, a, .(parts, ))
op == ops.JMP
op == ops.EQ op == ops.LT op == ops.LE
cmpOp
op == ops.EQ
cmpOp = (a ~= )
op == ops.LT
cmpOp = (a ~= )
cmpOp = (a ~= )
(ctx, .. (ctx, b) .. .. cmpOp .. .. (ctx, c) .. )
ctx.indent +=
op == ops.TEST
cond = (c == ) .. (ctx, a) (ctx, a)
(ctx, .. cond .. )
ctx.indent +=
op == ops.TESTSET
cond = (c == ) .. (ctx, b) (ctx, b)
(ctx, a, (ctx, b))
(ctx, .. cond .. )
ctx.indent +=
op == ops.CALL
fnExpr
args = {}
ctx.selfInfo
si = ctx.selfInfo
si.method (si.method)
fnExpr = si.obj .. .. si.method
fnExpr = si.obj .. .. si.raw ..
b >
i = a + , a + b -
ae = (ctx, i)
ctx.tables[i] ae = (ctx, i, ctx.indent); ctx.tables[i] =
ctx.closures[i] ae = ctx.closures[i]; ctx.closures[i] =
.(args, ae)
b ==
ae = (ctx, a + )
ae ae ~= (a + , ctx.fn.id)
.(args, ae)
ctx.selfInfo =
fnExpr = (ctx, a)
b >
i = a + , a + b -
ae = (ctx, i)
ctx.tables[i] ae = (ctx, i, ctx.indent); ctx.tables[i] =
ctx.closures[i] ae = ctx.closures[i]; ctx.closures[i] =
.(args, ae)
b ==
ae = (ctx, a + )
ae ae ~= (a + , ctx.fn.id)
.(args, ae)
call = fnExpr .. .. .(args, ) ..
c ==
(ctx, a, call)
c ==
(ctx, call)
c ==
rn = (ctx, a)
ctx.declared[a]
ctx.declared[a] =
(ctx, .. rn .. .. call)
(ctx, rn .. .. call)
(ctx, a, rn)
ctx.regs[a] = rn
rets = {}
i = a, a + c -
rn = (ctx, i)
.(rets, rn)
ctx.declared[i] =
(ctx, i, rn)
ctx.regs[i] = rn
(ctx, .. .(rets, ) .. .. call)
op == ops.TAILCALL
fe = (ctx, a)
targs = {}
b >
i = a + , a + b -
.(targs, (ctx, i))
(ctx, .. fe .. .. .(targs, ) .. )
op == ops.RETURN
b ==
(ctx, )
b ==
(ctx, .. (ctx, a))
rets = {}
i = a, a + b -
.(rets, (ctx, i))
(ctx, .. .(rets, ))
op == ops.FORLOOP
op == ops.FORPREP
(ctx, .. (ctx, a + ) .. ..
(ctx, a) .. ..
(ctx, a + ) .. ..
(ctx, a + ) .. )
ctx.indent +=
ctx.declared[a + ] =
op == ops.TFORLOOP
ivars = {}
i = a + , a + + c
.(ivars, (ctx, i))
ctx.declared[i] =
(ctx, .. .(ivars, ) .. .. (ctx, a) .. )
ctx.indent +=
op == ops.SETLIST
ctx.tables[a]
i = , b
.(ctx.tables[a].arr, (ctx, a + i))
op == ops.CLOSURE
proto = fn.children[bx + ]
params = {}
i = , proto.nparams -
.(params, (i, proto.id))
proto.vararg ~=
.(params, )
(ctx, a)
code = (ctx, proto, ctx.indent)
ctx.closures[a] = code
(ctx, a, code)
nextIns = instrs[pc + ]
isNamed = nextIns nextIns.opcode == ops.SETGLOBAL nextIns.a == a
fname = isNamed fn.consts[nextIns.bx + ].v
fname (fname) fname = ; isNamed =
isNamed
(ctx, .. fname .. .. .(params, ) .. )
(ctx, .. (ctx, a) .. .. .(params, ) .. )
ctx.declared[a] =
child = (proto, ctx)
child.indent = ctx.indent +
(child, proto)
_, l (child.lines)
.(ctx.lines, l)
(ctx, )
(ctx, a, (ctx, a))
isNamed pc +=
pc += proto.nups
op == ops.CLOSE
op == ops.VARARG
b ==
(ctx, a, )
vargs = {}
i = a, a + b -
.(vargs, (ctx, i))
ctx.declared[i] =
(ctx, .. .(vargs, ) .. )
pc +=
(src: ):
lines = src:()
out = {}
i, line (lines)
pad = line:()
code = line:(#pad + )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
code = code:(, )
.(out, pad .. code)
.(out, )
raw = (src)
reader = Reader.(raw)
(reader)
mfn = (reader, )
ctx = (mfn, )
(ctx, mfn)
lout = .(ctx.lines, )
uout = (lout)
(, lout)
(, uout)
https://discord.gg/FgR3MXqZy9 This Moonsec Decompiler were posted months ago (almost a year ago, but got removed as the respiratory on GitHub included other files that we're not supposed to be public and misuploaded because of a leaked token.) A lot of people have took my Decompiler and liked it, join my discord and you will see the vouchers and reactions. You can use it in a bot, credits are optional. Note : a person have stole my file without credits and gave credits to himself, he stole it long time ago and I don't know where did he post it but someone informed me. If you're reading this, give credits and stop stealing my fuckin stuff and claiming credits.

Universal