function Checks.RobloxLocked()
return Player.Name
end
function Checks.SecurityContext()
assert(not pcall(function() return workspace.DataCost end))
assert(not pcall(function() return workspace.RobloxLocked end))
assert(not pcall(function() return game:GetService("CoreGui").Name end))
assert(not pcall(function() return game:GetService("CoreGui").SelectionImageObject end))
assert(not pcall(function() return game:GetService("Chat"):GetShouldUseLuaChat() end))
end
local function validateTrace(trace)
local prev trace = trace:gsub("^.-Begin","")
for v in trace:gmatch("Script '.-, Line") do
assert(not prev or prev == v) prev = v
end
end
function Checks.InstanceMetatable()
assert(RF.InvokeServer == Instance.new("RemoteFunction").InvokeServer)
validateTrace(xpcall(function() return game.Banana end,function() return debug.traceback() end))
validateTrace(xpcall(function() RF:InvokeServer({[game]=1}) end,function() return debug.traceback() end))
validateTrace(xpcall(function() RE:FireServer({[game]=1}) end,function() return debug.traceback() end))
assert(getmetatable(game) == getmetatable(RF)) assert(type(getmetatable(game)) == "string")
end
Didn’t add a “check if InvokeServer has changed since the script started, just in case”.
(not that it should matter with the other checks, unless they return a C-function, like GetFullName)
Also need to do the InvokeServer check for all RE/RF methods.