For multiple groups:
local Groups = {0000,0000,0000}
local function InGroup(Player)
for i = 1,#Groups do
if Player:IsInGroup(Groups[i]) then
return true
end
end
return false
end
game.Players.PlayerAdded:connect(function(Player)
if not InGroup(Player) then
Player:Kick("Denied Access")
end
end) |