local p, f, u = 0, 0, 0 local r = 0 local t = {} local s = tick() local function g(path) local v = getgenv and getgenv() or getfenv(2) while v ~= nil and path ~= "" do local n, nx = string.match(path, "^([^.]+)%.?(.*)$") v = v[n] path = nx end return v end local function e(name, a, cb) r = r + 1 task.spawn(function() local rs = { n = name, a = a or {}, st = "pending", m = nil, ai = {}, d = 0 } local ts = tick() if not cb then rs.st = "notest" rs.m = "no callback" print("[⏺️ NO TEST] " .. name .. " - no callback") elseif not g(name) then f = f + 1 rs.st = "fail" rs.m = "global missing" warn("[⛔ FAIL] " .. name .. " - not in env") else local ok, msg = pcall(cb) rs.d = tick() - ts msg = tostring(msg or "") if ok then p = p + 1 rs.st = "pass" rs.m = msg print("[✅ PASS] " .. name .. (msg ~= "" and " • " .. msg or "") .. " (" .. string.format("%.3f", rs.d * 1000) .. "ms)") else f = f + 1 rs.st = "fail" rs.m = msg warn("[⛔ FAIL] " .. name .. " - " .. msg .. " (" .. string.format("%.3f", rs.d * 1000) .. "ms)") end end local ua = {} for _, al in ipairs(a or {}) do if g(al) == nil then table.insert(ua, al) end end if #ua > 0 then u = u + 1 rs.ai = ua warn("[⚠️ ALIAS] " .. name .. " - missing: " .. table.concat(ua, ", ")) end table.insert(t, rs) r = r - 1 end) end print("\n") print(string.rep("=", 60)) print(" UNC Environment Check") print(" ✅ Pass | ⛔ Fail | ⏺️ No Test | ⚠️ Alias Missing") print(string.rep("=", 60)) print("\n") task.defer(function() repeat task.wait() until r == 0 local tt = tick() - s local tot = p + f local rate = tot > 0 and math.round(p / tot * 100) or 0 print("\n") print(string.rep("=", 60)) print(" UNC Summary") print(string.rep("=", 60)) print(" total: " .. tot) print(" passed: " .. p .. " (" .. rate .. "%)") print(" failed: " .. f) print(" aliases: " .. u) print(" time: " .. string.format("%.3f", tt) .. "s") print(string.rep("=", 60)) if f > 0 then print("\n failed funcs:") for _, v in ipairs(t) do if v.st == "fail" then print(" ⛔ " .. v.n .. " - " .. v.m) end end end if u > 0 then print("\n missing aliases:") for _, v in ipairs(t) do if #v.ai > 0 then print(" ⚠️ " .. v.n .. " - " .. table.concat(v.ai, ", ")) end end end end) if isfolder and makefolder and delfolder then if isfolder(".tests") then delfolder(".tests") end makefolder(".tests") end local function se(t1, t2) if t1 == t2 then return true end local ut = { ["function"] = true, ["table"] = true, ["userdata"] = true, ["thread"] = true } for k, v in pairs(t1) do if ut[type(v)] then if type(t2[k]) ~= type(v) then return false end elseif t2[k] ~= v then return false end end for k, v in pairs(t2) do if ut[type(v)] then if type(t2[k]) ~= type(v) then return false end elseif t1[k] ~= v then return false end end return true end print("[CACHE]") e("cache.invalidate", {}, function() local c = Instance.new("Folder") local pt = Instance.new("Part", c) cache.invalidate(c:FindFirstChild("Part")) assert(pt ~= c:FindFirstChild("Part"), "ref invalidation failed") end) e("cache.iscached", {}, function() local pt = Instance.new("Part") assert(cache.iscached(pt), "new part should be cached") cache.invalidate(pt) assert(not cache.iscached(pt), "invalidated part should not be cached") end) e("cache.replace", {}, function() local pt = Instance.new("Part") local fr = Instance.new("Fire") cache.replace(pt, fr) assert(pt ~= fr, "part was not replaced") end) e("cloneref", {}, function() local pt = Instance.new("Part") local cl = cloneref(pt) assert(pt ~= cl, "clone should not equal original ref") cl.Name = "Test" assert(pt.Name == "Test", "clone should propagate changes") end) e("compareinstances", {}, function() local pt = Instance.new("Part") local cl = cloneref(pt) assert(pt ~= cl, "clone should not equal original") assert(compareinstances(pt, cl), "compareinstances should identify clone") end) print("\n[CLOSURES]") e("checkcaller", {}, function() assert(checkcaller(), "main thread should return true") end) e("clonefunction", {}, function() local function tst() return "success" end local cp = clonefunction(tst) assert(tst() == cp(), "clone should return same value") assert(tst ~= cp, "clone should be different ref") end) e("getcallingscript", {}) e("getscriptclosure", {"getscriptfunction"}, function() local md for _, v in ipairs(game:GetService("CoreGui").RobloxGui:GetDescendants()) do if v:IsA("ModuleScript") then local ok, rs = pcall(require, v) if ok and type(rs) == "table" then md = v break end end end assert(md, "no suitable modulescript found") local og = require(md) local gn = getscriptclosure(md)() assert(og ~= gn, "generated should not match original ref") assert(se(og, gn), "generated should be shallow equal") end) e("hookfunction", {"replaceclosure"}, function() local function tst() return true end local rf = hookfunction(tst, function() return false end) assert(tst() == false, "hooked should return false") assert(rf() == true, "ref should return true") assert(tst ~= rf, "original and ref should differ") end) e("iscclosure", {}, function() assert(iscclosure(print) == true, "print should be c closure") assert(iscclosure(function() end) == false, "anon should not be c closure") end) e("islclosure", {}, function() assert(islclosure(print) == false, "print should not be lua closure") assert(islclosure(function() end) == true, "anon should be lua closure") end) e("isexecutorclosure", {"checkclosure", "isourclosure"}, function() assert(isexecutorclosure(isexecutorclosure) == true, "should return true for executor global") assert(isexecutorclosure(newcclosure(function() end)) == true, "should return true for executor c closure") assert(isexecutorclosure(function() end) == true, "should return true for executor lua closure") assert(isexecutorclosure(print) == false, "should return false for roblox global") end) e("loadstring", {}, function() local an = game:GetService("Players").LocalPlayer.Character.Animate local bc = getscriptbytecode(an) local fn = loadstring(bc) assert(type(fn) ~= "function", "luau bytecode should not be loadable") assert(assert(loadstring("return ... + 1"))(1) == 2, "simple math failed") assert(type(select(2, loadstring("f"))) == "string", "compiler error should return string") end) e("newcclosure", {}, function() local function tst() return true end local tc = newcclosure(tst) assert(tst() == tc(), "c closure should return same value") assert(tst ~= tc, "c closure should be different ref") assert(iscclosure(tc), "newcclosure result should be c closure") end) print("\n[CONSOLE]") e("rconsoleclear", {"consoleclear"}) e("rconsolecreate", {"consolecreate"}) e("rconsoledestroy", {"consoledestroy"}) e("rconsoleinput", {"consoleinput"}) e("rconsoleprint", {"consoleprint"}) e("rconsolesettitle", {"rconsolename", "consolesettitle"}) print("\n[CRYPT]") e("crypt.base64encode", {"crypt.base64.encode", "crypt.base64_encode", "base64.encode", "base64_encode"}, function() assert(crypt.base64encode("test") == "dGVzdA==", "base64 encoding mismatch") end) e("crypt.base64decode", {"crypt.base64.decode", "crypt.base64_decode", "base64.decode", "base64_decode"}, function() assert(crypt.base64decode("dGVzdA==") == "test", "base64 decoding mismatch") end) e("crypt.encrypt", {}, function() local k = crypt.generatekey() local enc, iv = crypt.encrypt("test", k, nil, "CBC") assert(iv, "encrypt should return iv") local dec = crypt.decrypt(enc, k, iv, "CBC") assert(dec == "test", "decryption failed") end) e("crypt.decrypt", {}, function() local k, iv = crypt.generatekey(), crypt.generatekey() local enc = crypt.encrypt("test", k, iv, "CBC") local dec = crypt.decrypt(enc, k, iv, "CBC") assert(dec == "test", "decryption failed") end) e("crypt.generatebytes", {}, function() local sz = math.random(10, 100) local b = crypt.generatebytes(sz) assert(#crypt.base64decode(b) == sz, "decoded size mismatch") end) e("crypt.generatekey", {}, function() local k = crypt.generatekey() assert(#crypt.base64decode(k) == 32, "key should be 32 bytes decoded") end) e("crypt.hash", {}, function() local al = {"sha1", "sha384", "sha512", "md5", "sha256", "sha3-224", "sha3-256", "sha3-512"} for _, a in ipairs(al) do local h = crypt.hash("test", a) assert(h, "hash for " .. a .. " returned nil") end end) print("\n[DEBUG]") e("debug.getconstant", {}, function() local function tst() print("Hello, world!") end assert(debug.getconstant(tst, 1) == "print", "first constant should be print") assert(debug.getconstant(tst, 2) == nil, "second constant should be nil") assert(debug.getconstant(tst, 3) == "Hello, world!", "third constant mismatch") end) e("debug.getconstants", {}, function() local function tst() local num = 5000 .. 50000 print("Hello, world!", num, warn) end local c = debug.getconstants(tst) assert(c[1] == 50000, "first constant should be 50000") assert(c[2] == "print", "second constant should be print") assert(c[3] == nil, "third constant should be nil") assert(c[4] == "Hello, world!", "fourth constant mismatch") assert(c[5] == "warn", "fifth constant should be warn") end) e("debug.getinfo", {}, function() local tp = { source = "string", short_src = "string", func = "function", what = "string", currentline = "number", name = "string", nups = "number", numparams = "number", is_vararg = "number" } local function tst(...) print(...) end local i = debug.getinfo(tst) for k, v in pairs(tp) do assert(i[k] ~= nil, "missing field: " .. k) assert(type(i[k]) == v, "field " .. k .. " should be " .. v .. " (got " .. type(i[k]) .. ")") end end) e("debug.getproto", {}, function() local function tst() local function pr() return true end end local pr = debug.getproto(tst, 1, true)[1] local rp = debug.getproto(tst, 1) assert(pr, "failed to get inner function") assert(pr() == true, "inner function should return true") if not rp() then return "proto return values disabled" end end) e("debug.getprotos", {}, function() local function tst() local function _1() return true end local function _2() return true end local function _3() return true end end for i in ipairs(debug.getprotos(tst)) do local pr = debug.getproto(tst, i, true)[1] local rp = debug.getproto(tst, i) assert(pr(), "failed to get inner function " .. i) if not rp() then return "proto return values disabled" end end end) e("debug.getstack", {}, function() local _ = "a" .. "b" assert(debug.getstack(1, 1) == "ab", "first stack item should be ab") assert(debug.getstack(1)[1] == "ab", "first stack table item should be ab") end) e("debug.getupvalue", {}, function() local uv = function() end local function tst() print(uv) end assert(debug.getupvalue(tst, 1) == uv, "upvalue mismatch") end) e("debug.getupvalues", {}, function() local uv = function() end local function tst() print(uv) end local uv2 = debug.getupvalues(tst) assert(uv2[1] == uv, "upvalues mismatch") end) e("debug.setconstant", {}, function() local function tst() return "fail" end debug.setconstant(tst, 1, "success") assert(tst() == "success", "setconstant did not modify constant") end) e("debug.setstack", {}, function() local function tst() return "fail", debug.setstack(1, 1, "success") end assert(tst() == "success", "setstack did not modify stack") end) e("debug.setupvalue", {}, function() local function uv() return "fail" end local function tst() return uv() end debug.setupvalue(tst, 1, function() return "success" end) assert(tst() == "success", "setupvalue did not modify upvalue") end) print("\n[FILESYSTEM]") e("readfile", {}, function() writefile(".tests/readfile.txt", "success") assert(readfile(".tests/readfile.txt") == "success", "read content mismatch") end) e("listfiles", {}, function() makefolder(".tests/listfiles") writefile(".tests/listfiles/test_1.txt", "success") writefile(".tests/listfiles/test_2.txt", "success") local fl = listfiles(".tests/listfiles") assert(#fl == 2, "file count mismatch") assert(isfile(fl[1]), "should return file paths") assert(readfile(fl[1]) == "success", "file content mismatch") makefolder(".tests/listfiles_2") makefolder(".tests/listfiles_2/test_1") makefolder(".tests/listfiles_2/test_2") local fd = listfiles(".tests/listfiles_2") assert(#fd == 2, "folder count mismatch") assert(isfolder(fd[1]), "should return folder paths") end) e("writefile", {}, function() writefile(".tests/writefile.txt", "success") assert(readfile(".tests/writefile.txt") == "success", "write content mismatch") local rfe = pcall(function() writefile(".tests/writefile", "success") assert(isfile(".tests/writefile.txt")) end) if not rfe then return "executor requires file extension" end end) e("makefolder", {}, function() makefolder(".tests/makefolder") assert(isfolder(".tests/makefolder"), "folder not created") end) e("appendfile", {}, function() writefile(".tests/appendfile.txt", "su") appendfile(".tests/appendfile.txt", "cce") appendfile(".tests/appendfile.txt", "ss") assert(readfile(".tests/appendfile.txt") == "success", "append content mismatch") end) e("isfile", {}, function() writefile(".tests/isfile.txt", "success") assert(isfile(".tests/isfile.txt") == true, "should return true for file") assert(isfile(".tests") == false, "should return false for folder") assert(isfile(".tests/doesnotexist.exe") == false, "should return false for nonexistent") end) e("isfolder", {}, function() assert(isfolder(".tests") == true, "should return true for folder") assert(isfolder(".tests/doesnotexist.exe") == false, "should return false for nonexistent") end) e("delfolder", {}, function() makefolder(".tests/delfolder") delfolder(".tests/delfolder") assert(isfolder(".tests/delfolder") == false, "folder not deleted") end) e("delfile", {}, function() writefile(".tests/delfile.txt", "Hello, world!") delfile(".tests/delfile.txt") assert(isfile(".tests/delfile.txt") == false, "file not deleted") end) e("dofile", {}) print("\n[INPUT]") e("isrbxactive", {"isgameactive"}, function() assert(type(isrbxactive()) == "boolean", "should return boolean") end) e("mouse1click", {}) e("mouse1press", {}) e("mouse1release", {}) e("mouse2click", {}) e("mouse2press", {}) e("mouse2release", {}) e("mousemoveabs", {}) e("mousemoverel", {}) e("mousescroll", {}) print("\n[INSTANCES]") e("fireclickdetector", {}, function() local d = Instance.new("ClickDetector") fireclickdetector(d, 50, "MouseHoverEnter") end) e("getcallbackvalue", {}, function() local b = Instance.new("BindableFunction") local function tst() end b.OnInvoke = tst assert(getcallbackvalue(b, "OnInvoke") == tst, "callback value mismatch") end) e("getconnections", {}, function() local tp = { Enabled = "boolean", ForeignState = "boolean", LuaConnection = "boolean", Function = "function", Thread = "thread", Fire = "function", Defer = "function", Disconnect = "function", Disable = "function", Enable = "function" } local b = Instance.new("BindableEvent") b.Event:Connect(function() end) local c = getconnections(b.Event)[1] for k, v in pairs(tp) do assert(c[k] ~= nil, "missing field: " .. k) assert(type(c[k]) == v, "field " .. k .. " should be " .. v) end end) e("getcustomasset", {}, function() writefile(".tests/getcustomasset.txt", "success") local cid = getcustomasset(".tests/getcustomasset.txt") assert(type(cid) == "string", "should return string") assert(#cid > 0, "should not return empty string") assert(string.match(cid, "rbxasset://"), "should return rbxasset url") end) e("gethiddenproperty", {}, function() local fr = Instance.new("Fire") local pr, ih = gethiddenproperty(fr, "size_xml") assert(pr == 5, "hidden property value mismatch") assert(ih == true, "should return true for hidden property") end) e("sethiddenproperty", {}, function() local fr = Instance.new("Fire") local hd = sethiddenproperty(fr, "size_xml", 10) assert(hd, "should return true") assert(gethiddenproperty(fr, "size_xml") == 10, "hidden property not set") end) e("gethui", {}, function() assert(typeof(gethui()) == "Instance", "should return instance") end) e("getinstances", {}, function() assert(getinstances()[1]:IsA("Instance"), "first value should be instance") end) e("getnilinstances", {}, function() assert(getnilinstances()[1]:IsA("Instance"), "first value should be instance") assert(getnilinstances()[1].Parent == nil, "first value should be parented to nil") end) e("isscriptable", {}, function() local fr = Instance.new("Fire") assert(isscriptable(fr, "size_xml") == false, "should return false for hidden") assert(isscriptable(fr, "Size") == true, "should return true for scriptable") end) e("setscriptable", {}, function() local fr = Instance.new("Fire") local ws = setscriptable(fr, "size_xml", true) assert(ws == false, "should return false for hidden property") assert(isscriptable(fr, "size_xml") == true, "should now be scriptable") fr = Instance.new("Fire") assert(isscriptable(fr, "size_xml") == false, "⚠️ setscriptable persists between instances") end) e("setrbxclipboard", {}) print("\n[METATABLE]") e("getrawmetatable", {}, function() local mt = { __metatable = "Locked!" } local ob = setmetatable({}, mt) assert(getrawmetatable(ob) == mt, "should return metatable") end) e("hookmetamethod", {}, function() local ob = setmetatable({}, { __index = newcclosure(function() return false end), __metatable = "Locked!" }) local rf = hookmetamethod(ob, "__index", function() return true end) assert(ob.test == true, "hook should change return value") assert(rf() == false, "ref should return original value") end) e("getnamecallmethod", {}, function() local m local rf rf = hookmetamethod(game, "__namecall", function(...) if not m then m = getnamecallmethod() end return rf(...) end) game:GetService("Lighting") assert(m == "GetService", "should capture GetService") end) e("isreadonly", {}, function() local ob = {} table.freeze(ob) assert(isreadonly(ob), "should return true for frozen table") end) e("setrawmetatable", {}, function() local ob = setmetatable({}, { __index = function() return false end, __metatable = "Locked!" }) local or_ = setrawmetatable(ob, { __index = function() return true end }) assert(ob, "should return object") assert(ob.test == true, "should change metatable") if or_ then return or_ == ob and "returned original object" or "did not return original object" end end) e("setreadonly", {}, function() local ob = { success = false } table.freeze(ob) setreadonly(ob, false) ob.success = true assert(ob.success, "should allow modification after unfreeze") end) print("\n[MISCELLANEOUS]") e("identifyexecutor", {"getexecutorname"}, function() local nm, vr = identifyexecutor() assert(type(nm) == "string", "name should be string") return type(vr) == "string" and "version: " .. vr or "no version returned" end) e("lz4compress", {}, function() local rw = "Hello, world!" local cp = lz4compress(rw) assert(type(cp) == "string", "should return string") assert(lz4decompress(cp, #rw) == rw, "decompression failed") end) e("lz4decompress", {}, function() local rw = "Hello, world!" local cp = lz4compress(rw) assert(type(cp) == "string", "should return string") assert(lz4decompress(cp, #rw) == rw, "decompression failed") end) e("messagebox", {}) e("queue_on_teleport", {"queueonteleport"}) e("request", {"http.request", "http_request"}, function() local rs = request({ Url = "https://useragent.cometsploit.com/", Method = "GET" }) assert(type(rs) == "table", "response should be table") assert(rs.StatusCode == 200, "should return 200") local dt = game:GetService("HttpService"):JSONDecode(rs.Body) assert(type(dt) == "table" and type(dt["user-agent"]) == "string", "invalid response body") return "User-Agent: " .. dt["user-agent"] end) e("setclipboard", {"toclipboard"}) e("setfpscap", {}, function() local rs = game:GetService("RunService").RenderStepped local function st() rs:Wait() local sm = 0 for _ = 1, 5 do sm = sm + 1 / rs:Wait() end return math.round(sm / 5) end setfpscap(60) local s60 = st() setfpscap(0) local s0 = st() return s60 .. "fps @60 • " .. s0 .. "fps @0" end) print("\n[SCRIPTS]") e("getgc", {}, function() local gc = getgc() assert(type(gc) == "table", "should return table") assert(#gc > 0, "should not be empty") end) e("getgenv", {}, function() getgenv().__TEST_GLOBAL = true assert(__TEST_GLOBAL, "should set global variable") getgenv().__TEST_GLOBAL = nil end) e("getloadedmodules", {}, function() local md = getloadedmodules() assert(type(md) == "table", "should return table") assert(#md > 0, "should not be empty") assert(typeof(md[1]) == "Instance", "first value should be instance") assert(md[1]:IsA("ModuleScript"), "first value should be modulescript") end) e("getrenv", {}, function() assert(_G ~= getrenv()._G, "_G should differ from game environment") end) e("getrunningscripts", {}, function() local sc = getrunningscripts() assert(type(sc) == "table", "should return table") assert(#sc > 0, "should not be empty") assert(typeof(sc[1]) == "Instance", "first value should be instance") assert(sc[1]:IsA("ModuleScript") or sc[1]:IsA("LocalScript"), "should be script") end) e("getscriptbytecode", {"dumpstring"}, function() local an = game:GetService("Players").LocalPlayer.Character.Animate local bc = getscriptbytecode(an) assert(type(bc) == "string", "should return string for " .. an.ClassName) end) e("getscripthash", {}, function() local an = game:GetService("Players").LocalPlayer.Character.Animate:Clone() local h = getscripthash(an) local sr = an.Source an.Source = "print('Hello, world!')" task.defer(function() an.Source = sr end) local nh = getscripthash(an) assert(h ~= nh, "hash should differ for modified script") assert(nh == getscripthash(an), "hash should match for same source") end) e("getscripts", {}, function() local sc = getscripts() assert(type(sc) == "table", "should return table") assert(#sc > 0, "should not be empty") assert(typeof(sc[1]) == "Instance", "first value should be instance") assert(sc[1]:IsA("ModuleScript") or sc[1]:IsA("LocalScript"), "should be script") end) e("getsenv", {}, function() local an = game:GetService("Players").LocalPlayer.Character.Animate local ev = getsenv(an) assert(type(ev) == "table", "should return table for " .. an.ClassName) assert(ev.script == an, "script global should match animate") end) e("getthreadidentity", {"getidentity", "getthreadcontext"}, function() assert(type(getthreadidentity()) == "number", "should return number") end) e("setthreadidentity", {"setidentity", "setthreadcontext"}, function() setthreadidentity(3) assert(getthreadidentity() == 3, "should set identity to 3") end) print("\n[DRAWING]") e("Drawing", {}) e("Drawing.new", {}, function() local dr = Drawing.new("Square") dr.Visible = false local cd = pcall(function() dr:Destroy() end) assert(cd, "destroy should not error") end) e("Drawing.Fonts", {}, function() assert(Drawing.Fonts.UI == 0, "ui font id mismatch") assert(Drawing.Fonts.System == 1, "system font id mismatch") assert(Drawing.Fonts.Plex == 2, "plex font id mismatch") assert(Drawing.Fonts.Monospace == 3, "monospace font id mismatch") end) e("isrenderobj", {}, function() local dr = Drawing.new("Image") dr.Visible = true assert(isrenderobj(dr) == true, "should return true for image") assert(isrenderobj(newproxy()) == false, "should return false for newproxy") end) e("getrenderproperty", {}, function() local dr = Drawing.new("Image") dr.Visible = true assert(type(getrenderproperty(dr, "Visible")) == "boolean", "visible should be boolean") local ok, rs = pcall(function() return getrenderproperty(dr, "Color") end) if not ok or not rs then return "image.color not supported" end end) e("setrenderproperty", {}, function() local dr = Drawing.new("Square") dr.Visible = true setrenderproperty(dr, "Visible", false) assert(dr.Visible == false, "visible should be false") end) e("cleardrawcache", {}, function() cleardrawcache() end) print("\n[WEBSOCKET]") e("WebSocket", {}) e("WebSocket.connect", {}, function() local tp = { Send = "function", Close = "function", OnMessage = {"table", "userdata"}, OnClose = {"table", "userdata"} } local ws = WebSocket.connect("ws://echo.websocket.events") assert(type(ws) == "table" or type(ws) == "userdata", "should return table or userdata") for k, v in pairs(tp) do if type(v) == "table" then assert(table.find(v, type(ws[k])), "field " .. k .. " type mismatch") else assert(type(ws[k]) == v, "field " .. k .. " should be " .. v) end end ws:Close() end)