So I came up with that idea, I just want to know if you can check if a player uses a hack gui like that:
There is a RemoteFunction in ReplicatedStorage called “Check”
Script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local CheckEvent = ReplicatedStorage:WaitForChild("Check")
local AbleGuis = {"InventoryGui"}
while true do
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
local IsOk = CheckEvent:InvokeClient(player, player, AbleGuis)
if IsOk == true then
continue
elseif game.Players:FindFirstChild(IsOk) then
game.Players:FindFirstChild(IsOk):Kick("Exploit")
end
end
wait(5)
end
LocalScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local CheckEvent = ReplicatedStorage:WaitForChild("Check")
local GoodGuis = 0
CheckEvent.OnClientInvoke = function(Player, AbleGuis)
if (#AbleGuis + 3) == #Player:WaitForChild("PlayerGui"):GetChildren() then -- + 3 because of the default guis
return true
else
return Player.Name
end
end