local whitelist = {"world_kiIIer","Femme_Devil"} while wait() do for i,v in pairs(whitelist) do if #gui:GetChildren() > 4 and player.Name ~= v then game.Players.LocalPlayer:Kick("dont cheat") end if #rank:GetChildren() > 11 and player.Name ~= v then player:Kick("dont cheat") end end end
i still get kicked when i got more than allowed (world_kiIIer) is the account i work with in studio
Please use a dictionary and access its index for stuff like this. your script kicks you because in one of the iterations, a conditional returns false on the whitelist part.
local player = game.Players.LocalPlayer local whitelist = { ['world_kiIIer'] = true, ['Femme_Devil'] = true } while wait() do if not whitelist[player.Name] then if #rank:GetChildren() > 11 or #gui:GetChildren() > 4 then player:Kick("Don't cheat.") end end end