
3.7k Views
21 Executions
Unified Naming Convention
Universal Script π
skypinealtFirst script
2 years ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
This is an improved version of the original UNC. Change Logs: 1.0.0 - Improved all the existing test functions. - Added getfunctionhash, fireproximityprompt, firetouchinterest, getcallingscript, setclipboard, queue_on_teleport, firesignal, and replicatesignal. Note: All the improved and added test functions are based on UNC and sUNC documentation.
local passes, fails, aliasIssues = 0, 0, 0
local runningTests = 0
local function getGlobal(path)
local env = (getgenv and getgenv()) or getfenv(2)
for segment in string.gmatch(path, "([^.]+)") do
if env then
env = env[segment]
else
break
end
end
return env
end
local function test(globalName, aliases, callback)
runningTests = runningTests + 1
task.spawn(function()
if not callback then
print("βΊοΈ " .. globalName)
elseif not getGlobal(globalName) then
fails = fails + 1
warn("β Global `" .. globalName .. "` does not exist.")
else
local success, message = pcall(callback)
if success then
passes = passes + 1
print("β
" .. globalName .. (message and " β’ " .. tostring(message) or ""))
else
fails = fails + 1
warn("β " .. globalName .. " test failed: " .. tostring(message))
end
end
local missingAliases = {}
if aliases and type(aliases) == "table" then
for _, alias in ipairs(aliases) do
if getGlobal(alias) == nil then
table.insert(missingAliases, alias)
end
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!




