ScriptBlox is undergoing maintenance, so downtime is possible. Sorry for the inconvenience!
Universal Script 📌
9.0k Views

unc test (open source)

Universal Script 📌Uploaded by
2 years ago
Please login to perform these actions:

Description

test

View Raw
Edited By: therealpatrick Download


Comments
1
User profile picture
AimlockDev 2 years ago - Edited
--[[ 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.s*(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("UNC 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("UNC 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.inv
Please Login to add a comment.