Anti-exploit, whitelisting certain UIs

Hi there! I’m making an anti-exploit for my game. As exploiters only touch the client-side scripts via GUIs, if I whitelist the UIs for my game via a table, and kick the players with GUIs that aren’t whitelisted, would this be a good idea.

My script right now:

local GUI = game:GetService("StarterGui")



players.PlayerAdded:Connect(function(plr)
	plr.PlayerGui.ChildAdded:Connect(function()
		plr:Kick("You have been kicked by anti-exploit.")
		
	end)	
end)

I want to insert a table and whitelist the UIs, as right now it kicks everyone as I haven’t whitelisted them yet. Any ideas on how I can make the table and whitelist the UIs? Thanks!

local WhitelistedUIs = {"Chat","OtherGUIHere"}

game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").ChildAdded:Connect(function(Child)
   if not table.find(WhitelistedUIs,tostring(Child.Name) then
	  plr:Kick("You have been kicked by anti-exploit.")	
   end	
end)	

This won’t work anyway. UI changes are not replicated to the server.

4 Likes

Do you mean whitelisting UIs is an impossible solution, or the script above won’t work?

1 Like

Your anti exploit won’t work at all, exploiters insert their GUIs into CoreGui (or use an external drawing library, so not using Roblox UI at all, therefore impossible literally to detect) anyway, something we can’t access.

8 Likes

Isn’t Core GUI only accessible by plugins or scripts in the workspace?

CoreGui is only accessible to plugins, command bar, and core scripts. And exploits, but that should be expected.

1 Like

So we cannot access Core GUI, but exploiters can. That means exploits can’t be patchable, unless it’s server-side detection.

The point is, don’t patch the UIs, patch the functions IN the UIs. People don’t need UIs to exploit, and making a detection system for that is just extremely redundant.

SIDE NOTE: GUIs made on the client cannot be seen by the server
SIDE NOTE #2: Exploits are client-sided
SIDE NOTE #3: Exploiters who can effect change on the server are exploiting weaknesses in a game via RemoteEvents/RemoteFunctions

1 Like