getgenv().decompile = function(script_instance)
assert(type(request) == "function", "`request` is unavailable")
assert(type(crypt) == "table" and type(crypt.base64encode) == "function", "`crypt.base64encode` is unavailable")
assert(type(getscriptbytecode) == "function", "`getscriptbytecode` is unavailable")
assert(typeof(script_instance) == "Instance", "first arg must be an Instance")
local bytecode = getscriptbytecode(script_instance)
assert(type(bytecode) == "string" and #bytecode > 0, "getscriptbytecode returned empty (not a script / no permission)")
return request({
Url = "https://cherrywin.xyz/luau/decompile",
Method = "POST",
Headers = {["Content-Type"] = "application/json"},
Body = game:GetService("HttpService"):JSONEncode({
bytecode = crypt.base64encode(bytecode),
encode_key = 203,
settings = {
LineComment = false,
FunctionComment = false,
UpvalueComment = false,
renamingType = "semantic", -- "none" | "semantic"
sugarLocalFunctions = true,
sugarRecursiveLocalFunctions = true,
sugarGlobalFunctions = true,
removeUselessReturnInFunction = true,
removeUselessNumericForStep = true,
},
}),
}).Body
end