How do i fix anti cheat bypass?

local LocalScript = script.Parent
local player = game.Players.LocalPlayer
local CoreGui = player.PlayerGui

local AllowedGuis = {}
local AllowedScripts = {}

local function AddDefaultGuis()
	for _, child in ipairs(game:GetDescendants()) do
		if child:IsA("ScreenGui") then
			table.insert(AllowedGuis, child.Name)
		end
	end
end

local function AddDefaultScripts()
	for _, child in ipairs(game:GetDescendants()) do
		if child:IsA("LocalScript") then
			table.insert(AllowedScripts, child.Name)
		end
	end
end

game:GetService("RunService").RenderStepped:Connect(function()
	if LocalScript == nil then
		player:Kick("Exploits Detected: LocalScript replaced.")
		print("Exploit Detected: LocalScript replaced.")
	end
end)

AddDefaultGuis()
wait(0.1)

CoreGui.ChildAdded:Connect(function(child)
	local guiName = child.Name
	if not table.find(AllowedGuis, guiName) then
		player:Kick("You has perme")
		print("Exploit Detected: New GUI added.")
	else
		local defaultGuiInstance = CoreGui:FindFirstChild(guiName)
		local sameComponents = true
		for _, defaultComponent in ipairs(defaultGuiInstance:GetDescendants()) do
			
			if not defaultComponent or defaultComponent.Name ~= defaultComponent.Name then
				sameComponents = false
			end
		end

		if not sameComponents then
			player:Kick("Exploit Detected: New GUI has different components.")
			print("Exploit Detected: New GUI has different components.")
		end
	end
end)

wait(2)
local ins = Instance.new("ScreenGui")
ins.Name = "2"
ins.Parent = CoreGui
print("GUI Added")

how do i pervert bypassing???

So, I want to detect if in a GUI with an allowed name, the components have the same names, and also ensure that there are no excess components.

I cant even begin to comprehend what you have just posted. Also, you’re asking how to “pervert” bypassing??

Yeah, anti cheat works like that, if another gui appears it kicks player, but it have weak. Anti cheat can get bypassed by naming gui with same name of allowed one.