VunC Source
Key RequiredUniversal

VunC Source

Universal ScriptPkDitsPkDits 1.1K views 68 executesUpdated Dec 23, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•653 lines (23155 chars)
local successCount = 0
local failCount = 0
local bugCount = 0
local function runTest(name, callback)
    local env = getgenv()
    local exists = env[name] or _G[name]
    if not exists and name:find("debug.") then
        local lib, func = name:match("([^.]+)%.([^.]+)")
        if debug and debug[func] then
            exists = debug[func]
        end
    end
    if not exists and name == "bit32" then exists = bit32 end
    if not exists and name == "Drawing" then exists = Drawing end
    if not exists then
        warn("⛔ " .. name .. "")
        failCount = failCount + 1
        return
    end
    local ok, result = pcall(callback)
    if ok and result then
        print("✅ " .. name)
        successCount = successCount + 1
    elseif not ok then
        warn("⛔ " .. name .. " (Error: " .. tostring(result) .. ")")
        failCount = failCount + 1
    else
        warn("⚠️ " .. name .. " (Logic Bug)")
        bugCount = bugCount + 1
    end
end

print("--- [ VUNC IDE ] ---")

runTest("getrawmetatable", function()
    local t = {}
    local mt = { __index = "success" }
    setmetatable(t, mt)
    local rawMt = getrawmetatable(t)
    if type(rawMt) ~= "table" then
        return false
    end
    if rawMt.__index ~= "success" then
        return false
    end
    local protected = setmetatable({}, { __metatable = "protected" })
    local rawProtected = getrawmetatable(protected)
    if type(rawProtected) ~= "table" or rawProtected == "protected" then
        return false
    end
    return true
end)

runTest("getgenv", function()
    local g = getgenv()
    local key = "_UNC_" .. tostring(math.random(1e5, 9e5))
    g[key] = {status = true}
    local check1 = type(g[key]) == "table" and g[key].status == true
    local check2 = (g == getgenv())
    local check3 = (g._G ~= nil)
    local success = check1 and check2 and check3
    g[key] = nil
    return success
end)

runTest("getrenv", function()
    local renv = getrenv()
    local genv = getgenv()
    local ok = type(renv) == "table" and renv.game == game
    local isIsolated = (renv ~= genv)
    local hasNatives = renv.spawn ~= nil and renv.print ~= nil
    local s, res = pcall(function() return renv.shared end)
    return ok and isIsolated and hasNatives and s
end)

runTest("bit32", function()
    local b = bit32
    if not b then return false end
    local checks = {
        b.bxor(0x0F, 0xF0) == 255,
        b.rshift(0x10, 2) == 4,
        b.lshift(0x01, 8) == 256,
        b.band(0xFF, 0x0F) == 0x0F,
        b.bor(0xF0, 0x0F) == 0xFF,
        b.bnot(0) == 4294967295,
        b.rrotate(0x01, 1) == 2147483648
    }
    for _, v in ipairs(checks) do if not v then return false end end
    return true
end)

runTest("identifyexecutor", function()
    local name, ver = identifyexecutor()
    local ok = type(name) == "string" and #name > 0
    if ver then
        ok = ok and (type(ver) == "string" or type(ver) == "number")
    end
    local s, name2 = pcall(identifyexecutor)
    return ok and s and name2 == name
end)

runTest("writefile", function()
    local path = "unc_test_" .. tostring(math.random(100, 999)) .. ".txt"
    local data = "orig_" .. tostring(math.random(100, 999))
    local ok = false
    local s = pcall(function()
        writefile(path, data)
        if isfile(path) and readfile(path) == data then
            ok = true
            if appendfile then
                appendfile(path, "_appended")
                ok = (readfile(path) == data .. "_appended")
            end
        end
        delfile(path)
        if isfile(path) then ok = false end
    end)
    return s and ok
end)

runTest("makefolder", function()
    local name = "unc_test_" .. tostring(math.random(100, 999))
    local ok = false
    local s, err = pcall(function()
        makefolder(name)
        local exists = isfolder(name)
        local found = false
        if listfiles then
            for _, v in ipairs(listfiles("")) do
                if v:find(name) or v == name then found = true break end
            end
        else
            found = true
        end
        if exists and found then ok = true end
        delfolder(name)
    end)
    return ok and not isfolder(name)
end)

runTest("hookfunction", function()
    local target = function(v) return v + 1 end
    local old
    local success, err = pcall(function()
        old = hookfunction(target, function(v) return old(v + 10) end)
    end)
    if not success or type(old) ~= "function" then return false end
    local res1 = target(1) == 12
    local res2 = false
    pcall(function()
        hookfunction(target, old)
        res2 = target(1) == 2
    end)
    return res1 and res2
end)

runTest("hookmetamethod", function()
    local intercepted = false
    local old
    old = hookmetamethod(game, "__namecall", function(self, ...)
        local method = getnamecallmethod()
        if method == "IsA" then intercepted = true end
        return old(self, ...)
    end)
    local _ = game:IsA("DataModel")
    local check1 = intercepted == true
    local check2 = type(old) == "function"
    hookmetamethod(game, "__namecall", old)
    return check1 and check2
end)

runTest("setreadonly", function()
    local t = table.freeze({data = 1})
    local ok = true
    local function checkRO(tbl)
        if isreadonly then return isreadonly(tbl) end
        return pcall(function() tbl.data = 9 end) == false
    end
    setreadonly(t, false)
    t.data = 2
    ok = ok and t.data == 2 and not checkRO(t)
    setreadonly(t, true)
    ok = ok and checkRO(t)
    local mt = getrawmetatable(game)
    local oldRO = isreadonly(mt)
    setreadonly(mt, false)
    ok = ok and not isreadonly(mt)
    setreadonly(mt, true)
    ok = ok and isreadonly(mt)
    setreadonly(mt, oldRO)
    return ok
end)

runTest("checkcaller", function()
    local isExecutor = checkcaller()
    if type(isExecutor) ~= "boolean" then return false end
    local threadCheck = false
    task.spawn(function()
        threadCheck = checkcaller()
    end)
    task.wait(0.05)
    local gameCheck = false
    local s = pcall(function()
        local script = Instance.new("LocalScript")
        script.Source = "return"
        gameCheck = checkcaller()
    end)
    return isExecutor == true and threadCheck == true
end)

runTest("getinstances", function()
    local all = getinstances()
    if type(all) ~= "table" or #all < 10 then return false end
    local sample = all[math.random(1, #all)]
    return typeof(sample) == "Instance"
end)

runTest("fireclickdetector", function()
    local part = Instance.new("Part", workspace)
    local cd = Instance.new("ClickDetector", part)
    local state = false
    local conn = cd.MouseClick:Connect(function() state = true end)
    fireclickdetector(cd, 0)
    local start = os.clock()
    repeat task.wait() until state or (os.clock() - start) > 0.5
    conn:Disconnect()
    cd:Destroy()
    part:Destroy()
    return state
end)

runTest("fireproximityprompt", function()
    local part = Instance.new("Part", workspace)
    local pp = Instance.new("ProximityPrompt", part)
    local state = false
    pp.HoldDuration = 0
    pp.Enabled = true
    local conn = pp.Triggered:Connect(function() state = true end)
    task.spawn(function() fireproximityprompt(pp) end)
    local start = os.clock()
    repeat task.wait() until state or (os.clock() - start) > 0.5
    conn:Disconnect()
    pp:Destroy()
    part:Destroy()
    return state
end)

runTest("Drawing", function()
    local lib = Drawing
    if type(lib) ~= "table" or not lib.new then return false end
    local ok = true
    local function check(a, b)
        if type(a) == "number" and type(b) == "number" then return math.abs(a - b) < 0.01
        elseif typeof(a) == "Color3" and typeof(b) == "Color3" then
            return math.abs(a.R - b.R) < 0.01 and math.abs(a.G - b.G) < 0.01 and math.abs(a.B - b.B) < 0.01
        elseif typeof(a) == "Vector2" and typeof(b) == "Vector2" then
            return math.abs(a.X - b.X) < 0.01 and math.abs(a.Y - b.Y) < 0.01
        end
        return a == b
    end
    local square = lib.new("Square")
    square.Visible, square.ZIndex, square.Transparency = true, 10, 0.44
    square.Color, square.Position, square.Size = Color3.new(1, 0.5, 0), Vector2.new(50, 50), Vector2.new(150, 150)
    square.Filled, square.Thickness = true, 3
    ok = ok and check(square.Visible, true) and check(square.ZIndex, 10) and check(square.Transparency, 0.44)
    ok = ok and check(square.Color, Color3.new(1, 0.5, 0)) and check(square.Position, Vector2.new(50, 50))
    ok = ok and check(square.Size, Vector2.new(150, 150)) and check(square.Filled, true) and check(square.Thickness, 3)
    square:Remove()
    local circle = lib.new("Circle")
    circle.Visible, circle.Transparency, circle.Color = true, 0.75, Color3.new(0, 1, 1)
    circle.Position, circle.Radius, circle.Thickness, circle.NumSides, circle.Filled = Vector2.new(200, 200), 75, 5, 128, false
    ok = ok and check(circle.Visible, true) and check(circle.Transparency, 0.75) and check(circle.Color, Color3.new(0, 1, 1))
    ok = ok and check(circle.Position, Vector2.new(200, 200)) and check(circle.Radius, 75) and check(circle.Thickness, 5)
    ok = ok and (circle.NumSides == 128 or not circle.NumSides) and check(circle.Filled, false)
    circle:Remove()
    local line = lib.new("Line")
    line.Visible, line.From, line.To, line.Thickness, line.Transparency = true, Vector2.new(0, 0), Vector2.new(400, 400), 2, 0.5
    ok = ok and check(line.Visible, true) and check(line.From, Vector2.new(0, 0)) and check(line.To, Vector2.new(400, 400))
    ok = ok and check(line.Thickness, 2) and check(line.Transparency, 0.5)
    line:Remove()
    local text = lib.new("Text")
    text.Visible, text.Text, text.Size, text.Center, text.Outline = true, "UNC_VERIFY", 18, true, true
    text.Position, text.Color, text.OutlineColor = Vector2.new(100, 100), Color3.new(1, 1, 1), Color3.new(0, 0, 0)
    local sF, _ = pcall(function() text.Font = 0 end)
    if sF then ok = ok and (tonumber(text.Font) == 0) else 
        pcall(function() text.Font = Enum.Font.Legacy end) 
    end
    ok = ok and check(text.Visible, true) and text.Text == "UNC_VERIFY" and check(text.Size, 18)
    ok = ok and check(text.Position, Vector2.new(100, 100))
    text:Remove()
    local tri = lib.new("Triangle")
    tri.PointA, tri.PointB, tri.PointC = Vector2.new(0,0), Vector2.new(50,0), Vector2.new(25,50)
    tri.Filled, tri.Color, tri.Visible = true, Color3.new(1, 0, 1), true
    ok = ok and check(tri.PointA, Vector2.new(0,0)) and check(tri.PointB, Vector2.new(50,0)) and check(tri.PointC, Vector2.new(25,50))
    tri:Remove()
    local quad = lib.new("Quad")
    quad.PointA, quad.PointB, quad.PointC, quad.PointD = Vector2.new(0,0), Vector2.new(10,0), Vector2.new(10,10), Vector2.new(0,10)
    quad.Visible, quad.Filled = true, false
    ok = ok and check(quad.PointA, Vector2.new(0,0)) and check(quad.PointC, Vector2.new(10,10))
    quad:Remove()
    local s, _ = pcall(function() lib.new("Invalid") end)
    return ok and not s
end)

runTest("decompile", function()
    local player = game:GetService("Players").LocalPlayer
    local script = player.Character:FindFirstChild("Animate") or player.PlayerScripts:FindFirstChildOfClass("LocalScript")
    if not script then return true end
    local source = decompile(script)
    if type(source) ~= "string" or #source < 5 then return false end
    local invalidSigns = {"-- Failed", "Decompilation failed", "unable to decompile"}
    for _, sign in ipairs(invalidSigns) do
        if source:lower():find(sign:lower()) then return false end
    end
    return true
end)

runTest("request", function()
    local req = request or http_request or (http and http.request)
    if not req then return false end
    local httpService = game:GetService("HttpService")
    local ok = true
    local res = req({Url = "https://httpbin.org/get", Method = "GET", Headers = {["User-Agent"] = "UNC_Test"}})
    if type(res) ~= "table" or res.StatusCode ~= 200 or not res.Success then return false end
    local s, body = pcall(function() return httpService:JSONDecode(res.Body) end)
    if not s or type(body) ~= "table" or not body.url:find("httpbin") then ok = false end
    local postRes = req({Url = "https://httpbin.org/post", Method = "POST", Headers = {["Content-Type"] = "application/json"}, Body = httpService:JSONEncode({test = "logic"})})
    if type(postRes) ~= "table" or postRes.StatusCode ~= 200 then ok = false end
    local s2, body2 = pcall(function() return httpService:JSONDecode(postRes.Body) end)
    if not s2 or type(body2) ~= "table" or not body2.json or body2.json.test ~= "logic" then ok = false end
    local githubRes = req({Url = "https://api.github.com", Method = "GET"})
    if type(githubRes) ~= "table" or githubRes.StatusCode ~= 200 then ok = false end
    local s3, body3 = pcall(function() return httpService:JSONDecode(githubRes.Body) end)
    if not s3 or type(body3) ~= "table" or not body3.current_user_url then ok = false end
    local jsonPlaceholder = req({Url = "https://jsonplaceholder.typicode.com/todos/1", Method = "GET"})
    if type(jsonPlaceholder) ~= "table" or jsonPlaceholder.StatusCode ~= 200 then ok = false end
    local s4, body4 = pcall(function() return httpService:JSONDecode(jsonPlaceholder.Body) end)
    if not s4 or type(body4) ~= "table" or body4.id ~= 1 then ok = false end
    local googleRes = req({Url = "https://www.google.com", Method = "GET"})
    if type(googleRes) ~= "table" or googleRes.StatusCode ~= 200 or type(googleRes.Body) ~= "string" then ok = false end
    return ok
end)

runTest("crypt", function()
    local lib = crypt
    if type(lib) ~= "table" then return false end
    local dec = (lib.base64 and lib.base64.decode) or lib.base64decode or lib.base64_decode or (base64 and base64.decode) or base64_decode
    local enc = (lib.base64 and lib.base64.encode) or lib.base64encode or lib.base64_encode or (base64 and base64.encode) or base64_encode
    if type(dec) ~= "function" or type(enc) ~= "function" then return false end
    if dec("dGVzdA==") ~= "test" or enc("test") ~= "dGVzdA==" then return false end
    if type(lib.generatekey) == "function" and type(lib.encrypt) == "function" and type(lib.decrypt) == "function" then
        local key, iv = lib.generatekey(), lib.generatekey()
        if type(key) ~= "string" or type(iv) ~= "string" then return false end
        local enc1 = lib.encrypt("test", key, iv, "CBC")
        if lib.decrypt(enc1, key, iv, "CBC") ~= "test" then return false end
        local enc2, iv2 = lib.encrypt("test", key, nil, "CBC")
        if not iv2 or lib.decrypt(enc2, key, iv2, "CBC") ~= "test" then return false end
        if type(lib.generatebytes) == "function" then
            local size = math.random(10, 100)
            local bytes = lib.generatebytes(size)
            if type(bytes) ~= "string" or #dec(bytes) ~= size then return false end
        end
        if #dec(key) ~= 32 then return false end
        if type(lib.hash) == "function" then
            local algos = {"sha1", "sha384", "sha512", "md5", "sha256", "sha3-224", "sha3-256", "sha3-512"}
            for _, algo in ipairs(algos) do
                local s, r = pcall(lib.hash, "test", algo)
                if not s or type(r) ~= "string" then return false end
            end
        end
    end
    return true
end)

runTest("getscriptbytecode", function()
    if type(getscriptbytecode) ~= "function" then return false end
    local players = game:GetService("Players")
    local player = players.LocalPlayer
    if not player then return false end
    local ps = player:FindFirstChildOfClass("PlayerScripts")
    local char = player.Character
    local script = (ps and ps:FindFirstChildOfClass("LocalScript")) or (char and char:FindFirstChildOfClass("LocalScript"))
    if not script then return true end
    local ok1, bc1 = pcall(getscriptbytecode, script)
    if not ok1 or type(bc1) ~= "string" or #bc1 < 4 then return false end
    local ok2, bc2 = pcall(getscriptbytecode, script)
    if not ok2 or bc1 ~= bc2 then return false end
    local looksValid = bc1:match("^%z") or bc1:match("^\27") or #bc1 > 10
    if not looksValid then return false end
    local entropyCheck = bc1 ~= string.rep(string.sub(bc1,1,1),#bc1)
    return entropyCheck
end)


runTest("cleardrawcache", function()
    if typeof(cleardrawcache) ~= "function" then return false end
    local line = Drawing.new("Line")
    line.Visible = true
    line.From = Vector2.new(0, 0)
    line.To = Vector2.new(100, 100)
    local success = pcall(function()
        cleardrawcache()
    end)
    return success
end)

runTest("replicatesignal", function()
    local player: Player = game:GetService("Players").LocalPlayer
    local signal = player.ConnectDiedSignalBackend
    if signal then
        replicatesignal(signal)
        return true
    end
    local success: boolean = pcall(function()
        replicatesignal(player.DescendantAdded)
    end)
    return success
end)

runTest("getconnections", function()
    local bindable: BindableEvent = Instance.new("BindableEvent")
    local connection: RBXScriptConnection = bindable.Event:Connect(function() end)
    local connections = getconnections(bindable.Event)
    local success: boolean = type(connections) == "table" and #connections > 0 and type(connections[1].Function) == "function"
    connection:Disconnect()
    bindable:Destroy()
    return success
end)

runTest("firesignal", function()
    local bindable: BindableEvent = Instance.new("BindableEvent")
    local fired: boolean = false
    local connection: RBXScriptConnection = bindable.Event:Connect(function(value) fired = value end)
    firesignal(bindable.Event, true)
    task.wait(0.05)
    connection:Disconnect()
    bindable:Destroy()
    return fired == true
end)

runTest("getfunctionhash", function()
    local func = function() return "test" end
    local hash = getfunctionhash(func)
    local success = type(hash) == "string" and #hash > 0
    local hash2 = getfunctionhash(func)
    return success and hash == hash2
end)

runTest("debug.getupvalues", function()
    local upvalue = function() end
    local function testf()
        print(upvalue)
    end
    local upvalues = debug.getupvalues(testf)
    local isTable = type(upvalues) == "table"
    if not isTable then return false end
    local success = upvalues[1] == upvalue
    local upvalues2 = debug.getupvalues(testf)
    local consistent = type(upvalues2) == "table" and upvalues2[1] == upvalues[1]
    return success and consistent
end)

runTest("debug.getproto",function()
    local function testf()
        local function proto()
            return true;
        end;
    end;
    local proto=(debug.getproto(testf,1,true))[1];
    local realproto=debug.getproto(testf,1);
    if not proto then
        return false;
    end;
    if proto()~=true then
        return false;
    end;
    if not realproto() then
        return "Proto return values are disabled on this executor";
    end;
    return true;
end)

runTest("debug.getconstant",function()
    local function testf()
        print("Hello, world!");
    end;
    if debug.getconstant(testf,1)~="print" then
        return false;
    end;
    if debug.getconstant(testf,2)~=nil then
        return false;
    end;
    if debug.getconstant(testf,3)~="Hello, world!" then
        return false;
    end;
    return true;
end)

runTest("debug.getconstants", function()
    local function testf()
        local num = 5000 .. 50000
        print("Hello, world!", num, warn)
    end
    local constants = debug.getconstants(testf)
    if type(constants) ~= "table" then
        return false
    end
    local check1 = constants[1] == 50000
    local check2 = constants[2] == "print"
    local check3 = constants[3] == nil
    local check4 = constants[4] == "Hello, world!"
    local check5 = constants[5] == "warn"
    return check1 and check2 and check3 and check4 and check5
end)

runTest("debug.getinfo",function()
    local types={
        source="string",
        short_src="string",
        func="function",
        what="string",
        currentline="number",
        name="string",
        nups="number",
        numparams="number",
        is_vararg="number"
    };
    local function testf(...)
        print(...);
    end;
    local info=debug.getinfo(testf);
    if type(info)~="table" then
        return false;
    end;
    for k,v in pairs(types) do
        if info[k]==nil then
            return false;
        end;
        if type(info[k])~=v then
            return false;
        end;
    end;
    return true;
end)

runTest("debug.getprotos", function()
    local function testf()
        local function _1()
            return true
        end
        local function _2()
            return true
        end
        local function _3()
            return true
        end
    end
    local protos = debug.getprotos(testf)
    if type(protos) ~= "table" then
        return false
    end
    for i = 1, #protos do
        local raw = debug.getproto(testf, i, true)
        if type(raw) ~= "table" or not raw[1] then
            return false
        end
        local proto = raw[1]
        local realproto = debug.getproto(testf, i)
        if proto() ~= true then
            return false
        end
        if type(realproto) == "function" and not realproto() then
            return false
        end
    end
    return true
end)

runTest("debug.getstack",function()
    local _="a".."b";
    if debug.getstack(1,1)~="ab" then
        return false;
    end;
    local stack=debug.getstack(1);
    if type(stack)~="table" then
        return false;
    end;
    if stack[1]~="ab" then
        return false;
    end;
    return true;
end)

runTest("debug.getupvalue",function()
    local upvalue=function()
    end;
    local function testf()
        print(upvalue);
    end;
    if debug.getupvalue(testf,1)~=upvalue then
        return false;
    end;
    return true;
end)

runTest("debug.setconstant",function()
    local function testf()
        return "fail";
    end;
    debug.setconstant(testf,1,"success");
    if testf()~="success" then
        return false;
    end;
    return true;
end)

runTest("debug.setstack",function()
    local function testf()
        return "fail",debug.setstack(1,1,"success");
    end;
    if testf()~="success" then
        return false;
    end;
    return true;
end)

runTest("debug.setupvalue", function()
    local function upvalue()
        return "fail"
    end
    local function testf()
        return upvalue()
    end
    local newFunc = function()
        return "success"
    end
    debug.setupvalue(testf, 1, newFunc)
    local result = testf()
    if result ~= "success" then
        return false
    end
    return true
end)


local total = successCount + failCount + bugCount
local rate = (total > 0) and math.floor((successCount / total) * 100) or 0

print("UNC Summary");
print("✅ Passes: " .. successCount);
print("⛔ Fails: " .. failCount);
print("⚠️ Globals with missing aliases: " .. bugCount);
print("Tested success rate: " .. rate .. "% (" .. successCount .. "/" .. total .. ")\n");

Features & Information

Updated Unc script source for 2025 This script may cause crashes, just fix it. I tested it on Volt and it crashed, I don't know if it's a problem with the executor or the script. It tests the following functions below: getrawmetatable, makefolder, getscriptbytecode, setthreadidentity, delfile, request, Drawing.Fonts, isscriptable, iscclosure, debug.setconstant, debug.getprotos, lz4compress, getscripts, isfolder, sethiddenproperty, getthreadidentity, readfile, getscriptclosure, delfolder, setscriptable, Drawing.new, debug.getupvalues, hookmetamethod, debug.getproto, getrunningscripts, checkcaller, debug.setupvalue, setrawmetatable, gethiddenproperty, writefile, setrenderproperty, getnamecallmethod, isfile, fireclickdetector, getnilinstances, getcustomasset, getconnections, islclosure, restorefunction, loadstring, cache.iscached, cache.invalidate, cloneref, cache.replace, getgc, compareinstances, base64_encode, getrenv, hookfunction, debug.getupvalue, setreadonly, getloadedmodules, debug.getinfo, fireproximityprompt, WebSocket.connect, listfiles, gethui, isreadonly, getrenderproperty, lz4decompress, appendfile, loadfile, getinstances, isexecutorclosure, getcallbackvalue, getfunctionhash, replicatesignal, cleardrawcache, filtergc, identifyexecutor, getscripthash, firesignal, firetouchinterest, debug.setstack, isrenderobj, getcallingscript, debug.getstack, getsenv, clonefunction, debug.getconstant, getgenv, newcclosure, base64_decode, debug.getconstants VunC belonged to a friend of mine, but he discontinued the project because he was going to focus on a new one, and that project only lasted a day. Tragic. But he sent me the source code and allowed me to post it, so here it is. I'll try to fix the bugs and crashes, and try to improve the logic of some things, but I can't guarantee anything.

Community Comments (1)

PkDitsPkDitsDec 23, 2025

See the description!

More Scripts for Universal Scripts