
KeylessUniversal

--// by sillzchibi - you can learn about luau here: https://luau.org/
print("\n(btw this may look shit on your executor if it has a buildin console. please use roblox /console...)\n")
local LogService = game:GetService("LogService")
local wrn, sformat = warn, string.format
local function info(...)
LogService:Info(...)
end
local TEST_NAME = "Luau Conformance Suite (LCS) by sillzchibi -"
local VERSION = "v2.0"
local EXECUTOR, VER = "[Unknown Executor]:", "?"
if identifyexecutor then
EXECUTOR, VER = identifyexecutor()
end
info(sformat("\n=== %s %s ===", TEST_NAME, VERSION))
info(sformat("testing: %s %s\n", EXECUTOR, VER))
local loadstr_enabled, _ = pcall(loadstring, "return true", "init_check")
if not loadstr_enabled then
return error("loadstring() is not available or enabled. test aborted.", 0)
end
local success_chunk, success_err = loadstring("return true", "expected_success")
local fail_chunk, fail_err = loadstring("return @@@", "expected_fail")
if not (success_chunk and not success_err and not fail_chunk and fail_err) then
return error("the current executor has a bad loadstring implementation. test aborted.", 0)
end
local strload = loadstring
local tests = table.freeze({
{ name = "Generalized Iteration", code = "local t = {1, 2}; for k, v in t do end" },
{ name = "String Interpolation", code = [[local name = "test"; local _ = `Hi, {name}!`;]] },
{ name = "Floor Division", code = "local _ = 5 // 2" },
{ name = "if-then-else Expressions", code = "local _ = if true then 1 else 2" },
{ name = "Compound Assignments", code = "local x = 1; x += 1" },
{ name = "Attributes", code = [[
@[deprecated {
use = "newApi()",
reason = "newApi is faster",
}]
local function oldApi() return end
]]},
{ name = "Type Annotations", code = [[
local a: number = 1
export type test = { example: any? }
type function typfunc(obj: any): (any) return obj end
type final = typfunc<test>
local b: final = { example = 1 }
]]},
{ name = "Const Bindings", code = "const x = 5" },
{ name = "Require-by-String", code = 'require("@rbx/AvatarAbilities")' },
})
local passed = 0
local total = #tests
for i = 1, total do
local test = tests[i]
local chunk, compile_err = strload(test.code, (test.name):gsub("%s+", ""))
if not chunk then
local clean_err = compile_err or "-unknown compilation error-"
wrn(sformat("❌ %s - Compilation failed: %s", test.name, clean_err))
continue
end
local run_success, run_err = pcall(chunk)
if run_success then
passed += 1
info(sformat(" %s", test.name))
else
local clean_err = run_err or "unknown execution error"
wrn(sformat("❌ %s - Execution failed: %s", test.name, clean_err))
end
end
info("---------------------------------")
info(sformat("tests passed: %d/%d", passed, total))
local percentage = math.floor((passed / total) * 100)
info(sformat("Conformance Score: %d%%", percentage))
if passed == total then
info("✅️ SUCCESS: your executor fully supports modern Luau syntax and execution!")
else
wrn("❌ FAILED: your executor does not fully support modern Luau execution or syntax.")
endNo comments yet for this script.



