Fix executor test script
This commit is contained in:
+18
-17
@@ -11,30 +11,31 @@
|
|||||||
|
|
||||||
local exec_name = identifyexecutor() or getexecutorname() or "Executor"
|
local exec_name = identifyexecutor() or getexecutorname() or "Executor"
|
||||||
|
|
||||||
local UNC = {
|
local checks = {
|
||||||
"setfflag",
|
{"setfflag", setfflag},
|
||||||
"mousemoverel",
|
{"mousemoverel", mousemoverel},
|
||||||
"getrenv",
|
{"getrenv", getrenv},
|
||||||
"hookmetamethod",
|
{"hookmetamethod", hookmetamethod},
|
||||||
"newcclosure",
|
{"newcclosure", newcclosure},
|
||||||
"getnamecallmethod",
|
{"getnamecallmethod", getnamecallmethod},
|
||||||
"gethui",
|
{"gethui", gethui},
|
||||||
"loadstring",
|
{"loadstring", loadstring},
|
||||||
|
{"hookfunction", hookfunction},
|
||||||
|
{"getgc", getgc},
|
||||||
|
{"debug.getupvalue", debug and debug.getupvalue},
|
||||||
}
|
}
|
||||||
|
|
||||||
local missing = {}
|
local missing = {}
|
||||||
for _, name in ipairs(UNC) do
|
for _, entry in ipairs(checks) do
|
||||||
if type(_G[name]) ~= "function" then
|
if type(entry[2]) ~= "function" then
|
||||||
missing[#missing + 1] = name
|
missing[#missing + 1] = entry[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(debug.getupvalue) ~= "function" then
|
local player = game:GetService("Players").LocalPlayer
|
||||||
missing[#missing + 1] = "debug.getupvalue"
|
|
||||||
end
|
|
||||||
|
|
||||||
if #missing > 0 then
|
if #missing > 0 then
|
||||||
game:GetService("Players").LocalPlayer:Kick(exec_name .. " is missing: " .. table.concat(missing, ", "))
|
player:Kick(exec_name .. " is missing: " .. table.concat(missing, ", "))
|
||||||
else
|
else
|
||||||
game:GetService("Players").LocalPlayer:Kick(exec_name .. " supports mirrorhack")
|
player:Kick(exec_name .. " supports mirrorhack")
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user