
wUNC 1 2
Universal Script πUploaded byDescription
--[[ WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk! ]] local passes, fails, undefined = 0, 0, 0 local running = 0 local function getGlobal(path) local value = getfenv(0) while value ~= nil and path ~= "" do local name, nextValue = string.match(path, "^([^.]+)%.?(.*)$") value = value[name] path = nextValue end return value end local function test(name, aliases, callback) running += 1 task.spawn(function() if not callback then print("βΊοΈ " .. name) elseif not getGlobal(name) then fails += 1 warn("β " .. name) else local success, message = pcall(callback) if success then passes += 1 print("β " .. name .. (message and " β’ " .. message or "")) else fails += 1 warn("β " .. name .. " failed: " .. message) end end local undefinedAliases = {} for _, alias in ipairs(aliases) do if getGlobal(alias) == nil then table.insert(undefinedAliases, alias) end end if #undefinedAliases > 0 then undefined += 1 warn("β οΈ " .. table.concat(undefinedAliases, ", ")) end running -= 1 end) end -- Header and summary print("\n") print("wUNC Environment Check") print("β - Pass, β - Fail, βΊοΈ - No test, β οΈ - Missing aliases\n") task.defer(function() repeat task.wait() until running == 0 local rate = math.round(passes / (passes + fails) * 100) local outOf = passes .. " out of " .. (passes + fails) print("\n") print("wUNC v1.2 Summary") print("β Tested with a " .. rate .. "% success rate (" .. outOf .. ")") print("β " .. fails .. " tests failed") print("β οΈ " .. undefined .. " globals are missing aliases") end) -- Cache test("cache.invalidate", {}, function() local container = Instance.new("Folder") local part = Instance.new("Part", container) cache.invalidate(container:FindFirstChild("Part")) assert(part ~= container:FindFirstChild("Part"), "Reference `part` could not be invalidated") end) test("cache.iscached", {}, function() local part = Instance.new("Part") assert(cache.iscached(part), "Part should be cached") cache.invalidate(part) assert(not cache.iscached(part), "Part should not be cached") end) test("cache.replace", {}, function() local part = Instance.new("Part") local fire = Instance.new("Fire") cache.replace(part, fire) assert(part ~= fire, "Part was not replaced with Fire") end) test("cloneref", {}, function() local part = Instance.new("Part") local clone = cloneref(part) assert(part ~= clone, "Clone should not be equal to original") clone.Name = "Test" assert(part.Name == "Test", "Clone should have updated the original") end) test("compareinstances", {}, function() local part = Instance.new("Part") local clone = cloneref(part) assert(part ~= clone, "Clone should not be equal to original") assert(compareinstances(part, clone), "Clone should be equal to original when using compareinstances()") end) -- Closures local function shallowEqual(t1, t2) if t1 == t2 then return true end local UNIQUE_TYPES = { ["function"] = true, ["table"] = true, ["userdata"] = true, ["thread"] = true, } for k, v in pairs(t1) do if UNIQUE_TYPES[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 UNIQUE_TYPES[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 test("checkcaller", {}, function()



EXTREMEHUB | 10+ Games
