IIRC, it might be LocalUserSecurity
then.
The reply you quoted referenced changing how a script runs (server script v localscript) through a property with Roblox Luau script code, which has nothing to do with a script’s security level. Exploits can very easily change a script’s security level because they have direct access to the client’s memory, and can also very easily call a CoreScript function by getting it’s memory address (or by overwriting a CoreScript, or just by registering their own).
Exploits have more power than CoreScripts themselves, they have direct access to the engine and it’s memory values, so could theoretically do stuff like create custom shaders or manually set how often the physics engine runs if they really wanted to.
This doesn’t work. An idea I have would be
local Services = {
game:GetService("Players"),
game:GetService("ReplicatedStorage"),
game:GetService("ServerScriptService"),
game:GetService("Workspace"),
game:GetService("StarterGui"),
game:GetService("Lighting"),
game:GetService("UserInputService"),
game:GetService("BadgeService"),
game:GetService("TweenService"),
game:GetService("ServerStorage"),
game:GetService("ReplicatedFirst"),
game:GetService("TeleportService"),
--Here you keep adding all of Roblox's services that are accessible with game:GetService()
}
game.DescendantAdded:Connect(function(descendant)
if (not table.find(Services, descendant.Parent)) then
-- ban player
end
end)
I’m not very good with scripting so the script might not work, but I think it could be modified to work a bit better
also anticheat model is offsale
Listening to game.DescendantAdded isn’t a good solution in general. It’s going to fire a lot and just be more of a hindrance to performance than anything else. Player’s character is added? That’s instantly tens if not hundreds of instances alone and thus tens to hundreds of function calls in a single frame. CoreGui descendants aren’t indexable anyway by LocalScripts as per version 527 so I doubt this solution would work anyway:
https://developer.roblox.com/en-us/resources/release-note/Release-Notes-for-527
If it does still work, I am certain that at some point Roblox will patch it. CoreGui isn’t intended to be accessed at all by the developer.
Your script also has a false positive, more often than not an instance is not a direct first-level child of a service, so you’d have to iterate through all of the services and check if descendant:IsDescendantOf/descendant:FindFirstAncestorOfClass whichever service. Since there apparently 45 services and this number is increasing, that’s 4500 descendant checks if an instance with 99 children is added to the game. It isn’t foolproof either, what about nil instances?
I’m all for honeypotting and catching dumb exploiters who think a remote called “GiveMoney” won’t ban them, but it does become problematic when these client-sided checks start causing performance issues.
this is just going to ban anyone that joins lol