explore
key systems
new
docs
discord
search scripts
⌘K
explore
key systems
new
docs
discord
sign in
⌘↵
--
publishes from anywhere on this page
new paste
untitled.luau
empty
/ 512kb
open file
⌘O
explore
key systems
new
docs
sign in
dex-detector-copy.lua
5843 lines · 192kb
/ 512kb
open file
⌘O
local G = (getgenv and getgenv()) or _G if G.Scripting404 and type(G.Scripting404.Destroy) == "function" then pcall(G.Scripting404.Destroy) end local HttpService = game:GetService("HttpService") local RunService = game:GetService("RunService") local TweenService = game:GetService("TweenService") local TextService = game:GetService("TextService") local WHITE = Color3.fromRGB(255, 255, 255) local GRAY = Color3.fromRGB(120, 124, 134) local GREEN = Color3.fromRGB(70, 200, 120) local RED = Color3.fromRGB(235, 80, 80) local AMBER = Color3.fromRGB(240, 180, 60) local FALLBACK_SERVICES = {"Workspace", "ReplicatedStorage", "ReplicatedFirst", "StarterGui", "StarterPack", "StarterPlayer", "Players", "Lighting", "SoundService", "Teams", "MaterialService", "TextChatService", "Chat"} local DEFAULT_OFF = {CoreGui = true, CorePackages = true} local function exec(name) local f = G[name] if type(f) == "function" then return f end local ok, v = pcall(function() return getfenv()[name] end) if ok and type(v) == "function" then return v end return nil end local function detectServices() local out, seen = {}, {} local ok, kids = pcall(game.GetChildren, game) if ok then for _, s in ipairs(kids) do local okN, n = pcall(function() return s.ClassName end) if okN and type(n) == "string" and not seen[n] then seen[n] = true out[#out + 1] = n end end end for _, n in ipairs(FALLBACK_SERVICES) do if not seen[n] then local ok2, s = pcall(game.GetService, game, n) if ok2 and s then seen[n] = true out[#out + 1] = n end end end table.sort(out) return out end local SERVICE_LIST = detectServices() local DEFAULT_SERVICES = {} for _, n in ipairs(SERVICE_LIST) do if not DEFAULT_OFF[n] then DEFAULT_SERVICES[#DEFAULT_SERVICES + 1] = n end end local CFG = { Root = "DexDump", Services = table.clone(DEFAULT_SERVICES), IncludeNil = true, HiddenScripts = true, HiddenProps = true, Properties = true, UseAPIDump = true, DumpScripts = true, MaxScripts = 5000, DecompileTimeout = 8, OneFilePerInstance = true, ShardSize = 500, MaxFileBytes = 4 * 1024 * 1024, Zip = true, ZipMaxEntries = 60000, PreCount = true, Ultra = false, UltraSlice = 0.03, UltraThreads = 6, FilesPerFrame = 2, WriteBudget = 0.003, ScanBudget = 0.004, ZipBudget = 0.004, MaxQueue = 150, LagThreshold = 0.06, LagPause = 0.15, ScriptHeader = true, ScriptAnalysis = true, LuaPath = true, LuaPathAll = false, AIFiles = true, ExplorerLayout = true, LegacyFiles = false, } local isfolder = isfolder or function() return false end local status = { state = "idle", phase = "Idle", stage = 0, ultra = false, instances = 0, total = 0, scripts = 0, remotes = 0, skipped = 0, hiddenScripts = 0, modules = 0, localscripts = 0, serverscripts = 0, files = 0, errors = 0, queued = 0, current = "", folder = "", zip = "", zipDone = 0, zipTotal = 0, parts = 0, cancel = false, paused = false, guard = false, t0 = os.clock(), tEnd = nil, log = {}, logVersion = 0, } G.DexDumpStatus = status G.DexDumpCancel = function() status.cancel = true end local Window, pauseToggle local function fmt(n) n = tonumber(n) or 0 local a = math.abs(n) if a < 1000 then return tostring(math.floor(n)) end local units = {"k", "m", "b", "t"} local i, v = 0, a while v >= 1000 and i < #units do v = v / 1000 i += 1 end local s = v >= 100 and string.format("%.0f", v) or string.format("%.1f", v) if tonumber(s) >= 1000 and i < #units then s = "1" i += 1 end s = s:gsub("%.0$", "") return (n < 0 and "-" or "") .. s .. units[i] end local function fmtTime(sec) sec = math.max(0, math.floor(sec or 0)) return string.format("%d:%02d", math.floor(sec / 60), sec % 60) end local function clean(s, n) return ((tostring(s):gsub("[^%w%._%-]", "_")):sub(1, n or 60)) end local function one(s, n) local v = tostring(s):gsub("%c+", " ") v = v:gsub("^%s+", ""):gsub("%s+$", "") n = n or 300 if #v > n then v = v:sub(1, n) .. "..." end return v end local function safeSeg(s, n) local v = tostring(s):gsub('[/\\:%*%?"<>|%c]', "_") v = v:gsub("^%s+", ""):gsub("[%s%.]+$", "") if v == "" then v = "_" end return v:sub(1, n or 60) end -- folder name of an instance in the Dex style layout: "Name [ClassName]" (just "Name" when both are equal) local function segName(name, class) local n = safeSeg(name, 60) if tostring(name) == tostring(class) then return n end return n .. " [" .. safeSeg(class, 40) .. "]" end local function uniqueSeg(used, name, class) local seg = segName(name, class) local key = seg:lower() local c = used[key] if c then c += 1 used[key] = c return seg .. " #" .. c end used[key] = 1 return seg end local function joinList(list, sep, max) local out = {} for i, v in ipairs(list) do if max and i > max then out[#out + 1] = "... +" .. (#list - max) .. " more" break end out[#out + 1] = tostring(v) end return table.concat(out, sep or ", ") end local function safeGet(inst, prop) local ok, v = pcall(function() return inst[prop] end) if ok then return v end return nil end local function luaStr(s) return (tostring(s):gsub("[%c\\\"]", function(c) if c == "\\" then return "\\\\" end if c == "\"" then return "\\\"" end if c == "\n" then return "\\n" end if c == "\r" then return "\\r" end if c == "\t" then return "\\t" end return string.format("\\%d", c:byte()) end)) end local LUA_KEYWORDS, INSTANCE_MEMBERS = {}, {} for _, k in ipairs({"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while"}) do LUA_KEYWORDS[k] = true end for _, k in ipairs({"Parent", "Name", "ClassName", "Archivable", "Changed", "Destroy", "Clone", "GetChildren", "GetDescendants", "FindFirstChild", "IsA", "WaitForChild", "GetFullName"}) do INSTANCE_MEMBERS[k] = true end local LP_NAME pcall(function() LP_NAME = game:GetService("Players").LocalPlayer.Name end) -- Builds an unambiguous Lua expression for an instance (same idea as Dex "Copy Path"). local function luaPath(inst) local path, cur, guard = "", inst, 0 while cur and guard < 250 do guard += 1 if cur == game then path = "game" .. path break end local okN, name = pcall(function() return cur.Name end) local okC, class = pcall(function() return cur.ClassName end) name = okN and tostring(name) or "?" class = okC and tostring(class) or "?" local okP, par = pcall(function() return cur.Parent end) if not okP then par = nil end local plain = name:match("^[%a_][%w_]*$") and not LUA_KEYWORDS[name] local idx if plain and not INSTANCE_MEMBERS[name] then idx = "." .. name elseif plain then idx = ":FindFirstChild(\"" .. name .. "\")" else idx = "[\"" .. luaStr(name) .. "\"]" end if par == nil then -- not parented to the DataModel: needs getnilinstances() return "getNil(\"" .. luaStr(name) .. "\", \"" .. luaStr(class) .. "\")" .. path, true end if par == game then idx = ":GetService(\"" .. luaStr(class) .. "\")" else local okF, fc = pcall(par.FindFirstChild, par, name) if okF and fc and fc ~= cur then local okK, kids = pcall(par.GetChildren, par) local pos = okK and table.find(kids, cur) if pos then idx = ":GetChildren()[" .. pos .. "]" end end end path = idx .. path cur = par end local pre = "game:GetService(\"Workspace\")" if path:sub(1, #pre) == pre then path = "workspace" .. path:sub(#pre + 1) end if LP_NAME then local pre2 = "game:GetService(\"Players\")." .. LP_NAME if path:sub(1, #pre2) == pre2 then local nxt = path:sub(#pre2 + 1, #pre2 + 1) if nxt == "" or not nxt:match("[%w_]") then path = "game:GetService(\"Players\").LocalPlayer" .. path:sub(#pre2 + 1) end end end return path, false end local REMOTE_METHODS = {FireServer = true, InvokeServer = true} local REMOTE_EVENTS = {OnClientEvent = true, OnClientInvoke = true} local NOTABLE = {"loadstring", "getfenv", "setfenv", "HttpGet", "HttpService", "Kick", "TeleportService", "MarketplaceService", "DataStoreService", "getgc", "hookfunction", "hookmetamethod", "getrawmetatable", "checkcaller", "debug.", "RunService", "UserInputService", "TweenService", "PathfindingService", "BindableEvent", "RemoteEvent", "RemoteFunction"} local REMOTE_USAGE = { RemoteEvent = "client: remote:FireServer(...) | server->client: remote.OnClientEvent:Connect(fn)", UnreliableRemoteEvent = "client: remote:FireServer(...) | server->client: remote.OnClientEvent:Connect(fn) (unreliable)", RemoteFunction = "client: remote:InvokeServer(...) | server->client: remote.OnClientInvoke = fn", BindableEvent = "local: bindable:Fire(...) | bindable.Event:Connect(fn)", BindableFunction = "local: bindable:Invoke(...) | bindable.OnInvoke = fn", } local function addUnique(list, set, v, max) if #list < max and not set[v] then set[v] = true list[#list + 1] = v end end -- Heuristic text scan of a decompiled source (may miss dynamic code). local function analyzeSource(src) local a = {requires = {}, services = {}, remotes = {}, urls = {}, notable = {}} local scan = #src > 400000 and src:sub(1, 400000) or src a.partial = #src > 400000 local sReq, sSvc, sUrl, sRem = {}, {}, {}, {} for expr in scan:gmatch("require%s*%(%s*([^\n]-)%s*%)") do local _, o = expr:gsub("%(", "") local _, c = expr:gsub("%)", "") if o > c then expr = expr .. string.rep(")", o - c) end addUnique(a.requires, sReq, one(expr, 120), 30) end for svc in scan:gmatch("GetService%s*%(%s*[\"']([%w_]+)[\"']%s*%)") do addUnique(a.services, sSvc, svc, 30) end for url in scan:gmatch("https?://[%w%-%._~:/%?#@!%$&%*%+,;=%%]+") do addUnique(a.urls, sUrl, url, 12) end local function addRemote(target, chain, method) local key = chain .. ":" .. method if #a.remotes < 40 and not sRem[key] then sRem[key] = true a.remotes[#a.remotes + 1] = {target = target, chain = chain, method = method} end end for _, verb in ipairs({"WaitForChild", "FindFirstChild"}) do for name, method in scan:gmatch(verb .. "%s*%(%s*[\"']([^\"'\n]+)[\"']%s*%)%s*:%s*(%a+)%s*%(") do if REMOTE_METHODS[method] then addRemote(name, name, method) end end for name, method in scan:gmatch(verb .. "%s*%(%s*[\"']([^\"'\n]+)[\"']%s*%)%.(On%a+)") do if REMOTE_EVENTS[method] then addRemote(name, name, method) end end end for chain, method in scan:gmatch("([%a_][%w_%.]*)%s*:%s*(%a+)%s*%(") do if REMOTE_METHODS[method] then addRemote(chain:match("([%w_]+)$") or chain, chain, method) end end for chain, method in scan:gmatch("([%a_][%w_%.]*)%.(On%a+)") do if REMOTE_EVENTS[method] then addRemote(chain:match("([%w_]+)$") or chain, chain, method) end end for _, k in ipairs(NOTABLE) do if scan:find(k, 1, true) then a.notable[#a.notable + 1] = k end end return a end local function log(msg) local l = status.log l[#l + 1] = string.format("[%s] %s", fmtTime(os.clock() - status.t0), tostring(msg)) if #l > 300 then table.remove(l, 1) end status.logVersion += 1 end local function notify(title, content, icon) if Window then pcall(function() Window:Notify({Title = title, Content = content, Icon = icon or "lucide:info", Duration = 4}) end) end end local function setState(state, phase, stage) status.state, status.phase = state, phase if stage then status.stage = stage end if state == "done" or state == "cancelled" or state == "error" then status.tEnd = os.clock() end end local lastDt = 0 local hbConn = RunService.Heartbeat:Connect(function(dt) lastDt = dt end) local function gate() while status.paused and not status.cancel do task.wait(0.1) end if status.ultra then return end if lastDt > CFG.LagThreshold then status.guard = true task.wait(CFG.LagPause) status.guard = false end end local sliceT = os.clock() local function slice(budget) local b = status.ultra and CFG.UltraSlice or budget if os.clock() - sliceT >= b then task.wait() gate() sliceT = os.clock() end end local files, made = {}, {} local queue, qHead, qTail = {}, 1, 0 local producerDone, writerDone = false, false local function qSize() return qTail - qHead + 1 end local function ensureFolder(path) if made[path] then return end local cur = "" for part in path:gmatch("[^/]+") do cur = cur == "" and part or (cur .. "/" .. part) if not made[cur] then if not isfolder(cur) then pcall(makefolder, cur) end made[cur] = true end end end local function failWrite(path) status.errors += 1 if status.errors <= 5 then log("Write failed: " .. path) end end local function doWrite(job) local path, data, mode = job[1], job[2], job[3] if mode == "append" then if not pcall(appendfile, path, data) then failWrite(path) end return end local dir = path:match("^(.*)/[^/]*$") if dir then ensureFolder(dir) end if pcall(writefile, path, data) then files[#files + 1] = path status.files = #files else failWrite(path) end end local function enqueue(path, data, mode) if status.ultra then pcall(doWrite, {path, data, mode or "write"}) return true end while qSize() >= CFG.MaxQueue and not status.cancel do task.wait() end qTail += 1 queue[qTail] = {path, data, mode or "write"} status.queued = qSize() return true end local function writerLoop() while true do if qHead > qTail then qHead, qTail = 1, 0 status.queued = 0 if producerDone then break end task.wait(0.05) elseif lastDt > CFG.LagThreshold and not status.ultra then status.guard = true task.wait(CFG.LagPause) status.guard = false else local t0, n = os.clock(), 0 local maxN = status.ultra and math.huge or CFG.FilesPerFrame local maxT = status.ultra and CFG.UltraSlice or CFG.WriteBudget while qHead <= qTail and n < maxN and os.clock() - t0 < maxT do local job = queue[qHead] queue[qHead] = nil qHead += 1 pcall(doWrite, job) n += 1 end status.queued = math.max(0, qSize()) task.wait() end end writerDone = true end local function drain() while qHead <= qTail do task.wait(0.05) end end local function writeFile(path, data) return enqueue(path, data, "write") end local function newWriter(dir, base, ext) ensureFolder(dir) return {dir = dir, base = base, ext = ext, idx = 0, buf = {}, bufSize = 0, fileSize = 0, path = ""} end local function flush(w) if #w.buf == 0 then return end local data = table.concat(w.buf, "\n") .. "\n" w.buf, w.bufSize = {}, 0 if w.idx == 0 or (w.fileSize > 0 and w.fileSize + #data > CFG.MaxFileBytes) then w.idx += 1 local name = (w.idx == 1) and (w.base .. w.ext) or (w.base .. "_" .. w.idx .. w.ext) w.path = w.dir .. "/" .. name w.fileSize = 0 enqueue(w.path, data, "write") else enqueue(w.path, data, "append") end w.fileSize += #data end local function put(w, line) w.buf[#w.buf + 1] = line w.bufSize += #line + 1 if w.bufSize > 65536 then flush(w) end end local function ser(v) local t = typeof(v) if t == "string" then return #v > 2000 and (v:sub(1, 2000) .. "...[truncated]") or v elseif t == "number" then if v ~= v or v == math.huge or v == -math.huge then return tostring(v) end return v elseif t == "boolean" then return v elseif t == "Instance" then local ok, p = pcall(v.GetFullName, v) return "@" .. (ok and p or "?") elseif t == "Color3" then return string.format("Color3(%.4f, %.4f, %.4f)", v.R, v.G, v.B) end return tostring(v) end local function sanitizeDeep(v) if type(v) == "string" then return (v:gsub("[\128-\255]", "?")) elseif type(v) == "table" then local o = {} for k, x in pairs(v) do o[k] = sanitizeDeep(x) end return o end return v end local function encode(rec) local ok, s = pcall(HttpService.JSONEncode, HttpService, rec) if ok then return s end ok, s = pcall(HttpService.JSONEncode, HttpService, sanitizeDeep(rec)) if ok then return s end return HttpService:JSONEncode({path = rec.path, class = rec.class, error = "encode failed"}) end local rawClasses, propCache, hiddenCache, apiLoaded = {}, {}, {}, nil local fallback = { Instance = {"Archivable"}, BasePart = {"Position", "Size", "CFrame", "Anchored", "CanCollide", "CanTouch", "Transparency", "Color", "Material", "Massless"}, GuiObject = {"Position", "Size", "Visible", "BackgroundColor3", "BackgroundTransparency", "ZIndex"}, TextLabel = {"Text"}, TextButton = {"Text"}, TextBox = {"Text"}, Sound = {"SoundId", "Volume", "Looped"}, Humanoid = {"Health", "MaxHealth", "WalkSpeed", "JumpPower"}, ValueBase = {"Value"}, } local function fetchAPI() local ok, body = pcall(game.HttpGet, game, "https://huggingface.co/datasets/Kvreez/Data-Source/raw/main/API-Dump.txt") if not ok or type(body) ~= "string" then return false end local ok2, data = pcall(HttpService.JSONDecode, HttpService, body) if not ok2 or type(data) ~= "table" or type(data.Classes) ~= "table" then return false end for ci, c in ipairs(data.Classes) do local list, hidden = {}, {} for _, m in ipairs(c.Members) do if m.MemberType == "Property" and m.Name ~= "Parent" and m.Name ~= "Name" and m.Name ~= "ClassName" then local tags = {} for _, tg in ipairs(m.Tags or {}) do if type(tg) == "string" then tags[tg] = true end end local sec = m.Security local readable = (type(sec) == "table" and sec.Read == "None") or sec == "None" if readable and not tags.Deprecated then if tags.NotScriptable then hidden[#hidden + 1] = m.Name else list[#list + 1] = m.Name end end end end rawClasses[c.Name] = {super = c.Superclass, props = list, hidden = hidden} if ci % 40 == 0 then task.wait() end end return true end local apiLoading = false local function ensureAPI() if apiLoaded ~= nil then return apiLoaded end if apiLoading then while apiLoading do task.wait(0.1) end return apiLoaded end apiLoading = true local ok, res = pcall(fetchAPI) apiLoaded = ok and res == true apiLoading = false return apiLoaded end local function loadAPI() if not CFG.UseAPIDump then return false end return ensureAPI() end local function chainFor(class, cache, key, fb) local cached = cache[class] if cached then return cached end local out, seen = {}, {} local cur = class while cur do local info = rawClasses[cur] local list = info and info[key] or (fb and fallback[cur]) for _, n in ipairs(list or {}) do if not seen[n] then seen[n] = true out[#out + 1] = n end end cur = info and info.super or nil end cache[class] = out return out end local function propsFor(class) return chainFor(class, propCache, "props", true) end local function hiddenFor(class) return chainFor(class, hiddenCache, "hidden", false) end local function getProp(i, n) return i[n] end local function tryDecompile(s) local fn = exec("decompile") if not fn then return nil, "decompile is not available in this executor" end local done, ok, res = false, false, nil local th = task.spawn(function() ok, res = pcall(fn, s) done = true end) local t0 = os.clock() while not done and os.clock() - t0 < CFG.DecompileTimeout do if status.ultra then task.wait() else task.wait(0.05) end end if not done then pcall(task.cancel, th) return nil, "timeout" end if ok and type(res) == "string" then return res end return nil, tostring(res) end local function viable(inst) if inst:IsA("ModuleScript") then return true end local okR, rc = pcall(function() return inst.RunContext end) if inst:IsA("LocalScript") then return (not okR) or rc == Enum.RunContext.Client or rc == Enum.RunContext.Legacy end if inst:IsA("Script") then return okR and rc == Enum.RunContext.Client end return false end local crcTable = {} for i = 0, 255 do local c = i for _ = 1, 8 do if bit32.band(c, 1) == 1 then c = bit32.bxor(bit32.rshift(c, 1), 0xEDB88320) else c = bit32.rshift(c, 1) end end crcTable[i] = c end local function crc32(s) local crc, n, i, work = 0xFFFFFFFF, #s, 1, 0 local limit = status.ultra and 1048576 or 131072 while i <= n do local j = math.min(i + 4095, n) local bytes = {string.byte(s, i, j)} for k = 1, #bytes do crc = bit32.bxor(crcTable[bit32.band(bit32.bxor(crc, bytes[k]), 255)], bit32.rshift(crc, 8)) end work += j - i + 1 i = j + 1 if work >= limit then work = 0 task.wait() end end return bit32.bxor(crc, 0xFFFFFFFF) end local function finishZip(zipPath, meta, offset, dosTime, dosDate) local cd, cdSize = {}, 0 for _, m in ipairs(meta) do local e = string.pack("<I4I2I2I2I2I2I2I4I4I4I2I2I2I2I2I4I4", 0x02014b50, 20, 20, 0x0800, 0, dosTime, dosDate, m.crc, m.size, m.size, #m.name, 0, 0, 0, 0, 0, m.off) .. m.name cd[#cd + 1] = e cdSize += #e end appendfile(zipPath, table.concat(cd)) appendfile(zipPath, string.pack("<I4I2I2I2I2I4I4I2", 0x06054b50, 0, 0, #meta, #meta, cdSize, offset, 0)) end local function buildZips(basePath, list) local dt = os.date("*t") local dosTime = bit32.bor(bit32.lshift(dt.hour, 11), bit32.lshift(dt.min, 5), math.floor(dt.sec / 2)) local dosDate = bit32.bor(bit32.lshift(math.max(dt.year - 1980, 0), 9), bit32.lshift(dt.month, 5), dt.day) local multi = #list > CFG.ZipMaxEntries local zipPath, meta, offset, part = nil, {}, 0, 0 local zbuf, zsize = {}, 0 local function zflush() if #zbuf > 0 and zipPath then appendfile(zipPath, table.concat(zbuf)) end zbuf, zsize = {}, 0 end status.zipTotal = #list sliceT = os.clock() for i, path in ipairs(list) do if status.cancel then break end if not zipPath then part += 1 zipPath = multi and string.format("%s_part%d.zip.txt", basePath, part) or (basePath .. ".zip.txt") writefile(zipPath, "") meta, offset = {}, 0 status.zip = zipPath status.parts = part end local ok, data = pcall(readfile, path) if ok and type(data) == "string" then local crc = crc32(data) local header = string.pack("<I4I2I2I2I2I2I4I4I4I2I2", 0x04034b50, 20, 0x0800, 0, dosTime, dosDate, crc, #data, #data, #path, 0) .. path local piece = header .. data if status.ultra then zbuf[#zbuf + 1] = piece zsize += #piece if zsize >= 4194304 then zflush() end else appendfile(zipPath, piece) end meta[#meta + 1] = {name = path, crc = crc, size = #data, off = offset} offset += #piece end status.zipDone = i if #meta >= CFG.ZipMaxEntries then zflush() finishZip(zipPath, meta, offset, dosTime, dosDate) zipPath = nil end slice(CFG.ZipBudget) end zflush() if zipPath then finishZip(zipPath, meta, offset, dosTime, dosDate) end end local function overallPercent() local st = status.state if st == "done" then return 100 end if st == "preparing" then return 2 end if st == "counting" then return 5 end if st == "scanning" then local frac = status.total > 0 and math.min(1, status.instances / status.total) or 0 return 5 + 78 * frac end if st == "finishing" then return 84 end if st == "zipping" then local frac = status.zipTotal > 0 and (status.zipDone / status.zipTotal) or 0 return 85 + 15 * frac end return 0 end local function run() status.t0 = os.clock() log("Dump started" .. (status.ultra and " (Ultra Fast)" or "")) local have, missing = {}, {} for _, n in ipairs({"decompile", "getnilinstances", "getscripts", "getloadedmodules", "getrunningscripts", "gethiddenproperty", "getscripthash", "getscriptbytecode"}) do if exec(n) then have[#have + 1] = n else missing[#missing + 1] = n end end log("Detected: " .. (#have > 0 and table.concat(have, ", ") or "none")) if #missing > 0 then log("Missing: " .. table.concat(missing, ", ")) end local placeName = "Place_" .. game.PlaceId local productInfo pcall(function() local info = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId) if info then productInfo = info if info.Name then placeName = info.Name end end end) local meta = {placeName = placeName, placeId = game.PlaceId, jobId = game.JobId, dumpedAt = os.date("%Y-%m-%d %H:%M:%S")} meta.gameId = safeGet(game, "GameId") meta.placeVersion = safeGet(game, "PlaceVersion") meta.privateServerId = safeGet(game, "PrivateServerId") meta.creatorId = safeGet(game, "CreatorId") local ct = safeGet(game, "CreatorType") meta.creatorType = ct and tostring(ct) or nil if productInfo then meta.description = type(productInfo.Description) == "string" and one(productInfo.Description, 500) or nil meta.created, meta.updated = productInfo.Created, productInfo.Updated if type(productInfo.Creator) == "table" then meta.creator = tostring(productInfo.Creator.Name or "") meta.creatorId = meta.creatorId or productInfo.Creator.Id end end pcall(function() local Players = game:GetService("Players") local lp = Players.LocalPlayer if lp then meta.localPlayer, meta.localUserId = lp.Name, lp.UserId end meta.playersInServer, meta.maxPlayers = #Players:GetPlayers(), Players.MaxPlayers end) meta.streamingEnabled = safeGet(workspace, "StreamingEnabled") pcall(function() if version then meta.robloxVersion = version() end end) pcall(function() if identifyexecutor then local n, v = identifyexecutor() meta.executor = tostring(n) .. (v and (" " .. tostring(v)) or "") end end) meta.executor = meta.executor or "?" local root = clean(CFG.Root ~= "" and CFG.Root or "DexDump", 40) local base = root .. "/" .. clean(placeName, 40) .. "_" .. os.date("%Y%m%d_%H%M%S") status.folder = base local legacy = (not CFG.ExplorerLayout) or CFG.LegacyFiles local metaBase = CFG.ExplorerLayout and (base .. "/_scan") or base ensureFolder(base) ensureFolder(metaBase) log("Map: " .. placeName) task.spawn(writerLoop) if CFG.ExplorerLayout then writeFile(base .. "/Path.txt", table.concat({ "PATH FILE | game [DataModel]", string.rep("=", 64), "Every folder in this dump is one instance and holds its own Path.txt.", "Scripts also hold Source.lua. Service folders (Workspace, StarterPlayer, ...) are at this level.", "Analysis files (README_AI.txt, info.json, indexes) are in the _scan folder.", "", "[PATH]", "dex_path: game", "lua_access: game", "[GAME]", "game: " .. tostring(meta.placeName), "place_id: " .. tostring(meta.placeId), "game_id: " .. tostring(meta.gameId), "job_id: " .. tostring(meta.jobId), "executor: " .. tostring(meta.executor), "dumped_at: " .. tostring(meta.dumpedAt), }, "\n") .. "\n") end status.phase = "Loading property list" local apiOk = CFG.Properties and loadAPI() log(apiOk and "API dump loaded" or "API dump not used") local getHidden = CFG.HiddenProps and exec("gethiddenproperty") or nil local getHash = exec("getscripthash") local nilFn = exec("getnilinstances") or exec("get_nil_instances") local svcList = {} for _, n in ipairs(CFG.Services) do local ok, s = pcall(game.GetService, game, n) if not ok or not s then local ok2, s2 = pcall(game.FindFirstChildOfClass, game, n) if ok2 then s = s2 end end if s then svcList[#svcList + 1] = {name = n, inst = s} end end log("Services selected: " .. #svcList) local nilList = {} if CFG.IncludeNil and nilFn then local ok, l = pcall(nilFn) if ok and type(l) == "table" then for _, i in ipairs(l) do if typeof(i) == "Instance" and i ~= game then nilList[#nilList + 1] = i end end end end if CFG.PreCount then setState("counting", "Counting instances", 2) local total = 0 for _, s in ipairs(svcList) do local ok, d = pcall(s.inst.GetDescendants, s.inst) if ok then total += #d + 1 end task.wait() gate() end for _, r in ipairs(nilList) do local ok, d = pcall(r.GetDescendants, r) total += (ok and #d or 0) + 1 slice(CFG.ScanBudget) end status.total = total log("Total instances: " .. fmt(total)) end local CollectionService = game:GetService("CollectionService") local remoteW = newWriter(metaBase, "remotes", ".txt") put(remoteW, "class\tpath\tlua_access") local scriptFiles = 0 local pendingDecomp = 0 local seen = setmetatable({}, {__mode = "k"}) local scriptRows, remoteList = {}, {} local getBC = exec("getscriptbytecode") local function nameClass(i) return tostring(safeGet(i, "Name") or "?") .. "[" .. tostring(safeGet(i, "ClassName") or "?") .. "]" end local function buildHeader(c) local inst = c.inst local H = {} local bar = "-- " .. string.rep("=", 60) local function line(s) H[#H + 1] = "-- " .. s end local function add(k, v) if v == nil or v == "" then return end H[#H + 1] = "-- " .. k .. ": " .. one(v, 500) end H[#H + 1] = bar line("DEX SCRIPT DUMP | AI CONTEXT HEADER") line("Every header line starts with \"--\", so this file is still valid Lua.") line("Read the header first: it says where this script lives in the game.") H[#H + 1] = bar line("[LOCATION]") add("path", c.path) add("lua_access", c.lua) if c.isNil then add("nil_parented", "yes (not in the DataModel tree, found with getnilinstances or a hidden-scripts pass)") end add("name", c.name) add("class", c.class) add("scan_group", c.label) local okP, par = pcall(function() return inst.Parent end) if okP and par then local okF, pf = pcall(par.GetFullName, par) add("parent", (okF and pf or "?") .. " (" .. tostring(safeGet(par, "ClassName") or "?") .. ")") local chain, cur, n = {}, par, 0 while cur and cur ~= game and n < 14 do n += 1 table.insert(chain, 1, nameClass(cur)) cur = safeGet(cur, "Parent") end add("ancestors", "game > " .. table.concat(chain, " > ")) local okK, sib = pcall(par.GetChildren, par) if okK then add("sibling_index", tostring(table.find(sib, inst) or "?") .. " of " .. #sib) end else add("parent", "nil (no parent)") end add("depth", c.depth) local okCh, kids = pcall(inst.GetChildren, inst) if okCh then add("children", #kids) if #kids > 0 then local names = {} for i = 1, math.min(#kids, 15) do names[i] = nameClass(kids[i]) end add("children_list", joinList(names, ", ") .. (#kids > 15 and (" ... +" .. (#kids - 15) .. " more") or "")) end end local okDe, desc = pcall(inst.GetDescendants, inst) if okDe then add("descendants", #desc) end line("[SCRIPT STATE]") if c.okD then add("disabled", c.dis) end if c.okR then add("run_context", c.rc) end local okL, linked = pcall(function() return inst.LinkedSource end) if okL and linked and linked ~= "" then add("linked_source", linked) end add("script_hash", c.hash) if getBC then local okB, bc = pcall(getBC, inst) if okB and type(bc) == "string" then add("bytecode_bytes", #bc) end end add("decompile_status", c.statusText) if c.src then add("source_lines", c.lines) add("source_bytes", #c.src) end local attrs, tags = {}, {} local okA, at = pcall(inst.GetAttributes, inst) if okA and type(at) == "table" then local keys = {} for k in pairs(at) do keys[#keys + 1] = k end table.sort(keys) for i, k in ipairs(keys) do if i > 15 then attrs[#attrs + 1] = "... +" .. (#keys - 15) .. " more" break end attrs[#attrs + 1] = tostring(k) .. "=" .. tostring(ser(at[k])) end end local okT, tg = pcall(CollectionService.GetTags, CollectionService, inst) if okT and type(tg) == "table" then tags = tg end if #attrs > 0 or #tags > 0 then line("[ATTRIBUTES AND TAGS]") add("attributes", joinList(attrs, ", ")) add("tags", joinList(tags, ", ", 20)) end local an = c.an if an then line("[CODE ANALYSIS] heuristic text scan of the decompiled source, may miss dynamic code") add("requires", joinList(an.requires, " | ", 30)) add("services_used", joinList(an.services, ", ")) local calls = {} for _, r in ipairs(an.remotes) do calls[#calls + 1] = r.chain .. ":" .. r.method end add("remote_calls", joinList(calls, ", ", 40)) add("urls", joinList(an.urls, " | ")) add("notable_apis", joinList(an.notable, ", ")) if an.partial then add("analysis_note", "source is larger than 400000 chars, only the first 400000 were scanned") end end line("[GAME CONTEXT]") add("game", meta.placeName) add("place_id", meta.placeId) add("game_id", meta.gameId) add("job_id", meta.jobId) add("executor", meta.executor) add("dumped_at", meta.dumpedAt) add("dump_folder", base) add("file", c.relShort) H[#H + 1] = bar line("END OF HEADER | SOURCE CODE STARTS BELOW") H[#H + 1] = bar return table.concat(H, "\n") .. "\n" end local function dumpScript(inst, path, class, name, label, index, good, depth, dir) local okD, dis = pcall(function() return inst.Disabled end) local okR, rc = pcall(function() return inst.RunContext end) local hash if getHash then local okH, h = pcall(getHash, inst) if okH and h then hash = tostring(h) end end local src, err if good then src, err = tryDecompile(inst) else err = "server-side script, source is not available on the client" end local statusText = src and "ok" or (good and ("failed: " .. one(err, 160)) or "skipped (server-side script, source not available on the client)") local fileName = string.format("%04d", index) .. "_" .. clean(name) .. ".lua" local legacyRel = "scripts/" .. clean(label, 30) .. "/" .. fileName local relShort = legacyRel if CFG.ExplorerLayout and dir then relShort = dir:sub(#base + 2) .. "/Source.lua" end local row = { idx = index, class = class, path = path, file = relShort, hash = hash or "", status = src and "ok" or (good and "failed" or "server-side"), lines = 0, bytes = 0, requires = 0, remotes = 0, refs = {}, } local lines = 0 if src then local _, nl = src:gsub("\n", "\n") lines = nl + 1 row.lines, row.bytes = lines, #src end local head if CFG.ScriptHeader then local lua, isNil if CFG.LuaPath then lua, isNil = luaPath(inst) end local an if src and CFG.ScriptAnalysis then an = analyzeSource(src) row.requires, row.remotes, row.refs = #an.requires, #an.remotes, an.remotes end head = buildHeader({ inst = inst, path = path, lua = lua, isNil = isNil, name = name, class = class, label = label, depth = depth, okD = okD, dis = dis, okR = okR, rc = rc, hash = hash, statusText = statusText, src = src, lines = lines, an = an, relShort = relShort, }) else head = "-- " .. path .. "\n-- class: " .. class .. "\n" if okD then head = head .. "-- disabled: " .. tostring(dis) .. "\n" end if okR then head = head .. "-- runcontext: " .. tostring(rc) .. "\n" end if hash then head = head .. "-- hash: " .. hash .. "\n" end end scriptRows[#scriptRows + 1] = row local body = src or ("-- decompile failed: " .. tostring(err) .. "\n") writeFile(base .. "/" .. relShort, head .. "\n" .. body) if CFG.ExplorerLayout and dir and legacy then writeFile(metaBase .. "/" .. legacyRel, head .. "\n" .. body) end end local function buildPathText(inst, rec, ex) local L = {} local function line(s) L[#L + 1] = s end local function add(k, v) if v == nil or v == "" then return end L[#L + 1] = k .. ": " .. one(v, 600) end line("PATH FILE | " .. rec.name .. " [" .. rec.class .. "]") line(string.rep("=", 64)) line("[PATH]") line("dex_path: " .. tostring(rec.path)) if rec.luaAccess then line("lua_access: " .. rec.luaAccess) end if ex.isNil then add("nil_parented", "yes (not in the DataModel tree)") end line("[IDENTITY]") add("name", rec.name) add("class", rec.class) if rec.parent then add("parent", rec.parent .. (rec.parentClass and (" (" .. rec.parentClass .. ")") or "")) end local chain, cur, n = {}, safeGet(inst, "Parent"), 0 while cur and cur ~= game and n < 14 do n += 1 table.insert(chain, 1, nameClass(cur)) cur = safeGet(cur, "Parent") end if #chain > 0 then add("ancestors", "game > " .. table.concat(chain, " > ")) end add("depth", ex.depth) if ex.sibI then add("sibling_index", ex.sibI .. " of " .. ex.sibN) end add("children", rec.children) if ex.kidList and #ex.kidList > 0 then local names = {} for i = 1, math.min(#ex.kidList, 20) do names[i] = nameClass(ex.kidList[i]) end add("children_list", joinList(names, ", ") .. (#ex.kidList > 20 and (" ... +" .. (#ex.kidList - 20) .. " more") or "")) end line("[DUMP LOCATION]") add("folder", ex.rel) if ex.isScript then add("source_file", ex.rel .. "/Source.lua (decompiled source, see its header)") end if ex.isRemote and REMOTE_USAGE[rec.class] then line("[REMOTE]") add("usage", REMOTE_USAGE[rec.class]) end if rec.props then line("[PROPERTIES]") local keys = {} for k in pairs(rec.props) do keys[#keys + 1] = k end table.sort(keys) for _, k in ipairs(keys) do add(k, rec.props[k]) end end if rec.hidden then line("[HIDDEN PROPERTIES]") local keys = {} for k in pairs(rec.hidden) do keys[#keys + 1] = k end table.sort(keys) for _, k in ipairs(keys) do add(k, rec.hidden[k]) end end if rec.attrs then line("[ATTRIBUTES]") local keys = {} for k in pairs(rec.attrs) do keys[#keys + 1] = tostring(k) end table.sort(keys) for _, k in ipairs(keys) do add(k, rec.attrs[k]) end end if rec.tags then line("[TAGS]") add("tags", joinList(rec.tags, ", ", 30)) end line("[GAME]") add("game", meta.placeName) add("place_id", meta.placeId) add("job_id", meta.jobId) add("dumped_at", meta.dumpedAt) return table.concat(L, "\n") .. "\n" end local function processInstance(inst, depth, label, ctx, dir, sibI, sibN) local okN, name = pcall(function() return inst.Name end) local okC, class = pcall(function() return inst.ClassName end) name, class = okN and name or "?", okC and class or "?" if ctx.treeW then put(ctx.treeW, string.rep(" ", depth) .. name .. " [" .. class .. "]") end ctx.n += 1 local id = ctx.n local okP, path = pcall(inst.GetFullName, inst) path = okP and path or name status.current = path local okRem, isRemote = pcall(function() return inst:IsA("BaseRemoteEvent") or inst:IsA("RemoteFunction") or inst:IsA("BindableEvent") or inst:IsA("BindableFunction") end) isRemote = okRem and isRemote local okS, isScript = pcall(function() return inst:IsA("LuaSourceContainer") end) isScript = okS and isScript local rec = {id = id, path = path, class = class, name = name, service = label, depth = depth, children = ctx.kids or 0} local okPar, par = pcall(function() return inst.Parent end) if okPar and par then local okF, pf = pcall(par.GetFullName, par) rec.parent = okF and pf or "?" local okK, pc = pcall(function() return par.ClassName end) if okK then rec.parentClass = pc end elseif okPar then rec.parent = "nil" end local lua, isNilPath if CFG.LuaPath and (CFG.ExplorerLayout or CFG.LuaPathAll or isRemote or isScript) then lua, isNilPath = luaPath(inst) rec.luaAccess = lua end if CFG.Properties then local props = {} for _, n in ipairs(propsFor(class)) do local ok, v = pcall(getProp, inst, n) if ok and v ~= nil then props[n] = ser(v) end end if next(props) then rec.props = props end if getHidden then local hid = {} for _, n in ipairs(hiddenFor(class)) do local ok, v = pcall(getHidden, inst, n) if ok and v ~= nil then hid[n] = ser(v) end end if next(hid) then rec.hidden = hid end end end local okA, attrs = pcall(inst.GetAttributes, inst) if okA and type(attrs) == "table" and next(attrs) then local a = {} for k, v in pairs(attrs) do a[k] = ser(v) end rec.attrs = a end local okT, tags = pcall(CollectionService.GetTags, CollectionService, inst) if okT and type(tags) == "table" and #tags > 0 then rec.tags = tags end if CFG.ExplorerLayout and dir then writeFile(dir .. "/Path.txt", buildPathText(inst, rec, { rel = dir:sub(#base + 2), isScript = isScript, isRemote = isRemote, isNil = isNilPath, depth = depth, sibI = sibI, sibN = sibN, kidList = ctx.kidList, })) end if legacy then if CFG.OneFilePerInstance then local shard = string.format("%04d", math.floor((id - 1) / CFG.ShardSize)) local rel = metaBase .. "/instances/" .. clean(label, 30) .. "/" .. shard .. "/" .. string.format("%06d_%s.json", id, clean(name, 40)) writeFile(rel, encode(rec)) put(ctx.indexW, id .. "\t" .. class .. "\t" .. path .. "\t" .. rel) else put(ctx.instW, encode(rec)) end end if isRemote then status.remotes += 1 remoteList[#remoteList + 1] = {name = name, class = class, path = path, lua = lua} put(remoteW, class .. "\t" .. path .. "\t" .. (lua or "")) if legacy then writeFile(metaBase .. "/remotes/" .. string.format("%03d_%s_%s.json", status.remotes, class, clean(name, 40)), encode({ path = path, class = class, name = name, service = label, parent = rec.parent, depth = depth, luaAccess = lua, usage = REMOTE_USAGE[class], })) end end if isScript then if class == "ModuleScript" then status.modules += 1 elseif class == "LocalScript" then status.localscripts += 1 elseif class == "Script" then status.serverscripts += 1 end if CFG.DumpScripts and scriptFiles < CFG.MaxScripts then scriptFiles += 1 status.scripts = scriptFiles local good = viable(inst) if not good then status.skipped += 1 end if good and status.ultra and CFG.UltraThreads > 1 then while pendingDecomp >= CFG.UltraThreads and not status.cancel do task.wait() end pendingDecomp += 1 local idx = scriptFiles task.spawn(function() pcall(dumpScript, inst, path, class, name, label, idx, true, depth, dir) pendingDecomp -= 1 end) else dumpScript(inst, path, class, name, label, scriptFiles, good, depth, dir) end end end end local function walk(rootInst, label, ctx, rootDir) local stack = {{rootInst, 0, rootDir, nil, nil}} while #stack > 0 do if status.cancel then return end local item = table.remove(stack) local inst = item[1] if not seen[inst] then seen[inst] = true local ok, kids = pcall(inst.GetChildren, inst) ctx.kids = ok and #kids or 0 ctx.kidList = ok and kids or nil processInstance(inst, item[2], label, ctx, item[3], item[4], item[5]) if ok then local dirs if CFG.ExplorerLayout and item[3] then dirs = {} local used = {} for i = 1, #kids do dirs[i] = item[3] .. "/" .. uniqueSeg(used, safeGet(kids[i], "Name") or "?", safeGet(kids[i], "ClassName") or "?") end end for i = #kids, 1, -1 do stack[#stack + 1] = {kids[i], item[2] + 1, dirs and dirs[i] or nil, i, #kids} end end status.instances += 1 slice(CFG.ScanBudget) end end end local function newCtx(label) local ctx = {n = 0} if legacy then ctx.treeW = newWriter(metaBase .. "/tree", label, ".txt") if CFG.OneFilePerInstance then ctx.indexW = newWriter(metaBase .. "/index", label, ".tsv") put(ctx.indexW, "id\tclass\tpath\tfile") else ctx.instW = newWriter(metaBase .. "/instances", label, ".jsonl") end end return ctx end local function closeCtx(ctx) if ctx.treeW then flush(ctx.treeW) end if ctx.indexW then flush(ctx.indexW) end if ctx.instW then flush(ctx.instW) end end setState("scanning", "Scanning", 3) sliceT = os.clock() for _, s in ipairs(svcList) do if status.cancel then break end status.phase = "Scanning " .. s.name log("Scanning " .. s.name) local ctx = newCtx(s.name) local rootDir = CFG.ExplorerLayout and (base .. "/" .. segName(safeGet(s.inst, "Name") or s.name, safeGet(s.inst, "ClassName") or s.name)) or nil walk(s.inst, s.name, ctx, rootDir) closeCtx(ctx) end if #nilList > 0 and not status.cancel then status.phase = "Scanning nil instances" log("Scanning nil instances (" .. fmt(#nilList) .. " roots)") local ctx = newCtx("nil_instances") local nilRoot, nilUsed = base .. "/Nil Instances", {} if CFG.ExplorerLayout then writeFile(nilRoot .. "/Path.txt", "PATH FILE | Nil Instances\n" .. string.rep("=", 64) .. "\nInstances that are not parented to the DataModel (found with getnilinstances).\n") end for _, inst in ipairs(nilList) do if status.cancel then break end local d = CFG.ExplorerLayout and (nilRoot .. "/" .. uniqueSeg(nilUsed, safeGet(inst, "Name") or "?", safeGet(inst, "ClassName") or "?")) or nil walk(inst, "nil_instances", ctx, d) end closeCtx(ctx) end if CFG.HiddenScripts and not status.cancel then local extra, extraSet = {}, {} for _, n in ipairs({"getscripts", "getloadedmodules", "getrunningscripts"}) do local fn = exec(n) if fn then local ok, list = pcall(fn) if ok and type(list) == "table" then for _, i in ipairs(list) do if typeof(i) == "Instance" and not seen[i] and not extraSet[i] then local okIn, inGame = pcall(i.IsDescendantOf, i, game) if okIn and not inGame then extraSet[i] = true extra[#extra + 1] = i end end end end end end if #extra > 0 then status.hiddenScripts = #extra status.phase = "Scanning hidden scripts" log("Hidden scripts found: " .. fmt(#extra)) local ctx = newCtx("hidden_scripts") local hidRoot, hidUsed = base .. "/Hidden Scripts", {} if CFG.ExplorerLayout then writeFile(hidRoot .. "/Path.txt", "PATH FILE | Hidden Scripts\n" .. string.rep("=", 64) .. "\nScripts found by getscripts / getloadedmodules / getrunningscripts that are not in the DataModel tree.\n") end for _, inst in ipairs(extra) do if status.cancel then break end local d = CFG.ExplorerLayout and (hidRoot .. "/" .. uniqueSeg(hidUsed, safeGet(inst, "Name") or "?", safeGet(inst, "ClassName") or "?")) or nil walk(inst, "hidden_scripts", ctx, d) end closeCtx(ctx) end end flush(remoteW) setState("finishing", "Writing remaining files", 3) while pendingDecomp > 0 do task.wait() end drain() table.sort(scriptRows, function(a, b) return a.idx < b.idx end) local decompOk, decompFailed, decompServer = 0, 0, 0 for _, r in ipairs(scriptRows) do if r.status == "ok" then decompOk += 1 elseif r.status == "failed" then decompFailed += 1 else decompServer += 1 end end local execName, execVersion = "?", nil pcall(function() if identifyexecutor then local n, v = identifyexecutor() execName, execVersion = tostring(n), v and tostring(v) or nil end end) local info = { placeId = game.PlaceId, gameId = meta.gameId, placeName = placeName, jobId = game.JobId, placeVersion = meta.placeVersion, privateServerId = meta.privateServerId, creator = meta.creator, creatorId = meta.creatorId, creatorType = meta.creatorType, description = meta.description, created = meta.created, updated = meta.updated, localPlayer = meta.localPlayer, localUserId = meta.localUserId, playersInServer = meta.playersInServer, maxPlayers = meta.maxPlayers, streamingEnabled = meta.streamingEnabled, robloxVersion = meta.robloxVersion, time = meta.dumpedAt, folder = base, executor = execName, executorVersion = execVersion, instances = status.instances, scripts = scriptFiles, remotes = status.remotes, modules = status.modules, localScripts = status.localscripts, serverScripts = status.serverscripts, skippedServerScripts = status.skipped, hiddenScripts = status.hiddenScripts, decompiled = decompOk, decompileFailed = decompFailed, serverSide = decompServer, files = #files, errors = status.errors, apiDump = apiOk == true, decompile = exec("decompile") ~= nil, hiddenProperties = getHidden ~= nil, oneFilePerInstance = CFG.OneFilePerInstance, explorerLayout = CFG.ExplorerLayout, legacyFiles = legacy, ultra = status.ultra, scriptHeader = CFG.ScriptHeader, scriptAnalysis = CFG.ScriptAnalysis, luaAccessPath = CFG.LuaPath, services = CFG.Services, functionsDetected = have, functionsMissing = missing, cancelled = status.cancel, } writeFile(metaBase .. "/info.json", HttpService:JSONEncode(sanitizeDeep(info))) if CFG.AIFiles then -- scripts_index.tsv local rows = {"id\tclass\tdecompile\tlines\tbytes\trequires\tremote_calls\thash\tpath\tfile"} for _, r in ipairs(scriptRows) do rows[#rows + 1] = table.concat({r.idx, r.class, r.status, r.lines, r.bytes, r.requires, r.remotes, r.hash, r.path, r.file}, "\t") end writeFile(metaBase .. "/scripts_index.tsv", table.concat(rows, "\n") .. "\n") -- remotes_usage.txt (matched by remote name, heuristic) local byName = {} for _, r in ipairs(remoteList) do byName[r.name] = byName[r.name] or {} table.insert(byName[r.name], r) end local usage, usageSeen, unmatched, unmatchedSeen = {}, {}, {}, {} for _, row in ipairs(scriptRows) do for _, ref in ipairs(row.refs or {}) do local list = byName[ref.target] if list then for _, r in ipairs(list) do local key = r.path .. "|" .. row.path .. "|" .. ref.method if not usageSeen[key] then usageSeen[key] = true usage[r.path] = usage[r.path] or {} table.insert(usage[r.path], row.path .. " (" .. ref.chain .. ":" .. ref.method .. ")") end end else local key = ref.chain .. ":" .. ref.method .. "|" .. row.path if #unmatched < 150 and not unmatchedSeen[key] then unmatchedSeen[key] = true unmatched[#unmatched + 1] = ref.chain .. ":" .. ref.method .. " <- " .. row.path end end end end local U = { "REMOTES USAGE (heuristic: remote instances matched to decompiled scripts by name)", "Remotes found: " .. #remoteList, string.rep("=", 70), } for _, r in ipairs(remoteList) do U[#U + 1] = "[" .. r.class .. "] " .. r.path if r.lua then U[#U + 1] = " lua_access: " .. r.lua end if REMOTE_USAGE[r.class] then U[#U + 1] = " usage: " .. REMOTE_USAGE[r.class] end local refs = usage[r.path] if refs then U[#U + 1] = " referenced_by:" for i, s in ipairs(refs) do if i > 20 then U[#U + 1] = " ... +" .. (#refs - 20) .. " more" break end U[#U + 1] = " - " .. s end else U[#U + 1] = " referenced_by: (no client script reference found by name)" end U[#U + 1] = "" end if #unmatched > 0 then U[#U + 1] = string.rep("=", 70) U[#U + 1] = "Remote-like calls in scripts that did not match a remote instance by name (variables or dynamic names):" for _, s in ipairs(unmatched) do U[#U + 1] = " " .. s end end writeFile(metaBase .. "/remotes_usage.txt", table.concat(U, "\n") .. "\n") -- README_AI.txt local R = {} local function r(s) R[#R + 1] = s or "" end local function kv(k, v) if v ~= nil and v ~= "" then R[#R + 1] = " " .. k .. ": " .. one(v, 400) end end r("DEX DUMP | AI READ ME") r(string.rep("=", 70)) r("This folder is a snapshot of one Roblox game, taken from the client with the") r("Scripting 404 Dex file save tool. Every file carries its own context, so you can") r("give this README plus any file (or the whole zip) to an AI assistant.") r() r("[GAME]") kv("name", placeName) kv("place_id", game.PlaceId) kv("game_id", meta.gameId) kv("place_version", meta.placeVersion) kv("job_id", game.JobId) kv("private_server_id", meta.privateServerId) kv("creator", meta.creator) kv("creator_id", meta.creatorId) kv("creator_type", meta.creatorType) kv("created", meta.created) kv("updated", meta.updated) kv("description", meta.description) kv("players_in_server", meta.playersInServer) kv("max_players", meta.maxPlayers) kv("streaming_enabled", meta.streamingEnabled) kv("local_player", meta.localPlayer) r() r("[DUMP]") kv("dumped_at", meta.dumpedAt) kv("executor", execName .. (execVersion and (" " .. execVersion) or "")) kv("roblox_version", meta.robloxVersion) kv("mode", status.ultra and "Ultra Fast" or "Normal") kv("services_scanned", joinList(CFG.Services, ", ")) kv("executor_functions_detected", joinList(have, ", ")) kv("executor_functions_missing", joinList(missing, ", ")) kv("completed", status.cancel and "NO (cancelled, partial dump)" or "yes") r() r("[SUMMARY]") kv("instances", status.instances) kv("scripts_saved", scriptFiles .. " (Script " .. status.serverscripts .. ", LocalScript " .. status.localscripts .. ", ModuleScript " .. status.modules .. ")") kv("decompile_ok", decompOk) kv("decompile_failed", decompFailed) kv("server_side_no_source", decompServer) kv("hidden_scripts", status.hiddenScripts) kv("remotes", status.remotes) kv("write_errors", status.errors) r() r("[FOLDER LAYOUT]") if CFG.ExplorerLayout then r(" The dump root looks like the Dex explorer: one folder per service, then one folder per instance.") r(" <Name> [<ClassName>]/ folder of one instance (just <Name> when name and class are equal)") r(" Path.txt path of the instance (dex path, Lua access path) plus properties and other info") r(" Source.lua scripts only: decompiled source with an info header") r(" <child folders> children of the instance, same layout") r(" Path.txt path file of the game root") r(" Nil Instances/, Hidden Scripts/ special roots, same layout") r(" _scan/README_AI.txt this file") r(" _scan/info.json the same metadata, machine readable") r(" _scan/scripts_index.tsv one row per script: id, class, decompile status, lines, bytes, requires, remote calls, hash, path, file") r(" _scan/remotes_usage.txt every remote with its Lua access path and the scripts that appear to use it") r(" _scan/remotes.txt list of remotes (class, path, lua_access)") if legacy then r(" _scan/tree, index, instances, remotes, scripts legacy scan files (enabled in the Output section)") end else r(" README_AI.txt this file") r(" info.json the same metadata, machine readable") r(" scripts_index.tsv one row per script: id, class, decompile status, lines, bytes, requires, remote calls, hash, path, file") r(" remotes_usage.txt every remote with its Lua access path and the scripts that appear to use it") r(" remotes.txt list of remotes (class, path, lua_access)") r(" remotes/*.json one json per remote") r(" scripts/<Group>/NNNN_Name.lua decompiled source, with an info header on top (see below)") r(" tree/<Group>.txt indented explorer tree: Name [ClassName]") if CFG.OneFilePerInstance then r(" index/<Group>.tsv id, class, path, file for every instance") r(" instances/<Group>/<shard>/NNNNNN_Name.json properties of one instance") else r(" instances/<Group>.jsonl one json line per instance") end r(" <Group> is a service name (Workspace, ReplicatedStorage, ...), nil_instances or hidden_scripts.") end r() r("[SCRIPT FILE HEADER]") r(" Each script starts with comment lines (every line begins with --) so the file stays valid Lua:") r(" path Dex-style full name (dot separated, can be ambiguous when names repeat)") r(" lua_access unambiguous Lua expression that returns the instance (same idea as Dex Copy Path)") r(" parent / ancestors / sibling_index / depth / children / descendants position in the tree") r(" run_context / disabled / linked_source / script_hash / bytecode_bytes script state") r(" decompile_status, source_lines, source_bytes") r(" requires / services_used / remote_calls / urls / notable_apis heuristic scan of the source") r(" game context (place, job, executor, time) and the file location") r() r("[INSTANCE JSON FIELDS]") r(" id, path, class, name, service (scan group), depth, children (child count), parent, parentClass,") r(" luaAccess (scripts and remotes, or all instances if enabled), props (readable properties),") r(" hidden (hidden properties via gethiddenproperty), attrs (attributes), tags (CollectionService).") r(" Property values: Instances are written as @FullName, Color3 as Color3(r, g, b), the rest as tostring.") r() r("[LIMITATIONS]") r(" - Only what the client can see is saved. Server Scripts have no source on the client (status server-side).") r(" - Decompiled code is reconstructed: original variable names and comments are lost and it may contain errors.") r(" - Code analysis and remotes_usage.txt are text matches, not real execution, so dynamic names are missed.") r(" - Property values are read on the client and may differ from the server.") writeFile(metaBase .. "/README_AI.txt", table.concat(R, "\n") .. "\n") end drain() producerDone = true while not writerDone do task.wait(0.05) end if status.cancel then setState("cancelled", "Cancelled") log("Cancelled by user, saved files are kept") return end if CFG.Zip then setState("zipping", "Building zip", 4) log("Packing " .. fmt(#files) .. " files into zip") buildZips(base, table.clone(files)) if status.cancel then setState("cancelled", "Cancelled while zipping") log("Zip cancelled, folder is intact") return end log("Zip finished: " .. status.zip) end setState("done", "Done", 5) status.current = "" log("Done: " .. fmt(#files) .. " files, " .. fmt(status.instances) .. " instances") end local running = false local function resetRun() files, queue, qHead, qTail = {}, {}, 1, 0 producerDone, writerDone = false, false status.instances, status.total, status.scripts, status.remotes = 0, 0, 0, 0 status.skipped, status.hiddenScripts = 0, 0 status.modules, status.localscripts, status.serverscripts = 0, 0, 0 status.files, status.errors, status.queued = 0, 0, 0 status.current, status.folder, status.zip = "", "", "" status.zipDone, status.zipTotal, status.parts = 0, 0, 0 status.cancel, status.guard, status.paused = false, false, false status.ultra = CFG.Ultra == true status.t0, status.tEnd, status.error = os.clock(), nil, nil setState("preparing", "Preparing", 1) if pauseToggle then pcall(function() pauseToggle:SetValue(false) end) end end local ctl = {} local function syncConfig() for _, c in ipairs(ctl) do local ok, v = pcall(function() return c.obj:GetValue() end) if ok and v ~= nil then pcall(c.fn, v) end end end local function startDump() if running then notify("Already running", "Stop the current dump first.", "lucide:triangle-alert") return end for _, fn in {"writefile", "appendfile", "readfile", "makefolder"} do if not exec(fn) then notify("Unsupported executor", "Missing function: " .. fn, "lucide:circle-x") return end end syncConfig() if #CFG.Services == 0 then notify("No services", "Select at least one service.", "lucide:triangle-alert") return end running = true resetRun() notify("Started", status.ultra and "Ultra Fast dump is running." or "Dump is running.", "lucide:play") task.spawn(function() local ok, err = xpcall(run, function(e) return debug.traceback(tostring(e), 2) end) if not ok then producerDone = true setState("error", "Error") status.error = err log("ERROR: " .. tostring(err):sub(1, 160)) warn("[Scripting 404] " .. tostring(err)) end running = false if status.state == "done" then notify("Finished", fmt(status.files) .. " files saved.", "lucide:circle-check") elseif status.state == "cancelled" then notify("Stopped", "Dump was cancelled.", "lucide:square") else notify("Error", "Check the Log tab.", "lucide:circle-x") end end) end local function stopDump() if not running then notify("Idle", "Nothing is running.", "lucide:info") return end status.paused = false status.cancel = true log("Stop requested") notify("Stopping", "Finishing pending writes...", "lucide:square") end -- ===================== Explorer tab: Dex style explorer for the live game ===================== -- Layout: top = file list (explorer), middle = properties, bottom = tools (3D viewer and more). -- Editing features (cut, copy, paste, rename, delete ...) open with a long press on a row. local function buildExplorer(Container, Custom, H) local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Players = game:GetService("Players") local CollectionService = game:GetService("CollectionService") local LP = Players.LocalPlayer local th = Custom:GetTheme() or {} local WHITE = H.WHITE local BG = th.Background or Color3.fromRGB(8, 9, 12) local SURF = th.Surface or Color3.fromRGB(16, 18, 22) local OUT = th.Outline or Color3.fromRGB(40, 43, 50) local TXT = th.Text or WHITE local DIM = th.Placeholder or Color3.fromRGB(150, 153, 162) local BTN = th.Button or Color3.fromRGB(28, 30, 36) local HOT = Color3.fromRGB(70, 76, 96) local SELC = Color3.fromRGB(44, 48, 62) local ROW_H, INDENT, LONG_PRESS = 22, 12, 0.5 local E = {sx = 0, sy = 0, toolToken = 0} local conns = {} local weak = {__mode = "k"} local function mk(class, props, parent) return Custom:Create(class, props, parent) end local function corner(obj, r) mk("UICorner", {CornerRadius = UDim.new(0, r or 6)}, obj) end local function stroke(obj, col) mk("UIStroke", {Color = col or OUT, Thickness = 1}, obj) end local function sget(inst, prop) local ok, v = pcall(function() return inst[prop] end) if ok then return v end return nil end local function isA(inst, class) local ok, r = pcall(inst.IsA, inst, class) return ok and r == true end local function esc(s) return (tostring(s):gsub("&", "&"):gsub("<", "<"):gsub(">", ">")) end local function safeClone(o) local c pcall(function() c = o:Clone() end) if c then return c end pcall(function() local old = o.Archivable o.Archivable = true c = o:Clone() o.Archivable = old end) return c end -- ---------------------------------------------------------------- value formatting local function fmtVal(v) local t = typeof(v) if t == "nil" then return "nil" end if t == "string" then return ((v:gsub("%c", " ")):sub(1, 200)) end if t == "number" then if v ~= v or v == math.huge or v == -math.huge then return tostring(v) end if v == math.floor(v) and math.abs(v) < 1e15 then return string.format("%d", v) end local s = string.format("%.4f", v) s = s:gsub("0+$", "") s = s:gsub("%.$", "") return s end if t == "boolean" then return tostring(v) end if t == "Color3" then return string.format("%d, %d, %d", math.floor(v.R * 255 + 0.5), math.floor(v.G * 255 + 0.5), math.floor(v.B * 255 + 0.5)) end if t == "Instance" then local ok, p = pcall(v.GetFullName, v) return ok and p or tostring(v) end if t == "EnumItem" then return v.Name end if t == "Vector3" then return string.format("%.3f, %.3f, %.3f", v.X, v.Y, v.Z) end if t == "Vector2" then return string.format("%.3f, %.3f", v.X, v.Y) end return tostring(v):sub(1, 200) end local function parseNumbers(text, count) local out = {} for n in tostring(text):gmatch("[%+%-]?%d*%.?%d+[eE]?[%+%-]?%d*") do local x = tonumber(n) if x then out[#out + 1] = x end end if #out == count then return out end return nil end local function parseValue(old, text) local t = typeof(old) text = tostring(text) if t == "string" then return true, text end if t == "number" then local n = tonumber(text) if n then return true, n end return false end if t == "Color3" then local hex = text:match("^%s*#?(%x%x%x%x%x%x)%s*$") if hex then return true, Color3.fromHex(hex) end local n = parseNumbers(text, 3) if n then if text:find("%.") then return true, Color3.new(n[1], n[2], n[3]) end return true, Color3.fromRGB(n[1], n[2], n[3]) end return false end if t == "Vector3" then local n = parseNumbers(text, 3) if n then return true, Vector3.new(n[1], n[2], n[3]) end return false end if t == "Vector2" then local n = parseNumbers(text, 2) if n then return true, Vector2.new(n[1], n[2]) end return false end if t == "EnumItem" then local ok, item = pcall(function() return old.EnumType:FromName((text:gsub("^%s+", ""):gsub("%s+$", ""))) end) if ok and item then return true, item end return false end return false end local function editText(v) local t = typeof(v) if t == "string" then return v end return fmtVal(v) end -- ---------------------------------------------------------------- class badges local badgeCache = {} local function badgeFor(inst) local class = tostring(sget(inst, "ClassName") or "?") if sget(inst, "Parent") == game then return "SV", Color3.fromRGB(120, 140, 200) end local c = badgeCache[class] if c then return c[1], c[2] end local text, col = "?", Color3.fromRGB(120, 124, 134) if class == "LocalScript" then text, col = "LS", Color3.fromRGB(90, 160, 255) elseif class == "ModuleScript" then text, col = "MS", Color3.fromRGB(180, 130, 255) elseif class == "Script" then text, col = "S", Color3.fromRGB(80, 210, 190) elseif isA(inst, "BaseRemoteEvent") then text, col = "RE", Color3.fromRGB(255, 160, 70) elseif class == "RemoteFunction" then text, col = "RF", Color3.fromRGB(255, 130, 70) elseif class == "BindableEvent" then text, col = "BE", Color3.fromRGB(240, 200, 90) elseif class == "BindableFunction" then text, col = "BF", Color3.fromRGB(240, 180, 90) elseif class == "Folder" then text, col = "F", Color3.fromRGB(240, 190, 70) elseif class == "Model" then text, col = "M", Color3.fromRGB(140, 200, 120) elseif class == "Humanoid" then text, col = "H", Color3.fromRGB(120, 220, 160) elseif isA(inst, "BasePart") then text, col = "P", Color3.fromRGB(170, 175, 190) elseif isA(inst, "GuiBase2d") or isA(inst, "LayerCollector") then text, col = "UI", Color3.fromRGB(110, 190, 240) elseif isA(inst, "ValueBase") then text, col = "V", Color3.fromRGB(230, 120, 160) elseif isA(inst, "Sound") then text, col = "SN", Color3.fromRGB(200, 150, 230) elseif isA(inst, "Camera") then text, col = "C", Color3.fromRGB(150, 150, 220) end badgeCache[class] = {text, col} return text, col end -- ---------------------------------------------------------------- panels local rootF = mk("Frame", {Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0, ClipsDescendants = true}, Container) local probe = mk("Frame", {Size = UDim2.fromOffset(100, 4), BackgroundTransparency = 1, BorderSizePixel = 0}, rootF) E.scale = function() local s = probe.AbsoluteSize.X / 100 if s <= 0.05 then s = 1 end return s end local function panel(name) local f = mk("Frame", {Name = name, BackgroundColor3 = SURF, BorderSizePixel = 0, ClipsDescendants = true}, rootF) corner(f, 6) stroke(f) return f end local treeP = panel("Tree") local propP = panel("Properties") local toolP = panel("Tools") local LAYOUTS = { {name = "Balanced", 0.40, 0.27, 0.33}, {name = "Explorer", 0.62, 0.38, 0}, {name = "Tools", 0.22, 0.18, 0.60}, } local layoutIdx = 1 local function applyLayout() local L = LAYOUTS[layoutIdx] local y = 0 local panels = {treeP, propP, toolP} for i, p in ipairs(panels) do local h = L[i] p.Visible = h > 0 p.Position = UDim2.new(0, 2, y, 2) p.Size = UDim2.new(1, -4, h, -4) y += h end end local function chip(parent, text, cb, z) local b = mk("TextButton", { AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 20), BackgroundColor3 = BTN, BorderSizePixel = 0, AutoButtonColor = false, Font = Enum.Font.GothamMedium, TextSize = 11, TextColor3 = TXT, Text = text, ZIndex = z or 1, }, parent) corner(b, 5) mk("UIPadding", {PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8)}, b) b.MouseButton1Click:Connect(function() local ok, err = pcall(cb, b) if not ok then warn("[Scripting 404] " .. tostring(err)) end end) return b end local function strip(parent, pos, size) local s = mk("ScrollingFrame", { Position = pos, Size = size, BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 0, ScrollingDirection = Enum.ScrollingDirection.X, AutomaticCanvasSize = Enum.AutomaticSize.X, CanvasSize = UDim2.new(), }, parent) mk("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, Padding = UDim.new(0, 4), VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, }, s) return s end -- ---------------------------------------------------------------- tree state local expanded = setmetatable({}, weak) local root = {Kind = "root", Depth = -1} local nilFn = H.exec("getnilinstances") or H.exec("get_nil_instances") local nilNode = nilFn and {Kind = "nil", Depth = 0, Parent = root} or nil local flat, results = {}, {} local searching = false local sel, selSet = {}, setmetatable({}, weak) local selPath = nil local clipboard, clipCut = {}, false local showPath, multi, live = true, false, true local mode = "3D" local active = true local dirty = false local maxDepth = 0 local function ekey(node) return node.Obj or node end local SVC_ORDER = { Workspace = 1, Players = 2, Lighting = 3, ReplicatedFirst = 4, ReplicatedStorage = 5, ServerScriptService = 6, ServerStorage = 7, StarterGui = 8, StarterPack = 9, StarterPlayer = 10, Teams = 11, SoundService = 12, TextChatService = 13, Chat = 14, } local function sortedChildren(list, bySvc) local tmp = table.create(#list) for i, c in ipairs(list) do local nm = string.lower(tostring(sget(c, "Name") or "")) local ord = 0 if bySvc then ord = SVC_ORDER[tostring(sget(c, "ClassName") or "")] or 50 end tmp[i] = {ord, nm, c} end table.sort(tmp, function(a, b) if a[1] ~= b[1] then return a[1] < b[1] end return a[2] < b[2] end) local out = table.create(#tmp) for i, t in ipairs(tmp) do out[i] = t[3] end return out end local function buildKids(node) local kids = {} if node.Kind == "root" then local ok, ch = pcall(game.GetChildren, game) if ok then for _, c in ipairs(sortedChildren(ch, true)) do kids[#kids + 1] = {Kind = "inst", Obj = c, Depth = 0, Parent = node} end end node.ChildCount = ok and #ch or 0 if nilNode then kids[#kids + 1] = nilNode end elseif node.Kind == "nil" then local ok, l = pcall(nilFn) local roots = {} if ok and type(l) == "table" then for _, i in ipairs(l) do if typeof(i) == "Instance" and i ~= game then roots[#roots + 1] = i end end end for _, c in ipairs(sortedChildren(roots, false)) do kids[#kids + 1] = {Kind = "inst", Obj = c, Depth = 1, Parent = node} end node.ChildCount = #roots else local obj = node.Obj if showPath then kids[1] = {Kind = "path", Obj = obj, Depth = node.Depth + 1, Parent = node} end local ok, ch = pcall(obj.GetChildren, obj) if ok then for _, c in ipairs(sortedChildren(ch, false)) do kids[#kids + 1] = {Kind = "inst", Obj = c, Depth = node.Depth + 1, Parent = node} end end node.ChildCount = ok and #ch or 0 end node.Kids = kids end local function rebuildKids(node) buildKids(node) for _, k in ipairs(node.Kids) do if k.Kind ~= "path" and expanded[ekey(k)] then rebuildKids(k) end end end -- returns true when something changed local function liveCheck(node) if node.Kind == "root" then local ok, ch = pcall(game.GetChildren, game) if ok and #ch ~= node.ChildCount then rebuildKids(node) return true end elseif node.Kind == "inst" then local ok, ch = pcall(node.Obj.GetChildren, node.Obj) if ok and #ch ~= node.ChildCount then rebuildKids(node) return true end else return false end local changed = false for _, k in ipairs(node.Kids or {}) do if k.Kind == "inst" and expanded[ekey(k)] and k.Kids then if liveCheck(k) then changed = true end end end return changed end local function nodeName(n) if n.Kind == "path" then return "Path.txt" end if n.Kind == "nil" then return "Nil Instances" end return tostring(sget(n.Obj, "Name") or "?") end -- ---------------------------------------------------------------- tree UI local tbar = mk("Frame", {BackgroundTransparency = 1, Size = UDim2.new(1, -8, 0, 22), Position = UDim2.fromOffset(4, 3)}, treeP) local search = mk("TextBox", { Size = UDim2.fromOffset(104, 20), Position = UDim2.fromOffset(0, 1), BackgroundColor3 = BG, BorderSizePixel = 0, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = TXT, PlaceholderText = "Search...", PlaceholderColor3 = DIM, Text = "", ClearTextOnFocus = false, TextXAlignment = Enum.TextXAlignment.Left, }, tbar) corner(search, 5) mk("UIPadding", {PaddingLeft = UDim.new(0, 6)}, search) local tstrip = strip(tbar, UDim2.fromOffset(110, 0), UDim2.new(1, -110, 1, 0)) local list = mk("Frame", { Position = UDim2.fromOffset(4, 28), Size = UDim2.new(1, -8, 1, -32), BackgroundColor3 = BG, BorderSizePixel = 0, ClipsDescendants = true, Active = true, }, treeP) corner(list, 5) local sbar = mk("Frame", { AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -2, 0, 0), Size = UDim2.fromOffset(3, 20), BackgroundColor3 = WHITE, BackgroundTransparency = 0.6, BorderSizePixel = 0, Visible = false, ZIndex = 4, }, list) corner(sbar, 2) local statusL = mk("TextLabel", { AnchorPoint = Vector2.new(0, 1), Position = UDim2.new(0, 6, 1, -2), Size = UDim2.fromOffset(200, 14), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 10, TextColor3 = DIM, TextXAlignment = Enum.TextXAlignment.Left, Text = "", ZIndex = 4, }, list) local pool = {} local function newRow() local r = {} r.f = mk("TextButton", { Size = UDim2.fromOffset(600, ROW_H), BackgroundColor3 = SELC, BackgroundTransparency = 1, BorderSizePixel = 0, AutoButtonColor = false, Text = "", Visible = false, }, list) r.arrow = mk("TextLabel", { Size = UDim2.fromOffset(16, ROW_H), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = DIM, Text = "", }, r.f) r.badge = mk("TextLabel", { Size = UDim2.fromOffset(18, 14), BackgroundColor3 = DIM, BorderSizePixel = 0, Font = Enum.Font.GothamBold, TextSize = 8, TextColor3 = Color3.fromRGB(0, 0, 0), Text = "", }, r.f) corner(r.badge, 3) r.label = mk("TextLabel", { Size = UDim2.new(1, -40, 1, 0), BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 12, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, RichText = true, Text = "", TextTruncate = Enum.TextTruncate.AtEnd, }, r.f) r.f.InputBegan:Connect(function(input) E.press(r, input) end) r.f.InputChanged:Connect(function(input) E.wheel(input) end) return r end E.paintRow = function(r, node) local x = searching and 0 or node.Depth * INDENT local isSel = false if node.Kind == "path" then isSel = selPath ~= nil and selPath == node.Obj elseif node.Kind == "inst" then isSel = selSet[node.Obj] == true end r.f.BackgroundTransparency = isSel and 0 or 1 local hasArrow = (not searching) and node.Kind ~= "path" r.arrow.Visible = hasArrow if hasArrow then r.arrow.Position = UDim2.fromOffset(x, 0) r.arrow.Text = expanded[ekey(node)] and "v" or ">" end local bx = x + 16 r.badge.Position = UDim2.fromOffset(bx, 4) local rich if node.Kind == "path" then r.badge.Text, r.badge.BackgroundColor3 = "TXT", Color3.fromRGB(110, 210, 140) rich = '<font color="rgb(150,153,162)">Path.txt</font>' elseif node.Kind == "nil" then r.badge.Text, r.badge.BackgroundColor3 = "NIL", Color3.fromRGB(235, 100, 100) rich = "Nil Instances" else local txt, col = badgeFor(node.Obj) r.badge.Text, r.badge.BackgroundColor3 = txt, col local cls = tostring(sget(node.Obj, "ClassName") or "?") rich = esc(nodeName(node)) .. ' <font color="rgb(120,124,134)">[' .. esc(cls) .. "]</font>" if searching then local okF, fp = pcall(node.Obj.GetFullName, node.Obj) if okF then rich = rich .. ' <font color="rgb(90,94,104)">' .. esc(fp) .. "</font>" end end end r.label.Position = UDim2.fromOffset(bx + 22, 0) r.label.Size = UDim2.new(1, -(bx + 22), 1, 0) r.label.Text = rich end E.clamp = function() local sc = E.scale() local viewH = list.AbsoluteSize.Y / sc local viewW = list.AbsoluteSize.X / sc local maxY = math.max(0, #flat * ROW_H - viewH + 6) local maxX = math.max(0, (maxDepth * INDENT + 320) - viewW) E.sy = math.clamp(E.sy, 0, maxY) E.sx = math.clamp(E.sx, 0, maxX) end E.render = function() local sc = E.scale() local viewH = list.AbsoluteSize.Y / sc local viewW = list.AbsoluteSize.X / sc local width = math.max(viewW, maxDepth * INDENT + 320) local firstIdx = math.floor(E.sy / ROW_H) + 1 local count = math.ceil(viewH / ROW_H) + 2 for i = 1, count do local r = pool[i] if not r then r = newRow() pool[i] = r end local idx = firstIdx + i - 1 local node = flat[idx] if node then r.node = node r.f.Visible = true r.f.Position = UDim2.fromOffset(-E.sx, (idx - 1) * ROW_H - E.sy) r.f.Size = UDim2.fromOffset(width, ROW_H) E.paintRow(r, node) else r.node = nil r.f.Visible = false end end for i = count + 1, #pool do pool[i].node = nil pool[i].f.Visible = false end local content = #flat * ROW_H if content > viewH and viewH > 0 then local h = math.max(16, viewH * viewH / content) local y = (E.sy / math.max(1, content - viewH)) * (viewH - h) sbar.Visible = true sbar.Size = UDim2.fromOffset(3, h) sbar.Position = UDim2.new(1, -2, 0, y) else sbar.Visible = false end end local function rebuildFlat() if searching then flat = results maxDepth = 0 else flat = {} maxDepth = 0 local function add(node) flat[#flat + 1] = node if node.Depth > maxDepth then maxDepth = node.Depth end if node.Kind ~= "path" and expanded[ekey(node)] then if not node.Kids then buildKids(node) end for _, k in ipairs(node.Kids) do add(k) end end end if not root.Kids then buildKids(root) end for _, k in ipairs(root.Kids) do add(k) end end E.clamp() E.render() end E.rebuild = rebuildFlat E.refreshAll = function() rebuildKids(root) rebuildFlat() end list:GetPropertyChangedSignal("AbsoluteSize"):Connect(function() E.clamp() E.render() end) list.InputChanged:Connect(function(input) E.wheel(input) end) E.wheel = function(input) if input.UserInputType == Enum.UserInputType.MouseWheel then E.sy -= input.Position.Z * ROW_H * 3 E.clamp() E.render() end end E.scrollToIndex = function(idx) local viewH = list.AbsoluteSize.Y / E.scale() E.sy = (idx - 1) * ROW_H - viewH / 2 + ROW_H E.clamp() E.render() end -- ---------------------------------------------------------------- selection E.primary = function() if selPath then return selPath end local n = sel[#sel] return n and n.Obj or nil end E.selInsts = function() local t = {} for _, n in ipairs(sel) do if n.Kind == "inst" then t[#t + 1] = n.Obj end end return t end E.onSel = function() E.render() E.updateProps() E.updateTools() end E.selectOnly = function(node) sel = {node} selSet = setmetatable({[node.Obj] = true}, weak) selPath = nil E.onSel() end E.toggleSel = function(node) selPath = nil if selSet[node.Obj] then selSet[node.Obj] = nil for i, n in ipairs(sel) do if n.Obj == node.Obj then table.remove(sel, i) break end end else selSet[node.Obj] = true sel[#sel + 1] = node end E.onSel() end E.selectPath = function(inst) selPath = inst E.setMode("Path") E.onSel() end E.toggle = function(node) if node.Kind == "path" or searching then return end local k = ekey(node) if expanded[k] then expanded[k] = nil else expanded[k] = true buildKids(node) end rebuildFlat() end E.reveal = function(inst) if searching then searching = false E.suppressSearch = true search.Text = "" E.suppressSearch = false end local chain, cur, guard = {}, inst, 0 while cur and cur ~= game and guard < 300 do guard += 1 table.insert(chain, 1, cur) cur = sget(cur, "Parent") end local node if cur == game then node = root if not root.Kids then buildKids(root) end else node = nilNode if not node then H.notify("Explorer", "Instance is not parented to the game.", "lucide:triangle-alert") return end expanded[node] = true buildKids(node) end for _, o in ipairs(chain) do local nxt for pass = 1, 2 do if not node.Kids then buildKids(node) end for _, k in ipairs(node.Kids) do if k.Kind == "inst" and k.Obj == o then nxt = k break end end if nxt then break end buildKids(node) end if not nxt then break end node = nxt if o ~= inst then expanded[o] = true end end if node.Kind == "inst" and node.Obj == inst then sel = {node} selSet = setmetatable({[inst] = true}, weak) selPath = nil end rebuildFlat() for i, n in ipairs(flat) do if n == node then E.scrollToIndex(i) break end end E.onSel() end -- ---------------------------------------------------------------- input: tap, drag scroll, long press local drag = nil E.press = function(r, input) local t = input.UserInputType if t ~= Enum.UserInputType.Touch and t ~= Enum.UserInputType.MouseButton1 then return end if not r.node then return end r.pid = (r.pid or 0) + 1 local my = r.pid drag = {r = r, type = t, p0 = input.Position, moved = false, fired = false, node = r.node} local d = drag task.delay(LONG_PRESS, function() if drag ~= d or d.moved or d.fired or r.pid ~= my then return end d.fired = true E.longPress(r, d.node) end) end table.insert(conns, UIS.InputChanged:Connect(function(input) if not drag then return end local t = input.UserInputType if t == Enum.UserInputType.Touch and drag.type == Enum.UserInputType.Touch or t == Enum.UserInputType.MouseMovement and drag.type == Enum.UserInputType.MouseButton1 then local sc = E.scale() if not drag.moved and (input.Position - drag.p0).Magnitude > 8 * sc then drag.moved = true end if drag.moved then E.sy -= input.Delta.Y / sc E.sx -= input.Delta.X / sc E.clamp() E.render() end end end)) table.insert(conns, UIS.InputEnded:Connect(function(input) if not drag then return end local t = input.UserInputType if t ~= drag.type then return end local d = drag drag = nil d.r.pid = (d.r.pid or 0) + 1 if d.fired or d.moved or not d.node then return end local relX = input.Position.X - d.r.f.AbsolutePosition.X E.tap(d.node, relX) end)) E.tap = function(node, relX) local sc = E.scale() if node.Kind == "path" then E.selectPath(node.Obj) return end if node.Kind == "nil" then E.toggle(node) return end local inArrow = (not searching) and relX < ((node.Depth * INDENT) + 20) * sc if inArrow then E.toggle(node) return end local now = os.clock() if E.lastTap == node.Obj and now - (E.lastTapT or 0) < 0.32 and not searching then E.lastTap = nil E.toggle(node) return end E.lastTap, E.lastTapT = node.Obj, now if multi then E.toggleSel(node) else E.selectOnly(node) end end -- ---------------------------------------------------------------- properties panel local propHead = mk("TextLabel", { Position = UDim2.fromOffset(8, 2), Size = UDim2.new(1, -80, 0, 18), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 11, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Text = "Properties", }, propP) local propRefresh = chip(propP, "Refresh", function() E.updateProps() end) propRefresh.AnchorPoint = Vector2.new(1, 0) propRefresh.Position = UDim2.new(1, -4, 0, 2) local propList = mk("ScrollingFrame", { Position = UDim2.fromOffset(4, 24), Size = UDim2.new(1, -8, 1, -28), BackgroundColor3 = BG, BorderSizePixel = 0, ScrollBarThickness = 3, ScrollBarImageColor3 = WHITE, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(), ScrollingDirection = Enum.ScrollingDirection.Y, }, propP) corner(propList, 5) mk("UIListLayout", {SortOrder = Enum.SortOrder.LayoutOrder}, propList) local propRows = {} local apiRequested = false local function newPropRow() local r = {} r.f = mk("Frame", {Size = UDim2.new(1, 0, 0, 20), BackgroundColor3 = OUT, BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false}, propList) r.name = mk("TextLabel", { Position = UDim2.fromOffset(6, 0), Size = UDim2.new(0.42, -8, 1, 0), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 11, TextColor3 = DIM, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", }, r.f) r.val = mk("TextButton", { Position = UDim2.new(0.42, 0, 0, 0), Size = UDim2.new(0.58, -6, 1, 0), BackgroundTransparency = 1, AutoButtonColor = false, Font = Enum.Font.Code, TextSize = 11, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", }, r.f) r.box = mk("TextBox", { Position = UDim2.new(0.42, 0, 0, 1), Size = UDim2.new(0.58, -6, 1, -2), BackgroundColor3 = SURF, BorderSizePixel = 0, Font = Enum.Font.Code, TextSize = 11, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, ClearTextOnFocus = false, Text = "", Visible = false, ZIndex = 3, }, r.f) corner(r.box, 4) stroke(r.box, HOT) r.val.MouseButton1Click:Connect(function() E.beginEdit(r) end) r.box.FocusLost:Connect(function(enter) r.box.Visible = false local en = r.en if enter and en and not en.header then local ok, nv = parseValue(en.value, r.box.Text) if ok then E.setProp(en, nv) else H.notify("Property", "Invalid value for " .. tostring(en.name), "lucide:triangle-alert") end end end) return r end E.setProp = function(en, value) local ok, err if en.attr then ok, err = pcall(function() en.inst:SetAttribute(en.name, value) end) else ok, err = pcall(function() en.inst[en.name] = value end) end if not ok then H.notify("Property", tostring(err):sub(1, 90), "lucide:circle-x") end if en.name == "Name" or en.name == "Parent" then E.refreshAll() else E.render() end E.updateProps() end E.beginEdit = function(r) local en = r.en if not en or en.header then return end local v = en.value local t = typeof(v) if t == "Instance" then E.reveal(v) return end if en.ro then return end if t == "boolean" then E.setProp(en, not v) elseif t == "string" or t == "number" or t == "Color3" or t == "Vector3" or t == "Vector2" or t == "EnumItem" then r.box.Text = editText(v) r.box.Visible = true r.box:CaptureFocus() end end E.collect = function(inst) local out = {} local function head(n) out[#out + 1] = {header = true, name = n} end local function row(name, value, opts) out[#out + 1] = {name = name, value = value, inst = inst, attr = opts and opts.attr, ro = (opts and opts.ro) or false} end local class = tostring(sget(inst, "ClassName") or "?") head("Data") row("ClassName", class, {ro = true}) row("Name", sget(inst, "Name")) row("Parent", sget(inst, "Parent"), {ro = true}) local uid = sget(inst, "UniqueId") if uid ~= nil then row("UniqueId", uid, {ro = true}) end head("Properties") local names = {} for _, n in ipairs(H.propsFor(class)) do names[#names + 1] = n end table.sort(names) for _, n in ipairs(names) do if n ~= "Name" and n ~= "Parent" and n ~= "ClassName" then local ok, v = pcall(function() return inst[n] end) if ok and v ~= nil then row(n, v) end end end local getHidden = H.exec("gethiddenproperty") if getHidden then local hid = {} for _, n in ipairs(H.hiddenFor(class)) do hid[#hid + 1] = n end table.sort(hid) if #hid > 0 then head("Hidden") for _, n in ipairs(hid) do local ok, v = pcall(getHidden, inst, n) if ok and v ~= nil then row(n, v, {ro = true}) end end end end local okA, attrs = pcall(inst.GetAttributes, inst) if okA and type(attrs) == "table" and next(attrs) then head("Attributes") local keys = {} for k in pairs(attrs) do keys[#keys + 1] = tostring(k) end table.sort(keys) for _, k in ipairs(keys) do row(k, attrs[k], {attr = true}) end end local okT, tags = pcall(CollectionService.GetTags, CollectionService, inst) if okT and type(tags) == "table" and #tags > 0 then head("Tags") for _, tg in ipairs(tags) do row("Tag", tg, {ro = true}) end end return out end E.updateProps = function() local inst = E.primary() if not apiRequested then apiRequested = true task.spawn(function() pcall(H.ensureAPI) if E.primary() then E.updateProps() end end) end if not inst then propHead.Text = "Properties | nothing selected" for _, r in ipairs(propRows) do r.f.Visible = false end return end propHead.Text = "Properties | " .. tostring(sget(inst, "Name")) .. " [" .. tostring(sget(inst, "ClassName")) .. "]" local entries = E.collect(inst) for i, en in ipairs(entries) do local r = propRows[i] if not r then r = newPropRow() propRows[i] = r end r.en = en r.f.LayoutOrder = i r.f.Visible = true r.box.Visible = false if en.header then r.f.BackgroundTransparency = 0.55 r.name.Text = string.upper(en.name) r.name.Font = Enum.Font.GothamBold r.name.TextColor3 = TXT r.val.Visible = false else r.f.BackgroundTransparency = 1 r.name.Text = tostring(en.name) r.name.Font = Enum.Font.Gotham r.name.TextColor3 = DIM r.val.Visible = true r.val.Text = fmtVal(en.value) local editable = (not en.ro) and typeof(en.value) ~= "nil" r.val.TextColor3 = (editable or typeof(en.value) == "Instance") and TXT or Color3.fromRGB(170, 173, 182) end end for i = #entries + 1, #propRows do propRows[i].f.Visible = false end end -- ---------------------------------------------------------------- tools panel local toolStrip = strip(toolP, UDim2.fromOffset(4, 3), UDim2.new(1, -8, 0, 22)) local content = mk("Frame", { Position = UDim2.fromOffset(4, 28), Size = UDim2.new(1, -8, 1, -32), BackgroundColor3 = BG, BorderSizePixel = 0, ClipsDescendants = true, }, toolP) corner(content, 5) local view3 = mk("Frame", {Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0}, content) local textV = mk("ScrollingFrame", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, BorderSizePixel = 0, Visible = false, ScrollBarThickness = 4, ScrollBarImageColor3 = WHITE, ScrollingDirection = Enum.ScrollingDirection.XY, AutomaticCanvasSize = Enum.AutomaticSize.XY, CanvasSize = UDim2.new(), }, content) local textL = mk("TextLabel", { Position = UDim2.fromOffset(6, 4), Size = UDim2.fromOffset(0, 0), AutomaticSize = Enum.AutomaticSize.XY, BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 11, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, TextWrapped = false, Text = "", }, textV) E.fullText = "" E.srcCache = setmetatable({}, weak) E.setText = function(full) E.fullText = full local shown = full if #shown > 16000 then shown = shown:sub(1, 16000) .. "\n-- [truncated, use Copy for the full text]" end textL.Text = shown textV.CanvasPosition = Vector2.new(0, 0) end E.clip = function(text) local f = H.exec("setclipboard") or H.exec("toclipboard") if f then pcall(f, text) H.notify("Copied", H.one(text, 60), "lucide:copy") else H.notify("Unsupported", "Clipboard is not available.", "lucide:circle-x") end end -- 3D viewer local V = {yaw = 0.7, pitch = -0.35, zoom = 1, dist = 10, center = Vector3.new(0, 0, 0), spin = false, holder = nil, dragging = false} local vp = mk("ViewportFrame", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = BG, BorderSizePixel = 0, Ambient = Color3.fromRGB(150, 150, 150), LightColor = Color3.fromRGB(255, 255, 255), LightDirection = Vector3.new(-1, -1, -0.6), }, view3) local vcam = Instance.new("Camera") vcam.FieldOfView = 55 vcam.Parent = vp vp.CurrentCamera = vcam local vInfo = mk("TextLabel", { Position = UDim2.fromOffset(6, 4), Size = UDim2.new(1, -150, 0, 16), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 10, TextColor3 = DIM, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, Text = "Select a Part or Model", ZIndex = 5, }, view3) local function applyCam() local d = V.dist * V.zoom vcam.CFrame = CFrame.new(V.center) * CFrame.Angles(0, V.yaw, 0) * CFrame.Angles(V.pitch, 0, 0) * CFrame.new(0, 0, d) end local vbtns = mk("Frame", { AnchorPoint = Vector2.new(1, 0), Position = UDim2.new(1, -4, 0, 3), Size = UDim2.fromOffset(0, 20), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, ZIndex = 5, }, view3) mk("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, Padding = UDim.new(0, 4), SortOrder = Enum.SortOrder.LayoutOrder}, vbtns) chip(vbtns, "+", function() V.zoom = math.clamp(V.zoom * 0.8, 0.05, 20) applyCam() end, 6) chip(vbtns, "-", function() V.zoom = math.clamp(V.zoom * 1.25, 0.05, 20) applyCam() end, 6) chip(vbtns, "Reset", function() V.yaw, V.pitch, V.zoom = 0.7, -0.35, 1 applyCam() end, 6) local spinChip = chip(vbtns, "Spin: Off", function(b) V.spin = not V.spin b.Text = V.spin and "Spin: On" or "Spin: Off" end, 6) vp.InputBegan:Connect(function(input) local t = input.UserInputType if t == Enum.UserInputType.MouseButton1 or t == Enum.UserInputType.Touch then V.dragging = true V.dragType = t end end) vp.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseWheel then V.zoom = math.clamp(V.zoom * (input.Position.Z > 0 and 0.88 or 1.14), 0.05, 20) applyCam() end end) table.insert(conns, UIS.InputChanged:Connect(function(input) if not V.dragging then return end local t = input.UserInputType if t == Enum.UserInputType.Touch and V.dragType == Enum.UserInputType.Touch or t == Enum.UserInputType.MouseMovement and V.dragType == Enum.UserInputType.MouseButton1 then V.yaw -= input.Delta.X * 0.012 V.pitch = math.clamp(V.pitch - input.Delta.Y * 0.012, -1.45, 1.45) applyCam() end end)) table.insert(conns, UIS.InputEnded:Connect(function(input) if V.dragging and input.UserInputType == V.dragType then V.dragging = false end end)) local pinchStart = 1 table.insert(conns, UIS.TouchPinch:Connect(function(_positions, scale, _velocity, state) if mode ~= "3D" or not toolP.Visible then return end if state == Enum.UserInputState.Begin then pinchStart = V.zoom else V.zoom = math.clamp(pinchStart / math.max(scale, 0.05), 0.05, 20) applyCam() end end)) table.insert(conns, RunService.RenderStepped:Connect(function(dt) if V.spin and active and mode == "3D" and V.holder and toolP.Visible then V.yaw += dt * 0.7 applyCam() end end)) local function stripScripts(model) local ok, desc = pcall(model.GetDescendants, model) if not ok then return end for _, d in ipairs(desc) do if isA(d, "LuaSourceContainer") or isA(d, "Sound") then pcall(d.Destroy, d) end end if isA(model, "LuaSourceContainer") then pcall(model.Destroy, model) end end E.view3d = function(inst) if V.holder then pcall(function() V.holder:Destroy() end) V.holder = nil end if not inst then vInfo.Text = "Select a Part or Model" return end local class = tostring(sget(inst, "ClassName") or "?") local sources = {} if isA(inst, "BasePart") or isA(inst, "Model") then local okD, desc = pcall(inst.GetDescendants, inst) if okD and #desc > 3000 then vInfo.Text = class .. " is too large to preview (" .. #desc .. " instances)" return end sources[1] = inst else local okD, desc = pcall(inst.GetDescendants, inst) if okD then for _, d in ipairs(desc) do if isA(d, "BasePart") then sources[#sources + 1] = d if #sources >= 400 then break end end end end end if #sources == 0 then vInfo.Text = "Nothing to preview in " .. class return end local holder = Instance.new("Model") local parts = 0 for _, s in ipairs(sources) do local c = safeClone(s) if c then stripScripts(c) c.Parent = holder parts += 1 end end local okB, cf, size = pcall(holder.GetBoundingBox, holder) if not okB or not cf or size.Magnitude < 0.01 then holder:Destroy() vInfo.Text = "No visible geometry in " .. class return end holder.Parent = vp V.holder = holder V.center = cf.Position local radius = math.max(size.Magnitude * 0.5, 0.5) V.dist = radius / math.sin(math.rad(vcam.FieldOfView * 0.5)) V.zoom = 1 applyCam() vInfo.Text = string.format("%s | %d part(s) | %.1f x %.1f x %.1f", class, parts, size.X, size.Y, size.Z) end -- script viewer E.showScript = function(inst, tok) if not inst then E.setText("-- Select a LocalScript or ModuleScript.") return end if not isA(inst, "LuaSourceContainer") then E.setText("-- " .. tostring(sget(inst, "ClassName")) .. " is not a script.") return end if not H.viable(inst) then E.setText("-- Server-side script: the source is not available on the client.") return end local cached = E.srcCache[inst] if cached then E.setText(cached) return end E.setText("-- Decompiling...") task.spawn(function() local src, err = H.tryDecompile(inst) local okF, full = pcall(inst.GetFullName, inst) local out = src and ("-- " .. (okF and full or "?") .. "\n" .. src) or ("-- decompile failed: " .. tostring(err)) if src then E.srcCache[inst] = out end if tok == E.toolToken then E.setText(out) end end) end -- path viewer (the Path.txt of the selected item) E.pathInfo = function(inst) if not inst then return "PATH FILE\n\nSelect an item in the explorer to read its Path.txt." end local L = {} local function add(k, v) if v == nil or v == "" then return end L[#L + 1] = k .. ": " .. tostring(v) end local name = tostring(sget(inst, "Name")) local class = tostring(sget(inst, "ClassName")) L[1] = "PATH FILE | " .. name .. " [" .. class .. "]" L[2] = string.rep("=", 44) L[3] = "[PATH]" local okF, full = pcall(inst.GetFullName, inst) add("dex_path", okF and full or name) local lua, isNil = H.luaPath(inst) add("lua_access", lua) if isNil then add("nil_parented", "yes (not in the DataModel tree)") end L[#L + 1] = "[IDENTITY]" add("name", name) add("class", class) local par = sget(inst, "Parent") if par then local okP, pf = pcall(par.GetFullName, par) add("parent", (okP and pf or "?") .. " (" .. tostring(sget(par, "ClassName")) .. ")") local chain, cur, n = {}, par, 0 while cur and cur ~= game and n < 14 do n += 1 table.insert(chain, 1, tostring(sget(cur, "Name")) .. "[" .. tostring(sget(cur, "ClassName")) .. "]") cur = sget(cur, "Parent") end add("ancestors", "game > " .. table.concat(chain, " > ")) else add("parent", "nil (no parent)") end local okC, kids = pcall(inst.GetChildren, inst) if okC then add("children", #kids) local names = {} for i = 1, math.min(#kids, 20) do names[i] = tostring(sget(kids[i], "Name")) .. "[" .. tostring(sget(kids[i], "ClassName")) .. "]" end if #names > 0 then add("children_list", table.concat(names, ", ") .. (#kids > 20 and (" ... +" .. (#kids - 20) .. " more") or "")) end end local okD, desc = pcall(inst.GetDescendants, inst) if okD then add("descendants", #desc) end if isA(inst, "LuaSourceContainer") then L[#L + 1] = "[SCRIPT]" add("disabled", sget(inst, "Disabled")) add("run_context", sget(inst, "RunContext")) local gh = H.exec("getscripthash") if gh then local okH, hh = pcall(gh, inst) if okH then add("script_hash", hh) end end add("source_available", H.viable(inst) and "yes (client script)" or "no (server script)") end if H.REMOTE_USAGE[class] then L[#L + 1] = "[REMOTE]" add("usage", H.REMOTE_USAGE[class]) end local okA, attrs = pcall(inst.GetAttributes, inst) if okA and type(attrs) == "table" and next(attrs) then L[#L + 1] = "[ATTRIBUTES]" local keys = {} for k in pairs(attrs) do keys[#keys + 1] = tostring(k) end table.sort(keys) for _, k in ipairs(keys) do add(k, fmtVal(attrs[k])) end end local okT, tags = pcall(CollectionService.GetTags, CollectionService, inst) if okT and type(tags) == "table" and #tags > 0 then L[#L + 1] = "[TAGS]" add("tags", table.concat(tags, ", ")) end L[#L + 1] = "[GAME]" add("place_id", game.PlaceId) add("job_id", game.JobId) return table.concat(L, "\n") end -- connections viewer local SIGNALS = { {"BaseRemoteEvent", {"OnClientEvent"}}, {"BindableEvent", {"Event"}}, {"ClickDetector", {"MouseClick", "RightMouseClick", "MouseHoverEnter", "MouseHoverLeave"}}, {"ProximityPrompt", {"Triggered", "TriggerEnded", "PromptShown", "PromptHidden"}}, {"GuiButton", {"MouseButton1Click", "MouseButton1Down", "MouseButton1Up", "Activated", "MouseButton2Click"}}, {"TextBox", {"FocusLost", "Focused"}}, {"Humanoid", {"Died", "HealthChanged", "StateChanged", "Running", "Jumping"}}, {"BasePart", {"Touched", "TouchEnded"}}, {"Tool", {"Activated", "Equipped", "Unequipped"}}, {"ValueBase", {"Changed"}}, {"Players", {"PlayerAdded", "PlayerRemoving"}}, {"Player", {"CharacterAdded", "CharacterRemoving", "Chatted"}}, } E.connInfo = function(inst) if not inst then return "CONNECTIONS\n\nSelect an item to inspect its signal connections." end local gc = H.exec("getconnections") if not gc then return "CONNECTIONS\n\ngetconnections is not available in this executor." end local okF, full = pcall(inst.GetFullName, inst) local L = {"CONNECTIONS | " .. (okF and full or "?"), string.rep("=", 44)} local names, seen = {}, {} for _, def in ipairs(SIGNALS) do if isA(inst, def[1]) then for _, n in ipairs(def[2]) do if not seen[n] then seen[n] = true names[#names + 1] = n end end end end for _, n in ipairs({"Changed", "ChildAdded", "ChildRemoved", "DescendantAdded", "AncestryChanged", "Destroying"}) do if not seen[n] then seen[n] = true names[#names + 1] = n end end local found = 0 for _, sname in ipairs(names) do local okS, sig = pcall(function() return inst[sname] end) if okS and typeof(sig) == "RBXScriptSignal" then local okG, conns2 = pcall(gc, sig) if okG and type(conns2) == "table" and #conns2 > 0 then found += #conns2 L[#L + 1] = "" L[#L + 1] = sname .. " (" .. #conns2 .. ")" for i, c in ipairs(conns2) do if i > 25 then L[#L + 1] = " ... +" .. (#conns2 - 25) .. " more" break end local fn, en pcall(function() fn = c.Function end) pcall(function() en = c.Enabled end) local fname, fsrc = "?", "?" if type(fn) == "function" then local okI, s1, n1 = pcall(debug.info, fn, "sn") if okI then fsrc = tostring(s1) fname = (n1 ~= nil and n1 ~= "") and tostring(n1) or "anonymous" end end L[#L + 1] = string.format(" [%d] enabled=%s name=%s source=%s", i, tostring(en), fname, fsrc) end end end end if found == 0 then L[#L + 1] = "" L[#L + 1] = "No connections found on the common signals." end return table.concat(L, "\n") end -- tool modes local modeChips = {} local function addMode(key, label) modeChips[key] = chip(toolStrip, label, function() E.setMode(key) end) end addMode("3D", "3D Viewer") addMode("Script", "Script") addMode("Path", "Path") addMode("Conn", "Connections") E.setMode = function(m) mode = m view3.Visible = (m == "3D") textV.Visible = (m ~= "3D") for k, b in pairs(modeChips) do b.BackgroundColor3 = (k == m) and HOT or BTN end E.updateTools() end E.updateTools = function() if not toolP.Visible then return end local inst = E.primary() E.toolToken += 1 local tok = E.toolToken if mode == "3D" then task.delay(0.12, function() if tok == E.toolToken then E.view3d(inst) end end) elseif mode == "Script" then E.showScript(inst, tok) elseif mode == "Path" then E.setText(E.pathInfo(inst)) else E.setText(E.connInfo(inst)) end end -- tool actions local function localHRP() local ch = LP and LP.Character return ch and ch:FindFirstChild("HumanoidRootPart") or nil end E.teleport = function() local inst = E.primary() local hrp = localHRP() if not inst or not hrp then H.notify("Teleport", "Select a Part or Model and spawn a character first.", "lucide:triangle-alert") return end local cf if isA(inst, "BasePart") then cf = sget(inst, "CFrame") elseif isA(inst, "Model") then local ok, p = pcall(inst.GetPivot, inst) if ok then cf = p end end if not cf then H.notify("Teleport", "This item has no position.", "lucide:triangle-alert") return end hrp.CFrame = CFrame.new(cf.Position + Vector3.new(0, 4, 0)) H.notify("Teleport", "Teleported.", "lucide:map-pin") end E.viewObject = function() local inst = E.primary() local cam = workspace.CurrentCamera if not inst or not cam then return end local subject if isA(inst, "Humanoid") or isA(inst, "BasePart") then subject = inst elseif isA(inst, "Model") then subject = inst:FindFirstChildWhichIsA("Humanoid") or inst.PrimaryPart or inst:FindFirstChildWhichIsA("BasePart", true) end if subject and pcall(function() cam.CameraSubject = subject end) then H.notify("View Object", "Camera follows the selected object.", "lucide:eye") else H.notify("View Object", "Select a Part, Model or Humanoid.", "lucide:triangle-alert") end end E.resetCamera = function() local cam = workspace.CurrentCamera local ch = LP and LP.Character local hum = ch and ch:FindFirstChildOfClass("Humanoid") if cam and hum then pcall(function() cam.CameraSubject = hum end) H.notify("Camera", "Camera reset.", "lucide:camera") end end E.fire = function() local inst = E.primary() if not inst then return end local hrp = localHRP() if isA(inst, "TouchTransmitter") then local f = H.exec("firetouchinterest") if f and hrp then pcall(f, hrp, inst.Parent, 0) pcall(f, hrp, inst.Parent, 1) H.notify("Fire", "TouchTransmitter fired.", "lucide:zap") else H.notify("Fire", "firetouchinterest or character missing.", "lucide:circle-x") end elseif isA(inst, "ClickDetector") then local f = H.exec("fireclickdetector") if f then pcall(f, inst) H.notify("Fire", "ClickDetector fired.", "lucide:zap") else H.notify("Fire", "fireclickdetector is not available.", "lucide:circle-x") end elseif isA(inst, "ProximityPrompt") then local f = H.exec("fireproximityprompt") if f then pcall(f, inst) H.notify("Fire", "ProximityPrompt fired.", "lucide:zap") else H.notify("Fire", "fireproximityprompt is not available.", "lucide:circle-x") end else H.notify("Fire", "Select a TouchTransmitter, ClickDetector or ProximityPrompt.", "lucide:triangle-alert") end end E.saveScript = function(bytecode) local inst = E.primary() if not inst or not isA(inst, "LuaSourceContainer") then H.notify("Save", "Select a script first.", "lucide:triangle-alert") return end local wf, mf = H.exec("writefile"), H.exec("makefolder") if not wf then H.notify("Save", "writefile is not available.", "lucide:circle-x") return end task.spawn(function() local dir = "Scripting404/Saved" if mf then pcall(mf, "Scripting404") pcall(mf, dir) end local base = string.format("%s/%s.%s.%s", dir, tostring(game.PlaceId), tostring(sget(inst, "ClassName")), H.clean(sget(inst, "Name"), 40)) if bytecode then local gb = H.exec("getscriptbytecode") if not gb then H.notify("Save", "getscriptbytecode is not available.", "lucide:circle-x") return end local ok, bc = pcall(gb, inst) if ok and type(bc) == "string" then pcall(wf, base .. ".Bytecode.bin", bc) H.notify("Saved", base .. ".Bytecode.bin", "lucide:save") else H.notify("Save", "Could not read the bytecode.", "lucide:circle-x") end return end if not H.viable(inst) then H.notify("Save", "Server-side script: source is not available.", "lucide:triangle-alert") return end local src, err = H.tryDecompile(inst) if not src then src = "-- decompile failed: " .. tostring(err) end pcall(wf, base .. ".Source.lua", src) H.notify("Saved", base .. ".Source.lua", "lucide:save") end) end E.copyShown = function() if mode == "3D" then local inst = E.primary() if inst then E.clip((H.luaPath(inst))) end else E.clip(E.fullText) end end local toolSep = mk("Frame", {Size = UDim2.fromOffset(1, 14), BackgroundColor3 = OUT, BorderSizePixel = 0}, toolStrip) chip(toolStrip, "View Object", E.viewObject) chip(toolStrip, "Reset Camera", E.resetCamera) chip(toolStrip, "Teleport", E.teleport) chip(toolStrip, "Fire", E.fire) chip(toolStrip, "Save Script", function() E.saveScript(false) end) chip(toolStrip, "Bytecode", function() E.saveScript(true) end) chip(toolStrip, "Copy", E.copyShown) -- ---------------------------------------------------------------- editing actions (long press menu) E.copy = function(cut) local items = E.selInsts() if #items == 0 then return end clipboard, clipCut = {}, cut and true or false for _, o in ipairs(items) do if cut then clipboard[#clipboard + 1] = o else local c = safeClone(o) if c then clipboard[#clipboard + 1] = c end end end H.notify(cut and "Cut" or "Copy", #clipboard .. " item(s) in clipboard.", "lucide:copy") end E.paste = function() local target = E.selInsts()[1] if not target or #clipboard == 0 then return end local n = 0 for _, o in ipairs(clipboard) do local ok = pcall(function() if clipCut then o.Parent = target else local c = safeClone(o) if c then c.Parent = target end end end) if ok then n += 1 end end if clipCut then clipboard, clipCut = {}, false end E.refreshAll() H.notify("Paste", n .. " item(s) pasted.", "lucide:clipboard-paste") end E.duplicate = function() local n = 0 for _, o in ipairs(E.selInsts()) do local c = safeClone(o) if c then local ok = pcall(function() c.Parent = o.Parent end) if ok then n += 1 end end end E.refreshAll() H.notify("Duplicate", n .. " item(s) duplicated.", "lucide:copy-plus") end E.delete = function() local n = 0 for _, o in ipairs(E.selInsts()) do if pcall(function() o:Destroy() end) then n += 1 end end sel, selSet, selPath = {}, setmetatable({}, weak), nil E.refreshAll() E.onSel() H.notify("Delete", n .. " item(s) deleted.", "lucide:trash-2") end E.rename = function() local o = E.selInsts()[1] if not o then return end E.prompt("Rename", tostring(sget(o, "Name")), function(text) if text ~= "" then pcall(function() o.Name = text end) E.refreshAll() E.updateProps() end end) end E.group = function() local items = E.selInsts() if #items == 0 then return end local ok = pcall(function() local m = Instance.new("Model") m.Name = "Model" m.Parent = items[1].Parent for _, o in ipairs(items) do o.Parent = m end end) if not ok then H.notify("Group", "Could not group the selection.", "lucide:circle-x") end E.refreshAll() end E.ungroup = function() local n = 0 for _, o in ipairs(E.selInsts()) do if isA(o, "Model") or isA(o, "Folder") then pcall(function() local par = o.Parent for _, k in ipairs(o:GetChildren()) do k.Parent = par end o:Destroy() n += 1 end) end end sel, selSet, selPath = {}, setmetatable({}, weak), nil E.refreshAll() E.onSel() H.notify("Ungroup", n .. " group(s) removed.", "lucide:ungroup") end E.selectChildren = function() local n = sel[1] if not n or n.Kind ~= "inst" then return end expanded[ekey(n)] = true buildKids(n) local ns, set = {}, setmetatable({}, weak) for _, k in ipairs(n.Kids) do if k.Kind == "inst" then ns[#ns + 1] = k set[k.Obj] = true end end if #ns == 0 then H.notify("Select Children", "No children.", "lucide:info") return end sel, selSet, selPath = ns, set, nil rebuildFlat() E.onSel() end E.jumpParent = function() local o = E.selInsts()[1] local p = o and sget(o, "Parent") if p and p ~= game then E.reveal(p) else H.notify("Jump to Parent", "No parent to jump to.", "lucide:info") end end E.expandAll = function() local n = sel[1] if not n or n.Kind ~= "inst" then return end local count = 0 local function rec(node) if count > 3000 then return end expanded[ekey(node)] = true if not node.Kids then buildKids(node) end for _, k in ipairs(node.Kids) do if k.Kind == "inst" then count += 1 rec(k) end end end rec(n) rebuildFlat() end E.collapseAll = function() expanded = setmetatable({}, weak) E.sy, E.sx = 0, 0 rebuildFlat() end E.copyPath = function() local lines = {} for _, o in ipairs(E.selInsts()) do lines[#lines + 1] = (H.luaPath(o)) end if #lines > 0 then E.clip(table.concat(lines, "\n")) end end E.copyFull = function() local lines = {} for _, o in ipairs(E.selInsts()) do local ok, p = pcall(o.GetFullName, o) if ok then lines[#lines + 1] = p end end if #lines > 0 then E.clip(table.concat(lines, "\n")) end end E.insert = function() local target = E.selInsts()[1] if not target then return end E.prompt("Insert Object (ClassName)", "Part", function(text) local ok, inst = pcall(Instance.new, text) if ok and inst then local okP = pcall(function() inst.Parent = target end) if okP then E.refreshAll() H.notify("Insert", text .. " inserted.", "lucide:plus") return end pcall(function() inst:Destroy() end) end H.notify("Insert", "Invalid class name: " .. tostring(text), "lucide:circle-x") end) end -- ---------------------------------------------------------------- popups E.closeMenu = function() if E.menuOv then pcall(function() E.menuOv:Destroy() end) E.menuOv = nil end end E.prompt = function(title, default, cb) E.closeMenu() local ov = mk("TextButton", { Size = UDim2.fromScale(1, 1), BackgroundColor3 = Color3.fromRGB(0, 0, 0), BackgroundTransparency = 0.45, Text = "", AutoButtonColor = false, BorderSizePixel = 0, ZIndex = 60, }, rootF) E.menuOv = ov local box = mk("Frame", { AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.fromScale(0.5, 0.5), Size = UDim2.fromOffset(250, 94), BackgroundColor3 = SURF, BorderSizePixel = 0, ZIndex = 61, }, ov) corner(box, 8) stroke(box) mk("TextLabel", { Position = UDim2.fromOffset(10, 6), Size = UDim2.new(1, -20, 0, 18), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, Text = title, ZIndex = 62, }, box) local input = mk("TextBox", { Position = UDim2.fromOffset(10, 28), Size = UDim2.new(1, -20, 0, 26), BackgroundColor3 = BG, BorderSizePixel = 0, Font = Enum.Font.Code, TextSize = 12, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, ClearTextOnFocus = false, Text = default or "", ZIndex = 62, }, box) corner(input, 5) mk("UIPadding", {PaddingLeft = UDim.new(0, 6)}, input) local function done(ok) local text = input.Text E.closeMenu() if ok then local okC, err = pcall(cb, text) if not okC then warn("[Scripting 404] " .. tostring(err)) end end end local okB = chip(box, "OK", function() done(true) end, 62) okB.Position = UDim2.fromOffset(10, 62) local cancelB = chip(box, "Cancel", function() done(false) end, 62) cancelB.Position = UDim2.fromOffset(58, 62) input.FocusLost:Connect(function(enter) if enter then done(true) end end) ov.MouseButton1Click:Connect(function() E.closeMenu() end) end E.showMenu = function(r, items) E.closeMenu() if #items == 0 then return end local sc = E.scale() local ov = mk("TextButton", { Size = UDim2.fromScale(1, 1), BackgroundTransparency = 1, Text = "", AutoButtonColor = false, BorderSizePixel = 0, ZIndex = 40, }, rootF) E.menuOv = ov ov.MouseButton1Click:Connect(function() E.closeMenu() end) local rootW = rootF.AbsoluteSize.X / sc local rootH = rootF.AbsoluteSize.Y / sc local mw = 170 local mh = math.min(#items * 22 + 6, rootH - 8) local rx = (r.f.AbsolutePosition.X - rootF.AbsolutePosition.X) / sc local ry = (r.f.AbsolutePosition.Y - rootF.AbsolutePosition.Y) / sc local x = math.clamp(rx + (r.node and r.node.Depth * INDENT or 0) + 40, 4, math.max(4, rootW - mw - 4)) local y = ry + ROW_H if y + mh > rootH - 4 then y = ry - mh end y = math.clamp(y, 4, math.max(4, rootH - mh - 4)) local menu = mk("Frame", { Position = UDim2.fromOffset(x, y), Size = UDim2.fromOffset(mw, mh), BackgroundColor3 = SURF, BorderSizePixel = 0, ZIndex = 41, }, ov) corner(menu, 6) stroke(menu, HOT) local sf = mk("ScrollingFrame", { Position = UDim2.fromOffset(3, 3), Size = UDim2.new(1, -6, 1, -6), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 3, ScrollBarImageColor3 = WHITE, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(), ScrollingDirection = Enum.ScrollingDirection.Y, ZIndex = 42, }, menu) mk("UIListLayout", {SortOrder = Enum.SortOrder.LayoutOrder}, sf) for i, it in ipairs(items) do local b = mk("TextButton", { Size = UDim2.new(1, 0, 0, 22), BackgroundColor3 = SURF, BackgroundTransparency = 1, BorderSizePixel = 0, AutoButtonColor = false, Font = Enum.Font.Gotham, TextSize = 12, TextColor3 = TXT, TextXAlignment = Enum.TextXAlignment.Left, Text = " " .. it[1], LayoutOrder = i, ZIndex = 43, }, sf) b.MouseButton1Click:Connect(function() E.closeMenu() local ok, err = pcall(it[2]) if not ok then warn("[Scripting 404] " .. tostring(err)) end end) end end E.longPress = function(r, node) if node.Kind == "path" then E.selectPath(node.Obj) E.showMenu(r, { {"Copy Path Text", function() E.clip(E.pathInfo(node.Obj)) end}, {"Copy Path", function() E.clip((H.luaPath(node.Obj))) end}, }) return end if node.Kind == "nil" then E.showMenu(r, { {"Refresh Nil Instances", function() E.refreshAll() end}, {"Collapse All", E.collapseAll}, }) return end if not selSet[node.Obj] then E.selectOnly(node) end local insts = E.selInsts() local hasSel = #insts > 0 local one = insts[1] local anyGroup = false for _, o in ipairs(insts) do if isA(o, "Model") or isA(o, "Folder") then anyGroup = true end end local items = {} local function add(label, fn, cond) if cond == nil or cond then items[#items + 1] = {label, fn} end end add("Cut", function() E.copy(true) end, hasSel) add("Copy", function() E.copy(false) end, hasSel) add("Paste Into", E.paste, #clipboard > 0 and #insts == 1) add("Duplicate", E.duplicate, hasSel) add("Delete", E.delete, hasSel) add("Rename", E.rename, #insts == 1) add("Group", E.group, hasSel) add("Ungroup", E.ungroup, hasSel and anyGroup) add("Select Children", E.selectChildren, #insts == 1) add("Jump to Parent", E.jumpParent, #insts == 1) add("Show In Explorer", function() E.reveal(one) end, searching and one ~= nil) add("Expand All", E.expandAll, #insts == 1 and not searching) add("Collapse All", E.collapseAll, not searching) add("Copy Path", E.copyPath, hasSel) add("Copy Full Name", E.copyFull, hasSel) add("Insert Object", E.insert, #insts == 1) if one then if isA(one, "BasePart") or isA(one, "Model") then add("Teleport To", E.teleport) add("View Object", E.viewObject) end if isA(one, "TouchTransmitter") or isA(one, "ClickDetector") or isA(one, "ProximityPrompt") then add("Fire " .. tostring(sget(one, "ClassName")), E.fire) end if isA(one, "LuaSourceContainer") then add("View Script", function() E.setMode("Script") end) add("Save Script", function() E.saveScript(false) end) add("Save Script Bytecode", function() E.saveScript(true) end) end end E.showMenu(r, items) end -- ---------------------------------------------------------------- search E.setStatus = function(text) statusL.Text = text or "" end local searchTok = 0 E.search = function(q) searchTok += 1 local my = searchTok q = tostring(q or ""):match("^%s*(.-)%s*$") if q == "" then searching = false results = {} E.setStatus("") E.sy = 0 rebuildFlat() return end E.setStatus("Searching...") task.spawn(function() local ql = q:lower() local byClass = false if ql:sub(1, 6) == "class:" then byClass = true ql = ql:sub(7):match("^%s*(.-)%s*$") end local ok, desc = pcall(game.GetDescendants, game) if not ok then E.setStatus("Search failed") return end local res = {} for i, o in ipairs(desc) do if my ~= searchTok then return end local key = byClass and sget(o, "ClassName") or sget(o, "Name") if type(key) == "string" and string.find(string.lower(key), ql, 1, true) then res[#res + 1] = {Kind = "inst", Obj = o, Depth = 0} if #res >= 400 then break end end if i % 500 == 0 then task.wait() end end if my ~= searchTok then return end searching = true results = res E.sy, E.sx = 0, 0 E.setStatus(#res .. (#res >= 400 and "+" or "") .. " result(s)") rebuildFlat() end) end search:GetPropertyChangedSignal("Text"):Connect(function() if E.suppressSearch then return end searchTok += 1 local my = searchTok task.delay(0.4, function() if my ~= searchTok then return end E.search(search.Text) end) end) -- ---------------------------------------------------------------- toolbar chips local layoutChip chip(tstrip, "Refresh", function() E.refreshAll() end) chip(tstrip, "Expand Sel", E.expandAll) chip(tstrip, "Collapse All", E.collapseAll) chip(tstrip, "Path: On", function(b) showPath = not showPath b.Text = showPath and "Path: On" or "Path: Off" E.refreshAll() end) chip(tstrip, "Multi: Off", function(b) multi = not multi b.Text = multi and "Multi: On" or "Multi: Off" b.BackgroundColor3 = multi and HOT or BTN end) chip(tstrip, "Live: On", function(b) live = not live b.Text = live and "Live: On" or "Live: Off" end) chip(tstrip, "Me", function() local ch = LP and LP.Character if ch then E.reveal(ch) else H.notify("Explorer", "Your character is not available.", "lucide:triangle-alert") end end) layoutChip = chip(tstrip, "Layout: Balanced", function(b) layoutIdx = layoutIdx % #LAYOUTS + 1 b.Text = "Layout: " .. LAYOUTS[layoutIdx].name applyLayout() E.clamp() E.render() E.updateTools() end) -- ---------------------------------------------------------------- live updates and lifecycle local okAdd, addCon = pcall(function() return game.DescendantAdded:Connect(function() dirty = true end) end) if okAdd and addCon then table.insert(conns, addCon) end local okRem, remCon = pcall(function() return game.DescendantRemoving:Connect(function() dirty = true end) end) if okRem and remCon then table.insert(conns, remCon) end task.spawn(function() while not H.Window.Destroyed do task.wait(2.5) if live and dirty and active and not searching and not drag and toolP.Parent ~= nil then dirty = false local ok, changed = pcall(liveCheck, root) if ok and changed then rebuildFlat() end end end end) H.Window:OnDestroy(function() for _, c in ipairs(conns) do pcall(function() c:Disconnect() end) end if V.holder then pcall(function() V.holder:Destroy() end) end end) E.setActive = function(v) active = v and true or false if active then E.render() E.updateTools() end end applyLayout() buildKids(root) rebuildFlat() E.setMode("3D") E.updateProps() return E end local RSpy = (function() local Players = game:GetService("Players") local LP = Players.LocalPlayer local RS = { alive = true, on = false, hooked = false, busy = false, outgoing = true, incoming = true, internal = false, recordBlocked = false, showExecutor = true, ignoreClasses = {BindableEvent = true, BindableFunction = true}, ignorePlayerModule = true, autoIgnore = false, maxCalls = 100, pathStyle = "Index", bufferFromString = false, header = false, fileLog = false, groups = {}, map = {Outgoing = {}, Incoming = {}}, exInst = {}, exName = {}, blInst = {}, blName = {}, sel = nil, selIdx = 0, follow = true, mode = "code", genVer = 0, dirtyList = true, dirtyView = true, notes = {}, fileQueue = {}, total = 0, nextId = 0, conns = {}, own = {}, inInfo = {}, fnRemotes = {}, hookedFns = {}, scanning = false, uiToken = 0, internalCache = setmetatable({}, {__mode = "k"}), pmCache = setmetatable({}, {__mode = "k"}), hookState = "not installed", } local hookmm = exec("hookmetamethod") local hookfn = exec("hookfunction") local gnm = exec("getnamecallmethod") local snm = exec("setnamecallmethod") local ncc = exec("newcclosure") or function(f) return f end local chk = exec("checkcaller") or function() return false end local gcs = exec("getcallingscript") local isexec = exec("isexecutorclosure") or exec("checkclosure") local gcv = exec("getcallbackvalue") local gconns = exec("getconnections") local gnil = exec("getnilinstances") local gsft = exec("getscriptfromthread") local setclip = exec("setclipboard") or exec("toclipboard") local dec = exec("decompile") local restore = exec("restorefunction") local grm = exec("getrawmetatable") local CLASSES = {"RemoteEvent", "UnreliableRemoteEvent", "RemoteFunction", "BindableEvent", "BindableFunction"} local ISCLASS = {} for _, c in ipairs(CLASSES) do ISCLASS[c] = true end local OUTM = { FireServer = {RemoteEvent = true, UnreliableRemoteEvent = true}, InvokeServer = {RemoteFunction = true}, Fire = {BindableEvent = true}, Invoke = {BindableFunction = true}, } OUTM.fireServer = OUTM.FireServer OUTM.invokeServer = OUTM.InvokeServer OUTM.fire = OUTM.Fire OUTM.invoke = OUTM.Invoke local ISFUNC = {RemoteFunction = true, BindableFunction = true} local INSIGNAL = {RemoteEvent = "OnClientEvent", UnreliableRemoteEvent = "OnClientEvent", BindableEvent = "Event"} local INCB = {RemoteFunction = "OnClientInvoke", BindableFunction = "OnInvoke"} local COL_OUT = Color3.fromRGB(240, 180, 60) local COL_IN = Color3.fromRGB(70, 200, 120) local COL_BLOCK = Color3.fromRGB(235, 80, 80) local rrs pcall(function() rrs = game:GetService("RobloxReplicatedStorage") end) local LUA_WORDS = {} for _, w in ipairs({"and", "break", "do", "else", "elseif", "end", "false", "for", "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then", "true", "until", "while"}) do LUA_WORDS[w] = true end local DEPTH = {} local TRUNC = {} local function getCaller() for lvl = 2, 14 do local f, s = debug.info(lvl, "fs") if not f then break end if s ~= "[C]" and not RS.own[f] then return f end end return nil end RS.own[getCaller] = true local function isInternal(inst) if not rrs then return false end local cached = RS.internalCache[inst] if cached ~= nil then return cached end local res = false local p = inst for _ = 1, 12 do local ok, parent = pcall(function() return p.Parent end) if not ok or not parent then break end if parent == rrs then res = true break end p = parent end RS.internalCache[inst] = res return res end local function inPlayerModule(scr) if typeof(scr) ~= "Instance" then return false end local cached = RS.pmCache[scr] if cached ~= nil then return cached end local res = false local p = scr for _ = 1, 15 do local ok, name, parent = pcall(function() return p.Name, p.Parent end) if not ok then break end if name == "PlayerModule" then res = true break end if not parent then break end p = parent end RS.pmCache[scr] = res return res end local function snap(v, depth, seen) if type(v) ~= "table" then return v end if depth > 6 then return DEPTH end seen = seen or {} if seen[v] then return seen[v] end local out = {} seen[v] = out local n = 0 for k, x in next, v do n = n + 1 if n > 200 then out[TRUNC] = true break end out[snap(k, depth + 1, seen)] = snap(x, depth + 1, seen) end return out end RS.own[snap] = true local function nameOf(inst) local ok, n = pcall(function() return inst.Name end) if ok and type(n) == "string" then return n end return "?" end local function getGroup(inst, dir, cls) local m = RS.map[dir] local g = m[inst] if g then return g end RS.nextId = RS.nextId + 1 g = { id = RS.nextId, inst = inst, dir = dir, class = cls, name = nameOf(inst), calls = {}, count = 0, sStart = 0, sCount = 0, removed = false, } m[inst] = g RS.groups[#RS.groups + 1] = g RS.dirtyList = true return g end function RS.record(inst, dir, cls, method, args, isExec, fn, scr) if not RS.on then return nil, false end if RS.ignoreClasses[cls] then return nil, false end if not RS.internal and isInternal(inst) then return nil, false end if isExec and not RS.showExecutor then return nil, false end if RS.ignorePlayerModule and (cls == "BindableEvent" or cls == "BindableFunction") and scr and inPlayerModule(scr) then return nil, false end local name = nameOf(inst) local blocked = (RS.blInst[inst] or RS.blName[name]) and true or false if blocked and not RS.recordBlocked then return nil, true end if RS.exInst[inst] or RS.exName[name] then return nil, blocked end local g = getGroup(inst, dir, cls) if RS.autoIgnore then local now = os.clock() if now - g.sStart > 1 then g.sStart = now g.sCount = 0 end g.sCount = g.sCount + 1 if g.sCount > 15 then RS.exInst[inst] = true RS.notes[#RS.notes + 1] = {"RSpy", "Ignored " .. g.name .. " (" .. dir .. ") due to high frequency.", "lucide:info"} return nil, blocked end end local call = { args = snap(args, 0), n = args.n or 0, method = method, time = os.clock(), exec = isExec, fn = fn, script = scr, blocked = blocked, } local list = g.calls list[#list + 1] = call g.count = g.count + 1 RS.total = RS.total + 1 if #list > RS.maxCalls + math.max(10, math.floor(RS.maxCalls * 0.25)) then local drop = #list - RS.maxCalls table.move(list, drop + 1, #list, 1) for i = #list - drop + 1, #list do list[i] = nil end if RS.sel == g then RS.selIdx = math.max(1, RS.selIdx - drop) end end if RS.fileLog and #RS.fileQueue < 500 then RS.fileQueue[#RS.fileQueue + 1] = {g = g, call = call} end RS.dirtyList = true if RS.sel == g then if RS.follow then RS.selIdx = #list end RS.dirtyView = true end return call, blocked end RS.own[RS.record] = true function RS.out(old, self, method, cls, ...) local args = table.pack(...) local isExec = chk() local scr if gcs then local okS, s = pcall(gcs) if okS then scr = s end end local fn = getCaller() local call, blocked RS.busy = true local okR = pcall(function() call, blocked = RS.record(self, "Outgoing", cls, method, args, isExec, fn, scr) end) RS.busy = false if not okR then call, blocked = nil, false end if blocked then return nil end if snm then snm(method) end if ISFUNC[cls] then local res = table.pack(old(self, ...)) if call then call.result = snap(res, 0) RS.dirtyView = true end return table.unpack(res, 1, res.n) end return old(self, ...) end RS.own[RS.out] = true function RS.inc(inst, cls, kind, args) local call, blocked RS.busy = true pcall(function() call, blocked = RS.record(inst, "Incoming", cls, kind, args, false, nil, nil) end) RS.busy = false return call, blocked end RS.own[RS.inc] = true local function applyIncomingBlock(inst, cls, state) local sig = INSIGNAL[cls] if not sig or not gconns then return end local info = RS.inInfo[inst] local ok, list = pcall(function() return gconns(inst[sig]) end) if not ok or type(list) ~= "table" then return end for _, c in ipairs(list) do local ours = false pcall(function() ours = info ~= nil and c.Function == info.fn end) if not ours then pcall(function() if state then c:Disable() else c:Enable() end end) end end end local function connectEvent(inst, cls) if RS.inInfo[inst] then return end local sig = INSIGNAL[cls] local info = {cls = cls} RS.inInfo[inst] = info local fn = function(...) if not (RS.on and RS.incoming) then return end RS.inc(inst, cls, "Event", table.pack(...)) end RS.own[fn] = true info.fn = fn local ok, conn = pcall(function() return inst[sig]:Connect(fn) end) if ok and conn then info.conn = conn RS.conns[#RS.conns + 1] = conn else RS.inInfo[inst] = nil end end local function wrapCallback(inst, cls) if not gcv then return end RS.fnRemotes[inst] = cls local prop = INCB[cls] local ok, cur = pcall(gcv, inst, prop) if not ok or type(cur) ~= "function" then return end local info = RS.inInfo[inst] if info and info.det == cur then return end if not info then info = {cls = cls} RS.inInfo[inst] = info end info.orig = cur local det det = function(...) if not (RS.on and RS.incoming) then return info.orig(...) end local nm = nameOf(inst) if RS.blInst[inst] or RS.blName[nm] then if not RS.recordBlocked then return nil end end local call, blocked = RS.inc(inst, cls, "Callback", table.pack(...)) if blocked then return nil end local res = table.pack(info.orig(...)) if call then call.result = snap(res, 0) RS.dirtyView = true end return table.unpack(res, 1, res.n) end RS.own[det] = true info.det = det info.fn = info.orig pcall(function() inst[prop] = det end) end local function hookIncomingInst(inst) local ok, cls = pcall(function() return inst.ClassName end) if not ok or not ISCLASS[cls] or RS.ignoreClasses[cls] then return end if INSIGNAL[cls] then connectEvent(inst, cls) else wrapCallback(inst, cls) end end function RS.startIncoming() if RS.scanning then return end RS.scanning = true if not RS.descConn then local ok, conn = pcall(function() return game.DescendantAdded:Connect(function(inst) if RS.on and RS.incoming then hookIncomingInst(inst) end end) end) if ok and conn then RS.descConn = conn RS.conns[#RS.conns + 1] = conn end end task.spawn(function() local ok, list = pcall(function() return game:GetDescendants() end) local n = 0 if ok then for _, inst in ipairs(list) do if not RS.alive then break end hookIncomingInst(inst) n = n + 1 if n % 400 == 0 then task.wait() end end end if gnil and RS.alive then local okN, nils = pcall(gnil) if okN and type(nils) == "table" then for _, inst in ipairs(nils) do if not RS.alive then break end hookIncomingInst(inst) end end end RS.scanning = false end) end function RS.install() if RS.hooked then return true end if not hookmm or not gnm then RS.hookState = "unsupported" return false end local old local function nc(self, ...) if RS.on and RS.outgoing then local method = gnm() local allowed = OUTM[method] if allowed and typeof(self) == "Instance" and not RS.busy then local okc, cls = pcall(function() return self.ClassName end) if okc and allowed[cls] then return RS.out(old, self, method, cls, ...) end end end return old(self, ...) end RS.own[nc] = true local ok = pcall(function() old = hookmm(game, "__namecall", ncc(nc)) end) if not ok or not old then RS.hookState = "failed" return false end RS.hooked = true RS.hookState = "namecall" if hookfn then local specs = { {cls = "BindableFunction", m = "Invoke"}, {cls = "BindableEvent", m = "Fire"}, {cls = "RemoteFunction", m = "InvokeServer"}, {cls = "RemoteEvent", m = "FireServer"}, {cls = "UnreliableRemoteEvent", m = "FireServer"}, } local added = false for _, sp in ipairs(specs) do local okI, inst = pcall(Instance.new, sp.cls) if okI and inst then local okF, f = pcall(function() return inst[sp.m] end) pcall(function() inst:Destroy() end) if okF and type(f) == "function" and not RS.hookedFns[f] then local method = sp.m local orig local function hf(self, ...) if RS.on and RS.outgoing and typeof(self) == "Instance" and not RS.busy then local okc, c = pcall(function() return self.ClassName end) if okc and ISCLASS[c] and OUTM[method][c] then return RS.out(orig, self, method, c, ...) end end return orig(self, ...) end RS.own[hf] = true local okH, res = pcall(hookfn, f, ncc(hf)) if okH and res then orig = res RS.hookedFns[f] = true added = true end end end end if added then RS.hookState = "namecall + function" end end return true end local function esc(s) local valid = utf8.len(s) ~= nil local pattern = valid and '[%c"\\]' or '[%c"\\\127-\255]' return (string.gsub(s, pattern, function(c) if c == '"' then return '\\"' end if c == "\\" then return "\\\\" end if c == "\n" then return "\\n" end if c == "\r" then return "\\r" end if c == "\t" then return "\\t" end return string.format("\\%03d", string.byte(c)) end)) end local function isIdent(name) return type(name) == "string" and string.match(name, "^[%a_][%w_]*$") ~= nil and not LUA_WORDS[name] end local function nilExpr(inst) local name, cls = nameOf(inst), "Instance" pcall(function() cls = inst.ClassName end) return '(function() for _, v in next, getnilinstances() do if v.Name == "' .. esc(name) .. '" and v.ClassName == "' .. esc(cls) .. '" then return v end end end)()' end local function pathOf(inst) if inst == game then return "game" end local chain = {} local cur = inst local root for _ = 1, 60 do if cur == game then root = "game" break end if cur == LP then root = 'game:GetService("Players").LocalPlayer' break end local ok, parent, name, cls = pcall(function() return cur.Parent, cur.Name, cur.ClassName end) if not ok or parent == nil then root = nil chain = nil break end table.insert(chain, 1, {name = name, cls = cls}) cur = parent end if not chain or not root then return nil end local parts = {root} for i, el in ipairs(chain) do if i == 1 and root == "game" then parts[#parts + 1] = ':GetService("' .. esc(el.cls) .. '")' elseif RS.pathStyle == "WaitForChild" then parts[#parts + 1] = ':WaitForChild("' .. esc(el.name) .. '")' elseif RS.pathStyle == "FindFirstChild" then parts[#parts + 1] = ':FindFirstChild("' .. esc(el.name) .. '")' elseif isIdent(el.name) then parts[#parts + 1] = "." .. el.name else parts[#parts + 1] = '["' .. esc(el.name) .. '"]' end end return table.concat(parts) end local function instExpr(inst) return pathOf(inst) or nilExpr(inst) end local function serNum(n) if n ~= n then return "0/0" end if n == math.huge then return "math.huge" end if n == -math.huge then return "-math.huge" end if n % 1 == 0 and math.abs(n) < 1e15 then return string.format("%d", n) end return tostring(n) end local function cmt(text) return "--[[" .. string.gsub(tostring(text), "%]%]", "] ]") .. "]]" end local ser local function serTable(v, indent, seen) if seen[v] then return "nil " .. cmt("cyclic table") end seen[v] = true local keys = {} local trunc = false for k in next, v do if k == TRUNC then trunc = true else keys[#keys + 1] = k end end local function rank(x) local t = type(x) if t == "number" then return 1 end if t == "string" then return 2 end return 3 end table.sort(keys, function(a, b) local ra, rb = rank(a), rank(b) if ra ~= rb then return ra < rb end if ra == 3 then return tostring(a) < tostring(b) end return a < b end) local pad = string.rep(" ", indent + 1) local lines = {} for _, k in ipairs(keys) do local ks if type(k) == "string" then ks = '["' .. esc(k) .. '"]' else ks = "[" .. ser(k, indent + 1, seen) .. "]" end lines[#lines + 1] = pad .. ks .. " = " .. ser(v[k], indent + 1, seen) end if trunc then lines[#lines + 1] = pad .. cmt("truncated") end seen[v] = nil if #lines == 0 then return "{}" end return "{\n" .. table.concat(lines, ",\n") .. "\n" .. string.rep(" ", indent) .. "}" end function ser(v, indent, seen) if v == DEPTH then return "nil " .. cmt("depth limit") end local t = typeof(v) if t == "string" then return '"' .. esc(v) .. '"' end if t == "number" then return serNum(v) end if t == "boolean" then return tostring(v) end if t == "nil" then return "nil" end if t == "table" then return serTable(v, indent, seen) end if t == "Instance" then return instExpr(v) end if t == "Vector3" then return "Vector3.new(" .. serNum(v.X) .. ", " .. serNum(v.Y) .. ", " .. serNum(v.Z) .. ")" end if t == "Vector2" then return "Vector2.new(" .. serNum(v.X) .. ", " .. serNum(v.Y) .. ")" end if t == "CFrame" then local comps = {v:GetComponents()} for i, c in ipairs(comps) do comps[i] = serNum(c) end return "CFrame.new(" .. table.concat(comps, ", ") .. ")" end if t == "Color3" then return "Color3.new(" .. serNum(v.R) .. ", " .. serNum(v.G) .. ", " .. serNum(v.B) .. ")" end if t == "UDim2" then return "UDim2.new(" .. serNum(v.X.Scale) .. ", " .. serNum(v.X.Offset) .. ", " .. serNum(v.Y.Scale) .. ", " .. serNum(v.Y.Offset) .. ")" end if t == "UDim" then return "UDim.new(" .. serNum(v.Scale) .. ", " .. serNum(v.Offset) .. ")" end if t == "BrickColor" then return 'BrickColor.new("' .. esc(v.Name) .. '")' end if t == "EnumItem" or t == "Enum" then return tostring(v) end if t == "Ray" then return "Ray.new(" .. ser(v.Origin, indent, seen) .. ", " .. ser(v.Direction, indent, seen) .. ")" end if t == "Rect" then return "Rect.new(" .. serNum(v.Min.X) .. ", " .. serNum(v.Min.Y) .. ", " .. serNum(v.Max.X) .. ", " .. serNum(v.Max.Y) .. ")" end if t == "NumberRange" then return "NumberRange.new(" .. serNum(v.Min) .. ", " .. serNum(v.Max) .. ")" end if t == "buffer" and buffer then local okB, s = pcall(function() return buffer.readstring(v, 0, math.min(buffer.len(v), 4096)) end) if not okB then return "nil " .. cmt("buffer") end if RS.bufferFromString then return 'buffer.fromstring("' .. esc(s) .. '")' end return '(function() local b = buffer.create(' .. #s .. ') buffer.writestring(b, 0, "' .. esc(s) .. '") return b end)()' end if t == "function" then local nm = "anonymous" pcall(function() nm = debug.info(v, "n") or "anonymous" end) if nm == "" then nm = "anonymous" end return "nil " .. cmt("function: " .. nm) end return "nil " .. cmt(t) end function RS.gen(g, call) if call.code and call.codeVer == RS.genVer then return call.code end local out = {} if RS.header then out[#out + 1] = "-- Generated by Scripting 404 RSpy" out[#out + 1] = "" end if call.blocked then out[#out + 1] = cmt("blocked call") end local n = call.n or 0 if n > 0 then local seen = {} local parts = {} for i = 1, n do parts[#parts + 1] = " [" .. i .. "] = " .. ser(call.args[i], 1, seen) end out[#out + 1] = "local args = {\n" .. table.concat(parts, ",\n") .. "\n}" out[#out + 1] = "" end local path = instExpr(g.inst) local ref = path if string.sub(path, 1, 1) == "(" then out[#out + 1] = "local remote = " .. path ref = "remote" end local unp = n > 0 and ("table.unpack(args, 1, " .. n .. ")") or "" if g.dir == "Outgoing" then out[#out + 1] = ref .. ":" .. (call.method or "FireServer") .. "(" .. unp .. ")" elseif g.class == "RemoteFunction" or g.class == "BindableFunction" then out[#out + 1] = 'getcallbackvalue(' .. ref .. ', "' .. INCB[g.class] .. '")(' .. unp .. ")" else out[#out + 1] = "firesignal(" .. ref .. "." .. INSIGNAL[g.class] .. (n > 0 and (", " .. unp) or "") .. ")" end if call.result and (call.result.n or 0) > 0 then local seen = {} local rl = {} for i = 1, call.result.n do rl[#rl + 1] = "[" .. i .. "] = " .. ser(call.result[i], 0, seen) end out[#out + 1] = "" out[#out + 1] = "--[=[\nResult:\n" .. table.concat(rl, "\n") .. "\n]=]" end local code = table.concat(out, "\n") if #code > 60000 then code = string.sub(code, 1, 60000) .. "\n" .. cmt("output truncated") end call.code = code call.codeVer = RS.genVer return code end local function resolveIncoming(g, call) if call.fn or g.dir ~= "Incoming" then return end local info = RS.inInfo[g.inst] if INCB[g.class] then if info and info.orig then call.fn = info.orig end elseif gconns and INSIGNAL[g.class] then local ok, list = pcall(function() return gconns(g.inst[INSIGNAL[g.class]]) end) if ok and type(list) == "table" then for _, c in ipairs(list) do local f pcall(function() f = c.Function end) if type(f) == "function" and not (info and f == info.fn) then call.fn = f break end end end end if call.fn and not call.script then local s pcall(function() s = rawget(getfenv(call.fn), "script") end) if typeof(s) == "Instance" then call.script = s end end end function RS.funcInfo(g, call) resolveIncoming(g, call) local lines = {} local function add(k, v) lines[#lines + 1] = k .. ": " .. tostring(v) end add("Remote", g.name .. " (" .. g.class .. ")") add("Path", pathOf(g.inst) or "nil instance") add("Direction", g.dir) add("Method", call.method or "-") add("Arguments", call.n or 0) add("Executor call", call.exec and "yes" or "no") add("Blocked", call.blocked and "yes" or "no") if call.script then add("Script", pathOf(call.script) or nameOf(call.script)) else add("Script", "unavailable") end local fn = call.fn if fn then local function dbg(what) local ok, a, b = pcall(debug.info, fn, what) if ok then return a, b end return nil end add("Function", dbg("n") or "anonymous") add("Source", dbg("s") or "?") add("Line", dbg("l") or "?") local np, va = dbg("a") add("Parameters", tostring(np) .. (va and " (vararg)" or "")) if isexec then local ok, v = pcall(isexec, fn) if ok then add("Executor closure", v and "yes" or "no") end end local d = debug if d.getupvalues then local ok, v = pcall(d.getupvalues, fn) if ok and type(v) == "table" then local c = 0 for _ in pairs(v) do c = c + 1 end add("Upvalues", c) end end if d.getconstants then local ok, v = pcall(d.getconstants, fn) if ok and type(v) == "table" then add("Constants", #v) end end if d.getprotos then local ok, v = pcall(d.getprotos, fn) if ok and type(v) == "table" then add("Protos", #v) end end else add("Function", "unavailable") end return table.concat(lines, "\n") end function RS.clearLogs() for _, g in ipairs(RS.groups) do g.removed = true end RS.groups = {} RS.map = {Outgoing = {}, Incoming = {}} RS.sel = nil RS.selIdx = 0 RS.total = 0 RS.dirtyList = true RS.dirtyView = true end function RS.exclude(g, mode) if mode == "i" then RS.exInst[g.inst] = true else RS.exName[g.name] = true end for i = #RS.groups, 1, -1 do local x = RS.groups[i] if (mode == "i" and x.inst == g.inst) or (mode == "n" and x.name == g.name) then x.removed = true RS.map[x.dir][x.inst] = nil table.remove(RS.groups, i) if RS.sel == x then RS.sel = nil RS.selIdx = 0 end end end RS.dirtyList = true RS.dirtyView = true end function RS.clearExclusions() RS.exInst = {} RS.exName = {} end function RS.block(g, mode) if mode == "i" then RS.blInst[g.inst] = true else RS.blName[g.name] = true end for _, x in ipairs(RS.groups) do if x.dir == "Incoming" and ((mode == "i" and x.inst == g.inst) or (mode == "n" and x.name == g.name)) then applyIncomingBlock(x.inst, x.class, true) end end RS.dirtyList = true end function RS.clearBlocklist() RS.blInst = {} RS.blName = {} for inst, info in pairs(RS.inInfo) do if info.cls and INSIGNAL[info.cls] then applyIncomingBlock(inst, info.cls, false) end end RS.dirtyList = true end function RS.setToggleObject(obj) RS.toggleObj = obj end function RS.setEnabled(v) v = v == true if v then if not RS.hooked and not RS.install() then RS.on = false notify("RSpy", "Hooks are not supported by this executor.", "lucide:circle-x") if RS.toggleObj then task.defer(function() pcall(function() RS.toggleObj:SetValue(false) end) end) end RS.dirtyView = true return false end RS.on = true if RS.incoming then RS.startIncoming() end else RS.on = false end RS.dirtyList = true RS.dirtyView = true return true end function RS.toggle() local target = not RS.on if RS.toggleObj then pcall(function() RS.toggleObj:SetValue(target) end) end if RS.on ~= target then RS.setEnabled(target) end end function RS.setOutgoing(v) RS.outgoing = v == true end function RS.setIncoming(v) RS.incoming = v == true if RS.incoming and RS.on then RS.startIncoming() end end function RS.setInternal(v) RS.internal = v == true end function RS.setRecordBlocked(v) RS.recordBlocked = v == true end function RS.setShowExecutor(v) RS.showExecutor = v == true end function RS.setIgnorePlayerModule(v) RS.ignorePlayerModule = v == true end function RS.setAutoIgnore(v) RS.autoIgnore = v == true end function RS.setMaxCalls(v) v = tonumber(v) if v then RS.maxCalls = math.clamp(math.floor(v), 10, 500) end end function RS.setIgnoredClasses(v) local out = {} if type(v) == "table" then for k, x in pairs(v) do if type(k) == "number" and type(x) == "string" then out[x] = true elseif type(k) == "string" and x == true then out[k] = true end end elseif type(v) == "string" and v ~= "" then out[v] = true end RS.ignoreClasses = out if RS.on and RS.incoming then RS.startIncoming() end end function RS.setPathStyle(v) if v == "Index" or v == "WaitForChild" or v == "FindFirstChild" then RS.pathStyle = v RS.genVer = RS.genVer + 1 RS.dirtyView = true end end function RS.setBufferFromString(v) RS.bufferFromString = v == true RS.genVer = RS.genVer + 1 RS.dirtyView = true end function RS.setHeader(v) RS.header = v == true RS.genVer = RS.genVer + 1 RS.dirtyView = true end function RS.filePath() return "Scripting404/RSpy/" .. tostring(game.PlaceId) .. ".txt" end function RS.setFileLog(v) v = v == true if v then local af = exec("appendfile") local wf = exec("writefile") if not (af and wf) then notify("RSpy", "File logging is not supported by this executor.", "lucide:circle-x") RS.fileLog = false if RS.fileToggle then task.defer(function() pcall(function() RS.fileToggle:SetValue(false) end) end) end return end local mf, isf, isfile = exec("makefolder"), exec("isfolder"), exec("isfile") pcall(function() if mf and isf then if not isf("Scripting404") then mf("Scripting404") end if not isf("Scripting404/RSpy") then mf("Scripting404/RSpy") end end if isfile and not isfile(RS.filePath()) then wf(RS.filePath(), "") end end) end RS.fileLog = v if not v then RS.fileQueue = {} end end function RS.flushFile() if not RS.fileLog or #RS.fileQueue == 0 then return end local af = exec("appendfile") if not af then return end local out = {} for _ = 1, math.min(#RS.fileQueue, 25) do local item = table.remove(RS.fileQueue, 1) local ok, code = pcall(RS.gen, item.g, item.call) out[#out + 1] = "-- [" .. os.date("%H:%M:%S") .. "] " .. item.g.dir .. " " .. item.g.class .. "\n" .. (ok and code or "") end pcall(af, RS.filePath(), table.concat(out, "\n\n") .. "\n\n") end function RS.status() local nOut, nIn = 0, 0 for _, g in ipairs(RS.groups) do if g.dir == "Outgoing" then nOut = nOut + 1 else nIn = nIn + 1 end end return "State: " .. (RS.on and "ON" or "OFF") .. "\nHooks: " .. RS.hookState .. "\nRemotes: " .. nOut .. " out / " .. nIn .. " in\nCalls: " .. RS.total end function RS.destroy() RS.alive = false RS.on = false for _, c in ipairs(RS.conns) do pcall(function() c:Disconnect() end) end for inst, info in pairs(RS.inInfo) do if info.det and gcv then pcall(function() local prop = INCB[info.cls] if gcv(inst, prop) == info.det then inst[prop] = info.orig end end) end if info.cls and INSIGNAL[info.cls] then applyIncomingBlock(inst, info.cls, false) end end if restore then for f in pairs(RS.hookedFns) do pcall(restore, f) end if RS.hooked and grm then pcall(function() restore(grm(game).__namecall) end) end end end local COL = { kw = "#C792EA", str = "#A5D6A7", num = "#F78C6C", const = "#82AAFF", com = "#6B7280", fn = "#FFCB6B", txt = "#E5E7EB", } local function rich(s) return (string.gsub(s, "[&<>\"']", {["&"] = "&", ["<"] = "<", [">"] = ">", ['"'] = """, ["'"] = "'"})) end local function span(color, s) return '<font color="' .. color .. '">' .. rich(s) .. "</font>" end local function hlLine(line, st) if #line > 600 then line = string.sub(line, 1, 600) .. " ..." end local out = {} local i, n = 1, #line if st.block then local e = string.find(line, st.block, 1, true) if not e then return span(COL.com, line) end local stop = e + #st.block - 1 out[#out + 1] = span(COL.com, string.sub(line, 1, stop)) st.block = nil i = stop + 1 end while i <= n do local c = string.sub(line, i, i) if c == "-" and string.sub(line, i, i + 1) == "--" then local eq = string.match(line, "^%-%-%[(=*)%[", i) if eq then local close = "]" .. eq .. "]" local e = string.find(line, close, i + 4 + #eq, true) if e then local stop = e + #close - 1 out[#out + 1] = span(COL.com, string.sub(line, i, stop)) i = stop + 1 else out[#out + 1] = span(COL.com, string.sub(line, i)) st.block = close i = n + 1 end else out[#out + 1] = span(COL.com, string.sub(line, i)) i = n + 1 end elseif c == '"' or c == "'" then local j = i + 1 while j <= n do local d = string.sub(line, j, j) if d == "\\" then j = j + 2 elseif d == c then break else j = j + 1 end end out[#out + 1] = span(COL.str, string.sub(line, i, math.min(j, n))) i = j + 1 elseif string.find(c, "%d") then local _, e = string.find(line, "^%d+%.?%d*", i) local _, e2 = string.find(line, "^[eE][%+%-]?%d+", e + 1) if e2 then e = e2 end out[#out + 1] = span(COL.num, string.sub(line, i, e)) i = e + 1 elseif string.find(c, "[%a_]") then local _, e = string.find(line, "^[%a_][%w_]*", i) local word = string.sub(line, i, e) local nextc = string.match(line, "^%s*(.)", e + 1) local color = COL.txt if word == "nil" or word == "true" or word == "false" then color = COL.const elseif LUA_WORDS[word] then color = COL.kw elseif nextc == "(" or word == "game" or word == "workspace" then color = COL.fn end out[#out + 1] = span(color, word) i = e + 1 else local _, e = string.find(line, "^[^%a_%d\"'%-]+", i) if not e then e = i end out[#out + 1] = rich(string.sub(line, i, e)) i = e + 1 end end return table.concat(out) end function RS.build(Container, Custom) RS.uiToken = RS.uiToken + 1 local token = RS.uiToken local th = Custom:GetTheme() or {} local BG = th.Background or Color3.fromRGB(8, 9, 12) local SURF = th.Surface or Color3.fromRGB(16, 18, 22) local OUT = th.Outline or Color3.fromRGB(40, 43, 50) local TXT = th.Text or Color3.fromRGB(255, 255, 255) local DIM = th.Placeholder or Color3.fromRGB(150, 153, 162) local BTN = th.Button or Color3.fromRGB(28, 30, 36) local SELC = Color3.fromRGB(44, 48, 62) local GRID_H = 4 * 26 + 3 * 4 + 6 local function mk(class, props, parent) return Custom:Create(class, props, parent) end local function corner(obj, r) mk("UICorner", {CornerRadius = UDim.new(0, r or 6)}, obj) end local function stroke(obj) mk("UIStroke", {Color = OUT, Thickness = 1, ApplyStrokeMode = Enum.ApplyStrokeMode.Border}, obj) end local root = mk("Frame", {Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0}, Container) local left = mk("Frame", { Size = UDim2.new(0.3, -3, 1, 0), BackgroundColor3 = SURF, BorderSizePixel = 0, }, root) corner(left, 6) stroke(left) mk("TextLabel", { Position = UDim2.new(0, 8, 0, 0), Size = UDim2.new(1, -56, 0, 24), BackgroundTransparency = 1, Font = Enum.Font.GothamBold, TextSize = 12, TextColor3 = TXT, Text = "Remotes", TextXAlignment = Enum.TextXAlignment.Left, }, left) local chip = mk("TextButton", { Position = UDim2.new(1, -46, 0, 3), Size = UDim2.new(0, 40, 0, 18), BackgroundColor3 = BTN, AutoButtonColor = false, BorderSizePixel = 0, Font = Enum.Font.GothamBold, TextSize = 10, TextColor3 = COL_BLOCK, Text = "OFF", }, left) corner(chip, 4) local list = mk("ScrollingFrame", { Position = UDim2.new(0, 4, 0, 26), Size = UDim2.new(1, -8, 1, -30), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 3, ScrollBarImageColor3 = TXT, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(), ScrollingDirection = Enum.ScrollingDirection.Y, }, left) mk("UIListLayout", {SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 3)}, list) local right = mk("Frame", { Position = UDim2.new(0.3, 3, 0, 0), Size = UDim2.new(0.7, -3, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, }, root) local codePanel = mk("Frame", { Size = UDim2.new(1, 0, 1, -(GRID_H + 4)), BackgroundColor3 = BG, BorderSizePixel = 0, ClipsDescendants = true, }, right) corner(codePanel, 6) stroke(codePanel) local title = mk("TextLabel", { Position = UDim2.new(0, 8, 0, 0), Size = UDim2.new(1, -110, 0, 22), BackgroundTransparency = 1, Font = Enum.Font.GothamMedium, TextSize = 11, TextColor3 = DIM, Text = "", TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, }, codePanel) local nextBtn = mk("TextButton", { Position = UDim2.new(1, -26, 0, 2), Size = UDim2.new(0, 22, 0, 18), BackgroundColor3 = BTN, AutoButtonColor = false, BorderSizePixel = 0, Font = Enum.Font.GothamBold, TextSize = 11, TextColor3 = TXT, Text = ">", }, codePanel) corner(nextBtn, 4) local counter = mk("TextLabel", { Position = UDim2.new(1, -84, 0, 2), Size = UDim2.new(0, 54, 0, 18), BackgroundTransparency = 1, Font = Enum.Font.GothamMedium, TextSize = 11, TextColor3 = TXT, Text = "0/0", }, codePanel) local prevBtn = mk("TextButton", { Position = UDim2.new(1, -108, 0, 2), Size = UDim2.new(0, 22, 0, 18), BackgroundColor3 = BTN, AutoButtonColor = false, BorderSizePixel = 0, Font = Enum.Font.GothamBold, TextSize = 11, TextColor3 = TXT, Text = "<", }, codePanel) corner(prevBtn, 4) local scroll = mk("ScrollingFrame", { Position = UDim2.new(0, 0, 0, 24), Size = UDim2.new(1, 0, 1, -24), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, ScrollBarImageColor3 = TXT, ScrollBarImageTransparency = 0.3, AutomaticCanvasSize = Enum.AutomaticSize.XY, CanvasSize = UDim2.new(), ScrollingDirection = Enum.ScrollingDirection.XY, Active = true, }, codePanel) local body = mk("Frame", { Size = UDim2.new(0, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.XY, BackgroundTransparency = 1, BorderSizePixel = 0, }, scroll) mk("UIListLayout", {SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 0)}, body) mk("UIPadding", {PaddingLeft = UDim.new(0, 6), PaddingTop = UDim.new(0, 4), PaddingBottom = UDim.new(0, 6), PaddingRight = UDim.new(0, 8)}, body) local function renderText(text, plain) for _, ch in ipairs(body:GetChildren()) do if ch:IsA("Frame") then ch:Destroy() end end local lines = {} for ln in string.gmatch(text .. "\n", "([^\n]*)\n") do lines[#lines + 1] = ln if #lines >= 800 then lines[#lines + 1] = "-- output truncated, use Copy Code" break end end local st = {} local i, chunkNo = 1, 0 while i <= #lines do local buf, nums, size = {}, {}, 0 while i <= #lines and size < 7000 do local line = lines[i] local rendered if plain then if #line > 600 then line = string.sub(line, 1, 600) .. " ..." end rendered = rich(line) else rendered = hlLine(line, st) end buf[#buf + 1] = rendered nums[#nums + 1] = tostring(i) size = size + #rendered + 1 i = i + 1 end chunkNo = chunkNo + 1 local chunk = mk("Frame", { Size = UDim2.new(0, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.XY, BackgroundTransparency = 1, BorderSizePixel = 0, LayoutOrder = chunkNo, }, body) mk("UIListLayout", {FillDirection = Enum.FillDirection.Horizontal, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 8)}, chunk) mk("TextLabel", { Size = UDim2.new(0, 30, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 13, TextColor3 = DIM, TextXAlignment = Enum.TextXAlignment.Right, TextYAlignment = Enum.TextYAlignment.Top, Text = table.concat(nums, "\n"), LayoutOrder = 1, }, chunk) mk("TextLabel", { Size = UDim2.new(0, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.XY, BackgroundTransparency = 1, Font = Enum.Font.Code, TextSize = 13, TextColor3 = Color3.fromRGB(229, 231, 235), RichText = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, TextWrapped = false, Text = table.concat(buf, "\n"), LayoutOrder = 2, }, chunk) end end local rows = {} local function curCall() local g = RS.sel if not g or g.removed then return nil, nil end return g, g.calls[RS.selIdx] end local function copy(text, label) if setclip then pcall(setclip, text) notify("Copied", label or "Copied to clipboard.", "lucide:copy") else notify("Unsupported", "Clipboard is not available.", "lucide:circle-x") end end local function selectGroup(g) RS.sel = g RS.selIdx = #g.calls RS.follow = true RS.mode = "code" RS.dirtyView = true RS.dirtyList = true end local function makeRow(g) local row = mk("TextButton", { Size = UDim2.new(1, -4, 0, 26), BackgroundColor3 = BTN, AutoButtonColor = false, BorderSizePixel = 0, Text = "", LayoutOrder = g.id, }, list) corner(row, 4) local bar = mk("Frame", { Position = UDim2.new(0, 3, 0, 4), Size = UDim2.new(0, 4, 1, -8), BorderSizePixel = 0, BackgroundColor3 = g.dir == "Outgoing" and COL_OUT or COL_IN, }, row) corner(bar, 2) mk("TextLabel", { Position = UDim2.new(0, 12, 0, 0), Size = UDim2.new(1, -44, 1, 0), BackgroundTransparency = 1, Font = Enum.Font.Gotham, TextSize = 12, TextColor3 = TXT, Text = g.name, TextXAlignment = Enum.TextXAlignment.Left, TextTruncate = Enum.TextTruncate.AtEnd, }, row) local ct = mk("TextLabel", { Position = UDim2.new(1, -32, 0, 0), Size = UDim2.new(0, 28, 1, 0), BackgroundTransparency = 1, Font = Enum.Font.GothamMedium, TextSize = 10, TextColor3 = DIM, Text = "", TextXAlignment = Enum.TextXAlignment.Right, }, row) row.Activated:Connect(function() selectGroup(g) end) return {frame = row, bar = bar, count = ct, shown = -1, selected = false, blocked = false} end local function refreshList() for g, r in pairs(rows) do if g.removed then pcall(function() r.frame:Destroy() end) rows[g] = nil end end for _, g in ipairs(RS.groups) do local r = rows[g] if not r then r = makeRow(g) rows[g] = r end if r.shown ~= g.count then r.shown = g.count r.count.Text = g.count > 999 and "999+" or tostring(g.count) end local isBlocked = (RS.blInst[g.inst] or RS.blName[g.name]) and true or false if r.blocked ~= isBlocked then r.blocked = isBlocked r.bar.BackgroundColor3 = isBlocked and COL_BLOCK or (g.dir == "Outgoing" and COL_OUT or COL_IN) end local isSel = RS.sel == g if r.selected ~= isSel then r.selected = isSel r.frame.BackgroundColor3 = isSel and SELC or BTN end end end local lastKey local function refreshView() local g, call = curCall() local key local text, plain if not g then if RS.on then text, plain = "Select a remote from the list.", true else text, plain = "RSpy is off. Enable it in RSpy Settings.", true end title.Text = "" counter.Text = "0/0" key = "none|" .. tostring(RS.on) elseif not call then text, plain = "No calls recorded.", true title.Text = g.name counter.Text = "0/0" key = "empty|" .. g.id else title.Text = g.name .. " | " .. g.dir .. " | " .. g.class .. (call.exec and " | executor" or "") counter.Text = RS.selIdx .. "/" .. #g.calls if RS.mode == "info" then text, plain = RS.funcInfo(g, call), true else text, plain = RS.gen(g, call), false end key = RS.mode .. "|" .. g.id .. "|" .. RS.selIdx .. "|" .. RS.genVer .. "|" .. (call.result and "r" or "n") .. "|" .. (RS.follow and g.count or 0) end if key ~= lastKey then lastKey = key renderText(text, plain) scroll.CanvasPosition = Vector2.new(0, 0) end end prevBtn.Activated:Connect(function() local g = RS.sel if not g or #g.calls == 0 then return end RS.selIdx = math.max(1, RS.selIdx - 1) RS.follow = false RS.dirtyView = true end) nextBtn.Activated:Connect(function() local g = RS.sel if not g or #g.calls == 0 then return end RS.selIdx = math.min(#g.calls, RS.selIdx + 1) RS.follow = RS.selIdx == #g.calls RS.dirtyView = true end) chip.Activated:Connect(function() RS.toggle() end) local grid = mk("Frame", { Position = UDim2.new(0, 0, 1, -GRID_H), Size = UDim2.new(1, 0, 0, GRID_H), BackgroundTransparency = 1, BorderSizePixel = 0, }, right) mk("UIGridLayout", { CellSize = UDim2.new(1 / 3, -4, 0, 26), CellPadding = UDim2.fromOffset(4, 4), SortOrder = Enum.SortOrder.LayoutOrder, HorizontalAlignment = Enum.HorizontalAlignment.Left, }, grid) local order = 0 local function button(text, fn) order = order + 1 local b = mk("TextButton", { BackgroundColor3 = BTN, AutoButtonColor = true, BorderSizePixel = 0, Font = Enum.Font.GothamMedium, TextSize = 12, TextColor3 = TXT, Text = text, LayoutOrder = order, }, grid) corner(b, 4) stroke(b) mk("Frame", { Position = UDim2.new(0, 4, 0, 5), Size = UDim2.new(0, 4, 1, -10), BackgroundColor3 = TXT, BorderSizePixel = 0, }, b) b.Activated:Connect(function() local ok, err = pcall(fn) if not ok then notify("RSpy", tostring(err), "lucide:circle-x") end end) return b end button("Copy Code", function() local g, call = curCall() if not call then return notify("RSpy", "Select a call first.", "lucide:info") end copy(RS.gen(g, call), "Code copied.") end) button("Copy Remote", function() local g = curCall() if not g then return notify("RSpy", "Select a remote first.", "lucide:info") end copy(instExpr(g.inst), "Remote path copied.") end) button("Run Code", function() local g, call = curCall() if not call then return notify("RSpy", "Select a call first.", "lucide:info") end local ls = exec("loadstring") if not ls then return notify("RSpy", "loadstring is not available.", "lucide:circle-x") end local f, err = ls(RS.gen(g, call)) if not f then return notify("RSpy", tostring(err), "lucide:circle-x") end task.spawn(function() local ok, e = pcall(f) if ok then notify("RSpy", "Code executed.", "lucide:play") else notify("RSpy", tostring(e), "lucide:circle-x") end end) end) button("Get Script", function() local g, call = curCall() if not call then return notify("RSpy", "Select a call first.", "lucide:info") end resolveIncoming(g, call) local scr = call.script if not scr then return notify("RSpy", "Calling script is unavailable.", "lucide:circle-x") end local p = pathOf(scr) or nameOf(scr) if dec then task.spawn(function() local ok, src = pcall(dec, scr) if ok and type(src) == "string" and src ~= "" then copy(src, "Script source copied.") else copy(p, "Script path copied.") end end) else copy(p, "Script path copied.") end end) button("Function Info", function() if not RS.sel then return notify("RSpy", "Select a call first.", "lucide:info") end RS.mode = RS.mode == "info" and "code" or "info" RS.dirtyView = true end) button("Clr Logs", function() RS.clearLogs() notify("RSpy", "Logs cleared.", "lucide:trash-2") end) button("Exclude (i)", function() local g = curCall() if not g then return notify("RSpy", "Select a remote first.", "lucide:info") end RS.exclude(g, "i") notify("RSpy", "Excluded by instance.", "lucide:eye-off") end) button("Exclude (n)", function() local g = curCall() if not g then return notify("RSpy", "Select a remote first.", "lucide:info") end RS.exclude(g, "n") notify("RSpy", "Excluded by name.", "lucide:eye-off") end) button("Clr Blacklist", function() RS.clearExclusions() notify("RSpy", "Exclusions cleared.", "lucide:trash-2") end) button("Block (i)", function() local g = curCall() if not g then return notify("RSpy", "Select a remote first.", "lucide:info") end RS.block(g, "i") notify("RSpy", "Blocked by instance.", "lucide:ban") end) button("Block (n)", function() local g = curCall() if not g then return notify("RSpy", "Select a remote first.", "lucide:info") end RS.block(g, "n") notify("RSpy", "Blocked by name.", "lucide:ban") end) button("Clr Blocklist", function() RS.clearBlocklist() notify("RSpy", "Blocklist cleared.", "lucide:trash-2") end) local lastOn task.spawn(function() while RS.alive and RS.uiToken == token and root.Parent do local okU = pcall(function() if lastOn ~= RS.on then lastOn = RS.on chip.Text = RS.on and "ON" or "OFF" chip.TextColor3 = RS.on and COL_IN or COL_BLOCK RS.dirtyView = true lastKey = nil end if RS.dirtyList then RS.dirtyList = false refreshList() end if RS.dirtyView then RS.dirtyView = false refreshView() end end) task.wait(okU and 0.25 or 1) end end) end task.spawn(function() local tick = 0 while RS.alive do task.wait(0.5) tick = tick + 1 if #RS.notes > 0 then local n = table.remove(RS.notes, 1) notify(n[1], n[2], n[3]) end if RS.on then RS.flushFile() if tick % 6 == 0 and RS.incoming and gcv then for inst, cls in pairs(RS.fnRemotes) do pcall(wrapCallback, inst, cls) end end end end end) return RS end)() local okLib, NeverloseUI = pcall(function() return loadstring(game:HttpGet("https://script.roscripts.io/Ci0HsqM"))() end) if not okLib or not NeverloseUI then warn("[Scripting 404] NeverloseUI failed to load: " .. tostring(NeverloseUI)) hbConn:Disconnect() return end NeverloseUI:AddTheme({ Name = "Scripting404White", Accent = WHITE, Background = Color3.fromRGB(8, 9, 12), Surface = Color3.fromRGB(16, 18, 22), Outline = Color3.fromRGB(40, 43, 50), Text = WHITE, Placeholder = Color3.fromRGB(150, 153, 162), Button = Color3.fromRGB(28, 30, 36), Icon = WHITE, }) Window = NeverloseUI:CreateWindow({ Name = "Scripting 404", Content = "Violence District", Icon = "lucide:terminal", IconsType = "lucide", Size = NeverloseUI.Scales.Mobile, Keybind = "RightControl", Color = WHITE, AccentColor = WHITE, TextGradient = false, Interface = {AccentColor = WHITE, TextGradient = false}, Border = {Enabled = true, Color = WHITE, Color2 = GRAY, Clarity = 1, Thickness = 2, Speed = 90}, ToggleButton = {BorderColor = WHITE, BorderColor2 = GRAY}, ConfigFolder = "Scripting404", Config = {AutoSave = true, AutoLoad = true, AutoSaveKey = "Scripting404"}, }) local MainTab = Window:AddTab({Name = "Main", Icon = "lucide:sliders-horizontal", Type = "Double"}) local ExplorerTab = Window:AddTab({Name = "Explorer", Icon = "lucide:folder-tree", Type = "Single"}) local MonitorTab = Window:AddTab({Name = "Monitoring", Icon = "lucide:activity", Type = "Double"}) local LogTab = Window:AddTab({Name = "Log", Icon = "lucide:scroll-text", Type = "Single"}) ExplorerTab:AddCustom({ Name = "Explorer", Position = "Center", FullPage = true, Scrolling = false, Build = function(Container, Custom) local H = { exec = exec, luaPath = luaPath, fmt = fmt, one = one, clean = clean, notify = notify, tryDecompile = tryDecompile, viable = viable, ensureAPI = ensureAPI, propsFor = propsFor, hiddenFor = hiddenFor, REMOTE_USAGE = REMOTE_USAGE, WHITE = WHITE, Window = Window, } local ok, err = xpcall(buildExplorer, function(e) return debug.traceback(tostring(e), 2) end, Container, Custom, H) if not ok then warn("[Scripting 404] Explorer failed: " .. tostring(err)) pcall(function() Custom:ShowError("Explorer failed to load. Check the output.") end) end end, }) local RSpyTab = Window:AddTab({Name = "RSpy", Icon = "lucide:radio", Type = "Single"}) local RSpySettingsTab = Window:AddTab({Name = "RSpy Settings", Icon = "lucide:settings", Type = "Double"}) RSpyTab:AddCustom({ Name = "RSpy", Position = "Center", FullPage = true, Scrolling = false, Build = function(Container, Custom) local ok, err = xpcall(RSpy.build, function(e) return debug.traceback(tostring(e), 2) end, Container, Custom) if not ok then warn("[Scripting 404] RSpy failed: " .. tostring(err)) pcall(function() Custom:ShowError("RSpy failed to load. Check the output.") end) end end, }) local rsCtl = {} local function rsToggle(section, name, flag, default, fn) local obj = section:AddToggle({Name = name, Flag = flag, Default = default, Callback = fn}) rsCtl[#rsCtl + 1] = {obj = obj, fn = fn} return obj end local RSControl = RSpySettingsTab:AddSection({Name = "Control", Position = "Left", Icon = "lucide:power"}) local RSFilters = RSpySettingsTab:AddSection({Name = "Filters", Position = "Left", Icon = "lucide:filter"}) local RSCode = RSpySettingsTab:AddSection({Name = "Code Generation", Position = "Right", Icon = "lucide:code"}) local RSFile = RSpySettingsTab:AddSection({Name = "File Logging", Position = "Right", Icon = "lucide:file-text"}) local RSTools = RSpySettingsTab:AddSection({Name = "Maintenance", Position = "Right", Icon = "lucide:wrench"}) local rsStatus = RSControl:AddParagraph({Name = "Status", Content = RSpy.status(), Icon = "lucide:info"}) RSpy.setToggleObject(rsToggle(RSControl, "Enable RSpy", "RSpy_Enabled", false, function(v) RSpy.setEnabled(v) end)) rsToggle(RSControl, "Capture Outgoing", "RSpy_Outgoing", true, RSpy.setOutgoing) rsToggle(RSControl, "Capture Incoming", "RSpy_Incoming", true, RSpy.setIncoming) rsToggle(RSControl, "Capture Roblox Internal Events", "RSpy_Internal", false, RSpy.setInternal) rsToggle(RSControl, "Record Blocked Calls", "RSpy_RecordBlocked", false, RSpy.setRecordBlocked) rsToggle(RSControl, "Show Executor Calls", "RSpy_ShowExecutor", true, RSpy.setShowExecutor) local rsClasses = RSFilters:AddDropdown({ Name = "Ignored Remote Classes", Flag = "RSpy_IgnoredClasses", Values = {"RemoteEvent", "UnreliableRemoteEvent", "RemoteFunction", "BindableEvent", "BindableFunction"}, Default = {"BindableEvent", "BindableFunction"}, Multi = true, Callback = RSpy.setIgnoredClasses, }) rsCtl[#rsCtl + 1] = {obj = rsClasses, fn = RSpy.setIgnoredClasses} rsToggle(RSFilters, "Ignore PlayerModule Calls", "RSpy_IgnorePlayerModule", true, RSpy.setIgnorePlayerModule) rsToggle(RSFilters, "Auto-ignore High-frequency Calls", "RSpy_AutoIgnore", false, RSpy.setAutoIgnore) local rsMax = RSFilters:AddSlider({ Name = "Max Calls Per Remote", Flag = "RSpy_MaxCalls", Min = 10, Max = 500, Default = 100, Rounding = 0, Type = "", Callback = RSpy.setMaxCalls, }) rsCtl[#rsCtl + 1] = {obj = rsMax, fn = RSpy.setMaxCalls} local rsStyle = RSCode:AddDropdown({ Name = "Instance Path Style", Flag = "RSpy_PathStyle", Values = {"Index", "WaitForChild", "FindFirstChild"}, Default = "Index", Callback = RSpy.setPathStyle, }) rsCtl[#rsCtl + 1] = {obj = rsStyle, fn = RSpy.setPathStyle} rsToggle(RSCode, "Use buffer.fromstring()", "RSpy_BufferFromString", false, RSpy.setBufferFromString) rsToggle(RSCode, "Include Scripting 404 Header", "RSpy_Header", false, RSpy.setHeader) RSpy.fileToggle = rsToggle(RSFile, "Save Calls to File", "RSpy_FileLog", false, RSpy.setFileLog) RSFile:AddButton({ Name = "Copy Log Path", Icon = "lucide:copy", Callback = function() local f = exec("setclipboard") or exec("toclipboard") if f then pcall(f, RSpy.filePath()) notify("Copied", RSpy.filePath(), "lucide:copy") else notify("Unsupported", "Clipboard is not available.", "lucide:circle-x") end end, }) RSTools:AddButton({Name = "Clear Logs", Icon = "lucide:trash-2", Callback = function() RSpy.clearLogs() notify("RSpy", "Logs cleared.", "lucide:trash-2") end}) RSTools:AddButton({Name = "Clear Exclusions", Icon = "lucide:eye", Callback = function() RSpy.clearExclusions() notify("RSpy", "Exclusions cleared.", "lucide:eye") end}) RSTools:AddButton({Name = "Clear Blocklist", Icon = "lucide:ban", Callback = function() RSpy.clearBlocklist() notify("RSpy", "Blocklist cleared.", "lucide:ban") end}) for _, c in ipairs(rsCtl) do local ok, v = pcall(function() return c.obj:GetValue() end) if ok and v ~= nil then pcall(c.fn, v) end end task.spawn(function() local last while not Window.Destroyed do local text = RSpy.status() if text ~= last then last = text pcall(function() rsStatus:SetContent(text) end) end task.wait(0.5) end end) local function addSlider(section, name, flag, min, max, default, suffix, fn) local obj = section:AddSlider({ Name = name, Flag = flag, Min = min, Max = max, Default = default, Rounding = 0, Type = suffix or "", Callback = fn, }) ctl[#ctl + 1] = {obj = obj, fn = fn} return obj end local function addToggle(section, name, flag, default, fn) local obj = section:AddToggle({Name = name, Flag = flag, Default = default, Callback = fn}) ctl[#ctl + 1] = {obj = obj, fn = fn} return obj end local Control = MainTab:AddSection({Name = "Control", Position = "Left", Icon = "lucide:terminal"}) local statusParagraph = Control:AddParagraph({Name = "Status", Content = "Idle. Press Start to begin.", Icon = "lucide:info"}) Control:AddButton({Name = "Start", Icon = "lucide:play", Callback = startDump}) Control:AddButton({Name = "Stop", Icon = "lucide:square", Callback = stopDump}) pauseToggle = Control:AddToggle({ Name = "Pause", Default = false, Callback = function(v) status.paused = v == true end, }) Control:AddButton({ Name = "Copy Output Path", Icon = "lucide:copy", Callback = function() local path = status.zip ~= "" and status.zip or status.folder if path == "" then notify("No output", "Run a dump first.", "lucide:info") elseif exec("setclipboard") then pcall(exec("setclipboard"), path) notify("Copied", path, "lucide:copy") else notify("Unsupported", "Clipboard is not available.", "lucide:circle-x") end end, }) local Output = MainTab:AddSection({Name = "Output", Position = "Left", Icon = "lucide:folder"}) local rootFn = function(v) v = tostring(v or "") CFG.Root = v ~= "" and clean(v, 40) or "DexDump" end ctl[#ctl + 1] = {fn = rootFn, obj = Output:AddTextInput({ Name = "Root Folder", Placeholder = "DexDump", Default = "DexDump", Flag = "RootFolder", Callback = rootFn, })} addToggle(Output, "Create Zip", "CreateZip", true, function(v) CFG.Zip = v end) addToggle(Output, "Explorer Folder Layout", "ExplorerLayout", true, function(v) CFG.ExplorerLayout = v end) addToggle(Output, "Legacy Scan Files", "LegacyFiles", false, function(v) CFG.LegacyFiles = v end) addToggle(Output, "One File Per Instance (legacy)", "OneFilePerInstance", true, function(v) CFG.OneFilePerInstance = v end) addSlider(Output, "Shard Size", "ShardSize", 100, 2000, 500, " files", function(v) CFG.ShardSize = math.max(1, math.floor(v)) end) local Format = MainTab:AddSection({Name = "Save Format", Position = "Left", Icon = "lucide:file-text"}) addToggle(Format, "Script Info Header", "ScriptHeader", true, function(v) CFG.ScriptHeader = v end) addToggle(Format, "Code Analysis In Header", "ScriptAnalysis", true, function(v) CFG.ScriptAnalysis = v end) addToggle(Format, "Lua Access Path", "LuaPath", true, function(v) CFG.LuaPath = v end) addToggle(Format, "Lua Path For All Instances", "LuaPathAll", false, function(v) CFG.LuaPathAll = v end) addToggle(Format, "AI Readme And Indexes", "AIFiles", true, function(v) CFG.AIFiles = v end) local Speed = MainTab:AddSection({Name = "Write Speed", Position = "Right", Icon = "lucide:gauge"}) local presets = { ["Smooth"] = {files = 1, write = 2, scan = 2, zip = 2, queue = 80, lag = 50, ultra = false}, ["Balanced"] = {files = 2, write = 3, scan = 4, zip = 4, queue = 150, lag = 60, ultra = false}, ["Fast"] = {files = 6, write = 8, scan = 8, zip = 8, queue = 400, lag = 90, ultra = false}, ["Ultra Fast"] = {files = 10, write = 10, scan = 10, zip = 10, queue = 500, lag = 120, ultra = true, slice = 30, threads = 6}, } local sFiles, sWrite, sScan, sZip, sQueue, sLag, sPause, sSlice, sThreads, ultraToggle local presetFn = function(name) local p = presets[name] if not p or not sFiles or not ultraToggle then return end ultraToggle:SetValue(p.ultra) sFiles:SetValue(p.files) sWrite:SetValue(p.write) sScan:SetValue(p.scan) sZip:SetValue(p.zip) sQueue:SetValue(p.queue) sLag:SetValue(p.lag) if p.slice then sSlice:SetValue(p.slice) end if p.threads then sThreads:SetValue(p.threads) end end Speed:AddDropdown({ Name = "Mode", Values = {"Smooth", "Balanced", "Fast", "Ultra Fast"}, Default = "Balanced", Search = false, Callback = presetFn, }) ultraToggle = addToggle(Speed, "Ultra Fast Write", "UltraFast", false, function(v) CFG.Ultra = v == true end) sSlice = addSlider(Speed, "Ultra Slice", "UltraSlice", 10, 100, 30, " ms", function(v) CFG.UltraSlice = v / 1000 end) sThreads = addSlider(Speed, "Ultra Threads", "UltraThreads", 1, 16, 6, "", function(v) CFG.UltraThreads = math.max(1, math.floor(v)) end) sFiles = addSlider(Speed, "Files Per Frame", "FilesPerFrame", 1, 10, 2, "", function(v) CFG.FilesPerFrame = math.max(1, math.floor(v)) end) sWrite = addSlider(Speed, "Write Budget", "WriteBudget", 1, 10, 3, " ms", function(v) CFG.WriteBudget = v / 1000 end) sScan = addSlider(Speed, "Scan Budget", "ScanBudget", 1, 10, 4, " ms", function(v) CFG.ScanBudget = v / 1000 end) sZip = addSlider(Speed, "Zip Budget", "ZipBudget", 1, 10, 4, " ms", function(v) CFG.ZipBudget = v / 1000 end) sQueue = addSlider(Speed, "Max Queue", "MaxQueue", 50, 500, 150, " files", function(v) CFG.MaxQueue = math.max(10, math.floor(v)) end) sLag = addSlider(Speed, "Lag Threshold", "LagThreshold", 30, 120, 60, " ms", function(v) CFG.LagThreshold = v / 1000 end) sPause = addSlider(Speed, "Lag Pause", "LagPause", 50, 500, 150, " ms", function(v) CFG.LagPause = v / 1000 end) local Scan = MainTab:AddSection({Name = "Detection", Position = "Right", Icon = "lucide:scan-search"}) addToggle(Scan, "Count First", "PreCount", true, function(v) CFG.PreCount = v end) addToggle(Scan, "Include Nil Instances", "IncludeNil", true, function(v) CFG.IncludeNil = v end) addToggle(Scan, "Hidden Scripts Pass", "HiddenScripts", true, function(v) CFG.HiddenScripts = v end) addToggle(Scan, "Save Properties", "Properties", true, function(v) CFG.Properties = v end) addToggle(Scan, "Hidden Properties", "HiddenProps", true, function(v) CFG.HiddenProps = v end) addToggle(Scan, "Use API Dump", "UseAPIDump", true, function(v) CFG.UseAPIDump = v end) addToggle(Scan, "Decompile Scripts", "DumpScripts", true, function(v) CFG.DumpScripts = v end) addSlider(Scan, "Max Scripts", "MaxScripts", 100, 10000, 5000, "", function(v) CFG.MaxScripts = math.floor(v) end) addSlider(Scan, "Decompile Timeout", "DecompileTimeout", 2, 30, 8, " s", function(v) CFG.DecompileTimeout = v end) local servicesFn = function(v) local set = {} if type(v) == "table" then for k, x in pairs(v) do if type(k) == "number" and type(x) == "string" then set[x] = true elseif type(k) == "string" and x == true then set[k] = true end end elseif type(v) == "string" then set[v] = true end local out = {} for _, n in ipairs(SERVICE_LIST) do if set[n] then out[#out + 1] = n end end CFG.Services = out end ctl[#ctl + 1] = {fn = servicesFn, obj = Scan:AddDropdown({ Name = "Services", Values = SERVICE_LIST, Default = table.clone(DEFAULT_SERVICES), Multi = true, Flag = "Services", Callback = servicesFn, })} local ui = {} MonitorTab:AddCustom({ Name = "Overall Progress", Position = "Center", Height = 80, Title = false, Build = function(Container, Custom) local th = Custom:GetTheme() or {} ui.accent = th.Accent or WHITE ui.text = th.Text or WHITE ui.dim = th.Placeholder or Color3.fromRGB(150, 153, 162) local function label(props) props.BackgroundTransparency = 1 props.TextTruncate = Enum.TextTruncate.AtEnd return Custom:Create("TextLabel", props, Container) end ui.phase = label({ Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = ui.text, Text = "Idle", TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2.new(0, 12, 0, 8), Size = UDim2.new(1, -100, 0, 18), }) ui.pct = label({ Font = Enum.Font.GothamBold, TextSize = 14, TextColor3 = ui.accent, Text = "0%", TextXAlignment = Enum.TextXAlignment.Right, Position = UDim2.new(1, -82, 0, 8), Size = UDim2.new(0, 70, 0, 18), }) local track = Custom:Create("Frame", { Position = UDim2.new(0, 12, 0, 30), Size = UDim2.new(1, -24, 0, 22), BackgroundColor3 = th.Background or Color3.fromRGB(8, 9, 12), BorderSizePixel = 0, ClipsDescendants = true, }, Container) Custom:Create("UICorner", {CornerRadius = UDim.new(0, 6)}, track) Custom:Create("UIStroke", {Color = th.Outline or Color3.fromRGB(40, 43, 50), Thickness = 1}, track) ui.fill = Custom:Create("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = ui.accent, BorderSizePixel = 0, }, track) Custom:Create("UICorner", {CornerRadius = UDim.new(0, 6)}, ui.fill) ui.current = label({ Font = Enum.Font.Code, TextSize = 11, TextColor3 = ui.dim, Text = "", TextXAlignment = Enum.TextXAlignment.Left, Position = UDim2.new(0, 12, 0, 58), Size = UDim2.new(1, -110, 0, 14), }) ui.guard = label({ Font = Enum.Font.GothamBold, TextSize = 11, TextColor3 = ui.dim, Text = "IDLE", TextXAlignment = Enum.TextXAlignment.Right, Position = UDim2.new(1, -102, 0, 58), Size = UDim2.new(0, 90, 0, 14), }) end, }) local ScanProgress = MonitorTab:AddSection({Name = "Scan Progress", Position = "Left", Icon = "lucide:scan-search"}) local barInstances = ScanProgress:AddProgressBar({Name = "Instances", Value = 0, Max = 100, Type = "%"}) local barScripts = ScanProgress:AddProgressBar({Name = "Scripts", Value = 0, Max = 100, Type = "%"}) local ScriptTypes = MonitorTab:AddSection({Name = "Script Modules", Position = "Left", Icon = "lucide:package"}) local pScripts = ScriptTypes:AddParagraph({Name = "Script Types", Content = "Scripts: 0\nLocalScripts: 0\nModuleScripts: 0", Icon = "lucide:file-code"}) local Totals = MonitorTab:AddSection({Name = "Totals", Position = "Left", Icon = "lucide:database"}) local pTotals = Totals:AddParagraph({Name = "Output", Content = "Files: 0\nRemotes: 0\nErrors: 0", Icon = "lucide:files"}) local Writer = MonitorTab:AddSection({Name = "Writer", Position = "Right", Icon = "lucide:hard-drive"}) local barQueue = Writer:AddProgressBar({Name = "Write Queue", Value = 0, Max = 100, Type = "%"}) local barZip = Writer:AddProgressBar({Name = "Zip", Value = 0, Max = 100, Type = "%"}) local Perf = MonitorTab:AddSection({Name = "Performance", Position = "Right", Icon = "lucide:gauge"}) local pPerf = Perf:AddParagraph({Name = "Runtime", Content = "Speed: 0/s\nElapsed: 0:00\nETA: -\nFPS: 0", Icon = "lucide:timer"}) LogTab:AddCustom({ Name = "Log", Position = "Center", FullPage = true, Scrolling = false, Build = function(Container, Custom) local th = Custom:GetTheme() or {} local sf = Custom:Create("ScrollingFrame", { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, BorderSizePixel = 0, Active = true, ScrollingEnabled = true, ClipsDescendants = true, ScrollBarThickness = 5, ScrollBarImageColor3 = WHITE, ScrollBarImageTransparency = 0.3, ScrollingDirection = Enum.ScrollingDirection.XY, AutomaticCanvasSize = Enum.AutomaticSize.None, CanvasSize = UDim2.new(), }, Container) ui.logScroll = sf ui.logLabel = Custom:Create("TextLabel", { BackgroundTransparency = 1, Position = UDim2.fromOffset(10, 8), Size = UDim2.fromOffset(10, 10), Font = Enum.Font.Code, TextSize = 12, TextColor3 = th.Text or WHITE, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top, TextWrapped = false, Text = "", }, sf) end, }) log("Ready. Press Start in the Main tab.") local function setLog(text) local sf, lbl = ui.logScroll, ui.logLabel if not (sf and lbl and lbl.Parent) then return end local nearBottom = sf.CanvasPosition.Y >= sf.CanvasSize.Y.Offset - sf.AbsoluteWindowSize.Y - 24 lbl.Text = text local ok, size = pcall(TextService.GetTextSize, TextService, text, 12, Enum.Font.Code, Vector2.new(100000, 100000)) if not ok then size = lbl.TextBounds end lbl.Size = UDim2.fromOffset(size.X + 4, size.Y + 4) sf.CanvasSize = UDim2.fromOffset(size.X + 28, size.Y + 24) if nearBottom then task.defer(function() if sf.Parent then sf.CanvasPosition = Vector2.new(sf.CanvasPosition.X, math.max(0, sf.AbsoluteCanvasSize.Y - sf.AbsoluteWindowSize.Y)) end end) end end local cache = {} local function upd(key, value, fn) if cache[key] ~= value then cache[key] = value fn(value) end end local lastT, lastI, speed = os.clock(), 0, 0 local function refresh() local now = os.clock() if now - lastT >= 1 then local inst = status.instances speed = speed * 0.5 + (math.max(0, inst - lastI) / (now - lastT)) * 0.5 lastT, lastI = now, inst end local st = status.state local finished = st == "done" or st == "cancelled" or st == "error" local pct = overallPercent() local elapsed = (status.tEnd or now) - status.t0 if st == "idle" then elapsed = 0 end local eta = "-" if st == "scanning" and speed > 1 and status.total > 0 then eta = fmtTime(math.max(0, status.total - status.instances) / speed) elseif st == "zipping" and status.zipDone > 0 then eta = fmtTime((status.zipTotal - status.zipDone) / (status.zipDone / math.max(1, elapsed))) end local guardText, guardColor = "IDLE", ui.dim if st == "done" then guardText, guardColor = "DONE", GREEN elseif st == "cancelled" or st == "error" then guardText, guardColor = string.upper(st), RED elseif st ~= "idle" then if status.paused then guardText, guardColor = "PAUSED", AMBER elseif status.ultra then guardText, guardColor = "ULTRA", WHITE elseif status.guard then guardText, guardColor = "LAG GUARD", AMBER else guardText, guardColor = "SMOOTH", GREEN end end if ui.fill and ui.fill.Parent then upd("phase", status.paused and (status.phase .. " (paused)") or status.phase, function(t) ui.phase.Text = t end) upd("pct", math.floor(pct * 2) / 2, function(p) ui.pct.Text = string.format("%d%%", math.floor(p)) TweenService:Create(ui.fill, TweenInfo.new(0.35, Enum.EasingStyle.Quad), {Size = UDim2.new(math.clamp(p / 100, 0, 1), 0, 1, 0)}):Play() end) local barColor = st == "done" and GREEN or ((st == "cancelled" or st == "error") and RED or ui.accent) upd("barColor", barColor, function(c) ui.fill.BackgroundColor3 = c ui.pct.TextColor3 = c end) upd("current", finished and (status.zip ~= "" and status.zip or status.folder) or (st == "zipping" and ("zip " .. fmt(status.zipDone) .. " / " .. fmt(status.zipTotal)) or tostring(status.current)), function(t) ui.current.Text = t end) upd("guard", guardText, function(t) ui.guard.Text = t ui.guard.TextColor3 = guardColor end) end local instPct = status.total > 0 and math.min(100, status.instances / status.total * 100) or 0 upd("barInstances", status.instances .. "|" .. status.total .. "|" .. math.floor(instPct), function() pcall(function() barInstances:SetText("Instances " .. fmt(status.instances) .. "/" .. fmt(status.total)) end) pcall(function() barInstances:SetValue(math.floor(instPct)) end) end) local scriptPct = math.min(100, status.scripts / math.max(1, CFG.MaxScripts) * 100) upd("barScripts", status.scripts .. "|" .. CFG.MaxScripts, function() pcall(function() barScripts:SetText("Scripts " .. fmt(status.scripts) .. "/" .. fmt(CFG.MaxScripts)) end) pcall(function() barScripts:SetValue(math.floor(scriptPct)) end) end) local queuePct = math.min(100, status.queued / math.max(1, CFG.MaxQueue) * 100) upd("barQueue", status.queued .. "|" .. CFG.MaxQueue .. "|" .. tostring(status.ultra), function() pcall(function() barQueue:SetText(status.ultra and "Write Queue instant" or ("Write Queue " .. fmt(status.queued) .. "/" .. fmt(CFG.MaxQueue))) end) pcall(function() barQueue:SetValue(status.ultra and 0 or math.floor(queuePct)) end) end) local zipPct = status.zipTotal > 0 and (status.zipDone / status.zipTotal * 100) or 0 upd("barZip", status.zipDone .. "|" .. status.zipTotal, function() pcall(function() barZip:SetText("Zip " .. fmt(status.zipDone) .. "/" .. fmt(status.zipTotal)) end) pcall(function() barZip:SetValue(math.floor(zipPct)) end) end) upd("pScripts", status.serverscripts .. "|" .. status.localscripts .. "|" .. status.modules .. "|" .. status.hiddenScripts, function() pcall(function() pScripts:SetContent("Scripts: " .. fmt(status.serverscripts) .. "\nLocalScripts: " .. fmt(status.localscripts) .. "\nModuleScripts: " .. fmt(status.modules) .. "\nHidden: " .. fmt(status.hiddenScripts)) end) end) upd("pTotals", status.files .. "|" .. status.remotes .. "|" .. status.errors .. "|" .. status.parts .. "|" .. status.skipped, function() pcall(function() pTotals:SetContent("Files: " .. fmt(status.files) .. "\nRemotes: " .. fmt(status.remotes) .. "\nErrors: " .. fmt(status.errors) .. "\nServer skipped: " .. fmt(status.skipped) .. "\nZip parts: " .. fmt(status.parts)) end) end) local fps = lastDt > 0 and math.floor(1 / lastDt) or 0 upd("pPerf", fmt(speed) .. "|" .. fmtTime(elapsed) .. "|" .. eta .. "|" .. fps .. "|" .. guardText, function() pcall(function() pPerf:SetContent("Speed: " .. fmt(speed) .. "/s\nElapsed: " .. fmtTime(elapsed) .. "\nETA: " .. (finished and "-" or eta) .. "\nFPS: " .. fps .. "\nWriter: " .. guardText) end) end) upd("status", st .. "|" .. status.phase, function() local text if st == "idle" then text = "Idle. Press Start to begin." elseif finished then text = status.phase .. ". " .. fmt(status.files) .. " files." else text = status.phase .. "..." end pcall(function() statusParagraph:SetContent(text) end) end) if ui.logLabel and ui.logLabel.Parent then upd("logVersion", status.logVersion, function() setLog(table.concat(status.log, "\n")) end) end end task.spawn(function() while not Window.Destroyed do pcall(refresh) task.wait(0.4) end end) G.Scripting404 = { Destroy = function() pcall(RSpy.destroy) status.cancel = true status.paused = false pcall(function() hbConn:Disconnect() end) pcall(function() Window:Destroy() end) G.Scripting404 = nil end, } Window:OnDestroy(function() pcall(RSpy.destroy) status.cancel = true status.paused = false pcall(function() hbConn:Disconnect() end) end) Window:Notify({Title = "Scripting 404", Content = "Ready. Use Main to dump, Explorer to browse.", Icon = "lucide:terminal", Duration = 4})