Dex detector

publiclua remote loaderupdated

the risk scan cleared this script. it still noticed a few things:

risk 3/10 · low risk · obfuscated with Custom string encoding

sends data to or loads code from huggingface.co, script.roscripts.io.

loadstring(game:HttpGet("https://pasteblox.com/raw/get_404/dex/main"))()
pbx pull g73nwb66y7raw link never changes · v5 live
dex-detector.lua
codediff
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
lines 1–300 of 5,842open raw find-in-page only searches the lines loaded so far. "show all" loads the rest.

changelog

5 versions
  1. no summary

    live

    @get_404·+1673 lines·

  2. no summary

    @get_404·

  3. no summary

    @get_404·

  4. no summary

    @get_404·+2787 lines·

  5. first version

    @get_404·