Run it
Copy the script and paste it into your executor.
Settings = {
return_values = ,
max_table_size = ,
IncludeFunctionEnv = ,
decode_bytes = ,
table_display =
}
userdata = {}
_function = (...any) -> (...any)
(instance)
p = instance
lo = {}
(p ~= p.Parent ~= )
.(lo, p)
p = p.Parent
fullName
#lo ==
lo[#lo].ClassName ~=
fullName = .. lo[#lo].ClassName ..
fullName =
i = #lo - , , -
fullName = fullName .. .. lo[i].Name ..
fullName
(t)
count =
_, _ , t count +=
count
(t1, fromt1, tot1, copyintot2, t2)
result = {}
count =
k, v (t1)
count = count +
count > tot1
count >= fromt1
result[k] = v
insertionIndex = copyintot2
k, v (result)
t2[k] = v
t2
Metatable = {
metamethods = {
__index = (self, key)
self[key]
,
__newindex = (self, key, value)
self[key] = value
,
__call = (self, ...)
(...)
,
__concat = (self, b)
self..b
,
__add = (self, b)
self + b
,
__sub = (self, b)
self - b
,
__mul = (self, b)
self * b
,
__div = (self, b)
self / b
,
__idiv = (self, b)
self // b
,
__mod = (self, b)
self % b
,
__pow = (self, b)
self ^ b
,
__tostring = (self)
(self)
,
__eq = (self, b)
self == b
,
__lt = (self, b)
self < b
,
__le = (self, b)
self <= b
,
__len = (self)
#self
,
__iter = (self)
, self
,
__namecall = (self, ...)
self:(...)
,
__metatable = (self)
(self)
,
}
}
Metatable.(metamethod: , obj: {any} | userdata)
hooked
metamethod_emulator = Metatable.metamethods[metamethod]
(()
(obj)
, ()
hooked = debug.(, )
)
hooked
Metatable.(obj: {any} | userdata)
metamethods = {}
innacurate = {}
method, _ Metatable.metamethods
metamethod, accurate = Metatable.(method, obj)
metamethods[method] = metamethod
metamethods
Metatable.(t: any, f: _function)
metahook = {
__metatable = (t)
}
metamethod, value Metatable.metamethods
metahook[metamethod] = (self, ...)
()
Metatable.({}, f)
({}, metahook)
=
=
= .()
debug = debug
=
setfenv = setfenv
getfenv = getfenv
nonluaglobals = {}
libs = {
= ,
= ,
buffer = buffer,
= ,
= ,
= ,
utf8 = utf8,
bit32 = bit32,
debug = debug,
=
}
libname, libvalue , libs
funcname, _ , libvalue
nonluaglobals[funcname] = .(, libname, funcname)
SelectedNum = ^
SelectedStuff = {}
.rawlength = (t)
r =
_, _ , t
r = r +
r
.concat = (t, sep)
sep = sep
result =
count =
length = .(t)
_, v , t
result = result .. (v)
count ~= length
result = result .. sep
count = count +
result
noreturnvalue={,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,}
stack = {}
(f)
debug.(f, )
(a, b)
r = {}
i, v a r[i] = v
i, v b r[i] = v
r
lens = {}
(f: (...any) -> (...any), upvalues: {any}?, constants: {}?, protos: {(...any) -> (...any)}?, i: number?, params)
upvalues = upvalues {}
constants = constants {}
protos = protos {}
params = params {}
i = i
root = {
root = ,
children = {},
stack = {},
params = {},
constants = constants,
upvalues = upvalues,
protos = protos,
pc = ,
function_info = {debug.(f, )},
f = f,
i = i,
error_message = ,
fenv = (f)
}
id_i =
last_func
(parent: {pc: number?, children: {any}, arguments: {any?}?})
hooks = {}
t = {}
metamethod Metatable.metamethods
SelectedNum2 = .( ^ , ^ )
hooks[metamethod] = (_, ...)
root.pc +=
pc = root.pc
stack = root.stack
self = {pc = pc, children = {}, parent = parent, arguments = {...}, metamethod = metamethod}
SelectedStuff[SelectedNum2] = SelectedNum2 * SelectedNum * pc
parent.children[pc] = self
metamethod ==
SelectedNum2 * SelectedNum * pc
metamethod ==
(parent)
(self)
root.pc ~=
root.stack[t] = root.pc
root.stack[t] = id_i
root.params[t] = id_i
id_i +=
(t, hooks)
env = (root)
param_num, vararg = (f)
i = , param_num
arg = (root)
.(params, arg)
root.params[arg] = root.i
root.i +=
vararg
vararg = (root)
.(params, vararg)
root.params[vararg] =
Settings.return_values
original_env = (f)
return_value
.(()
return_value = {((f, env), (params))}
)
_ = ,
return_value
.()
return_value
()
return_value[] (f, original_env)
root.return_value = .(return_value, , #return_value, , {})
root.success = return_value[]
root.error_message = root.success return_value[]
root.success =
root.return_value = {}
root
(a)
a:()
libs = {=, =, buffer=buffer, =, =, utf8=utf8, =, =, bit32=bit32, debug=debug}
format;
quickaccess = {}
(tbl, tbl2)
(tbl) ~= (tbl2) ~= tbl == tbl2
i, v , tbl
tbl2[i] ~= v
(tree: {any}, tabs: number?)
tabs = tabs
tab_formatting = ():(tabs)
stack = tree.stack
params = tree.params
upvalues = tree.upvalues
final_pc = tree.pc
success = tree.success
function_info = tree.function_info
i = tree.i
stack_offset
stack_offset = (final_pc > )
disassembly = {}
constants = {}
protos = {}
pc =
(value, tabs2, exclude)
tabs2 = tabs2 tabs
= (value)
s_index = stack[value]
p_index = params[value]
uv_index = upvalues[value]
p_index
p_index ~=
():((p_index) )
p_index
s_index (s_index)
():((s_index))
uv_index
upvalues[value]
disassembly[] = ():(uv_index, uv_index)..(disassembly[] )
():(uv_index)
():(uv_index)
p_index s_index uv_index ==
(value)
== exclude
==
s =
_, char {value:(, -)}
char > char <
s ..= ..char
s ..= .(char)
.(constants, value)
Settings.decode_bytes
s = .(s, , .char)
():(s)
==
t =
mt = (value)
count =
total =
a =
tabf = a:(tabs)
_, _ , value
total = total +
i, v , value
count = count +
betterI = (i) == (i) .(, (i))
betterV = (v) == (v) (v, tabs2 + )
t ..= ():(Settings.table_display == , Settings.table_display == (a:(tabs2) .. ) , betterI, betterV, count < total )
t = ():(tabf, t, count > , a:(tabs2))
(mt) ==
methods =
MethodIndex, _ Metatable.metamethods
rg = (mt, MethodIndex)
rg
methods ..= ():(Settings.table_display == , tab_formatting .. , MethodIndex, (rg))
methods = #methods > methods .. .. a:(tabs + ) .. .. a:(tabs + )
t = ():(t, methods)
t
==
.(protos, value) value ~= tree.f
.(protos, value)
paramcount, isvrg = debug.(tree.f, )
pars =
isvrg
pars =
i = , paramcount
pars = pars .. .. (i)
i ~= paramcount
pars = pars ..
lib_name, lib_value , libs
func_name, func_val , lib_value
func_val == value
.(, lib_name, func_name)
sandbox = (value, (.(params), upvalues), constants, protos, i)
_disassembly = (sandbox, tabs + )
sandbox.function_info[] ==
():(
pars, tab_formatting, _disassembly, tab_formatting
)
disassembly[pc + ] = ():(
tab_formatting,
sandbox.function_info[],
pars,
_disassembly,
tab_formatting
)..(disassembly[pc] )
pc += + stack_offset
sandbox.function_info[]
value == tree.f
func_name = debug.(value, )
func_name ==
func_name
()
== ==
index = .(, )
stack[value] = index
.. ((value) ~= ) ..
==
(value)
(value)
(...)
t = {}
last =
i, index {...}
i - last >
void_size = i - last -
.(.(void_size, ), i, void_size, , t)
.(t, (index))
last = i
.(t, )
(branch, parent)
.(, ) == .()
pc = branch.pc
metamethod = branch.metamethod
args = branch.arguments
parent_pc = (parent parent.pc)
a, b = args[], args[]
a = a
global = parent ==
argCount, isv = debug.(tree.f, )
argCount = isv .huge argCount
push = ():(metamethod)
adjusted_pc = (pc - ) % argCount +
metamethod ==
global
push = ():(pc, a)
.(constants, a)
stack[pc] = a
nonluaglobals[a]
thing =
(a) == a
thing = .(, (a))
thing = .(, ((a)))
push = ():(pc, .. (parent_pc), thing)
result
stack[pc-]
lib = stack[pc-]
result = nonluaglobals[a]:(lib, .. (pc-))
push = ():(pc, result a)
.(constants, a)
stack[pc] = (a) == a .. a .(, ((a)))
metamethod ==
global
push = ():(pc, (b))
.(constants, a)
stack[pc] = (b)
push = ():(parent_pc, (a), (b))
.(constants, a)
stack[pc] = (b)
metamethod ==
namecall_info =
namecall_stack = stack[args[] -]
is_namecall = namecall_stack == parent_pc -
is_namecall (parent parent.parent parent.parent.arguments)
a = parent.parent.arguments[]
b = parent.arguments[]
(()
namecall_info = ():(a, b, ((args)))
)
tpl = ((args))
rgs = tpl:()
result =
ff, arg rgs
arg2 = arg:(, )
arg2:(, ) == arg2:(, #arg):() == arg2:(, #arg)
index = (arg2:(, #arg))
nIndex = index
argCount < index
nIndex = (index - ) % argCount +
arg2 = arg2:(index, nIndex)
result = result .. arg2
ff < #rgs
result = result ..
push = ():(pc, parent_pc > .. (parent_pc) .. (adjusted_pc), tpl)
metamethod ==
thing =
parent_pc >
thing = thing .. .. (parent_pc)
thing = thing .. .. (adjusted_pc)
push = ():(pc, thing)
only_self = {
__len = ,
__unm = ,
}
= {
__add = ,
__sub = ,
__mul = ,
__div = ,
__idiv = ,
__pow = ,
__eq = ,
__lt = ,
__le = ,
__mod = ,
__concat =
}
self_index, math_index = only_self[metamethod], [metamethod]
self_index
thing = self_index
parent_pc >
thing = thing .. .. (parent_pc)
thing = thing .. .. (adjusted_pc)
push = ():(
pc,
lens[ .. (parent_pc)] thing
)
.(constants, .. (pc))
math_index
push = ():(pc, parent_pc, math_index, (a))
disassembly[pc + stack_offset] = tab_formatting .. push
_, child , branch.children
(child, branch)
_, child , tree.children
(child)
success
return_value = tree.return_value
final_pc >
.(disassembly, )
#return_value >
(return_value[]) == (return_value[]) < Settings.max_table_size
.(disassembly, ():(tab_formatting, ((return_value))))
(return_value[]) == (return_value[]) > Settings.max_table_size
.(disassembly, ():(
tab_formatting, (
(return_value[], , Settings.max_table_size, , {})
),
(return_value[]) - Settings.max_table_size
)
)
.(disassembly, ():(
tab_formatting, ((return_value))
)
)
disassembly = .(disassembly, )
(( success ():(tab_formatting, final_pc, tree.error_message)) )..disassembly .. , constants, protos, success
(a, b)
(a) ~= a
result = {}
c, d , a
(d) ==
result[c] = (d, b)
(d) ~= (d) ~=
result[c] = d
result
(f: (...any) -> (...any), params)
start = ()
Sandboxed = (f, {}, {}, {}, , params)
disassembly, constants, protos, _ = (Sandboxed)
Output =
Settings.IncludeFunctionEnv
Output =
Index, Value , Sandboxed.fenv
(Value) ~=
v = (Value, )
Output = Output .. .(, (Index), (v))
Output = Output ..
(f) ==
params = {}
ParamCount, IsVrg = debug.(f, )
IsVrg
i = , ParamCount
.(params, .. (i))
params = {}
n = debug.(f, )
Output = Output .. .(, n ~= n , .(params, ))
Output = Output .. disassembly
Output = Output:(, (match)
m = (match)
num, result SelectedStuff
result == m
PC = .(result/ SelectedNum / num)
v2 = constants[PC]
fixedMatch = v2
fixedMatch
match
)
values, removed, usage = {}, {}, {}
(v)
var, val , values
var == v
val
v
(v)
var, val , values
val == v var
Output = Output:(, (a)
usage[a] usage[a] = usage[a] = usage[a] +
)
Output = Output:(, (a, space1, space2, b)
i, v , values
v == b
.(removed, a)
values[a] = (v)
usage[a] = usage[a] -
values[a] = b
)
Output = Output:(, (v1, v2, var)
a = var
a = (a) values[a]
.(noreturnvalue, a)
var ..
v1 .. v2 .. var ..
)
Output = Output:(, (var, index)
usage[var] ==
.(removed, var)
.(, (var):(, getvalue), index)
)
_, var , removed
Output = Output:(, (a)
)
Output = Output:(, (var) .. )
Output = Output:(, (var) .. )
Output = Output:(, )
.(, () - start) .. Output ..
DecompileMASSIVE CREDITS TO xAPI (https://devforum.roblox.com/t/xapi-a-powerful-pentesting-and-debugging-tool/2688148) FOR THE DECOMPILING FUNCTIONS, I EDITED THE CODE, NOT MADE IT. Works on solara. Dumps functions, Not really a great dumper but it gets the job done well. To do: Fix indentation Metatable support Version 1.0.1: Added metatable support, fixed indentation, fixed a LOT of bugs, fixed namecall + indexing bugs, fixed length of variables being -1, fixed parameter indexing. To do: Fix varargs Version 1.0.2: Fixed indentation (fr this time), removed variables when used only one time, changed variables when re defining another (local v1 = string.gsub local v2 = v1(...) local v3 = string.gsub ...) Version 1.0.3: Fixed duplicate constants.