If debug library can be used on servers, is it possible to check if it was fired by a injector/exploit application? This would only apply to remote events and functions an example would be:
local format = {
{"Players", "Player_Name", "PlayerScripts", 1},
{"ReplicatedStorage", "Signal", 2}
}
local function checkStackDifference(stackBegin : string)
for index = 1, #stackBegin - 1 do
local stack = stackBegin[i]:split(".")
for index, name in ipairs(stack) do
if (format[index] == "Player_Name") then
if (not (name == PlayerObject.Name)) then
return false
end
elseif (index == #stack and not (format[index] == tonumber(name))) then
return false
elseif (not (format[index] == name)) then
return false
end
end
end
return true
end
Event.OnServerEvent:Connect(function(player, argument)
local stackBegin = debug.traceback():gsub(":", "."):split("\n")
if (not checkStackDifference(stackBegin)) then
player:Kick("...")
end
end)
I’m not sure if this works never tried it.