I have tried to do GroupService | Roblox Creator Documentation but I really don’t understand. How would I use it it scan a whole group in my code.
My code:
-- Groups --
local NRB = 4734688 --NRB = Nighthawk Reaper Battalion--
local RC = 7581138 --RC = Red Cell-- --3880488--
local RCSF = 4236314 --RCSF = Red Cell Special Forces--
local RCSFP = 5306090 --RCSF:P = Red Cell Special Forces: Phantoms--
local RCT = 4924452 --RCT = Red Cell Templars--
local RCTC = 6920519 --Red Cell Templars: Chevaliers--
--Flags--
local Flag1 = "Player in NRB and RC"
local Flag2 = "Player also in RCSF"
local Flag3 = "Player also in RCSF:P"
local Flag4 = "Player also in RCT"
local Flag5 = "Player also in RCT:C"
--Checking Procces--
print("Scanning for corruptions in NRB. Please Stand by.")
--Main Code--
game.Players.PlayerAdded:Connect(function(Player)
if Player:IsInGroup(NRB) and Player:IsInGroup(RC) then
print("Detected Curruption.")
print("Player: "..Player.Name.."Flagged. Reason: ", Flag1)
if Player:IsInGroup(RCSF) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag2)
end
if Player:IsInGroup(RCSFP) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag3)
end
if Player:IsInGroup(RCT) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag4)
end
if Player:IsInGroup(RCTC) then
print("Player: "..Player.Name.."Flagged. Reason: ", Flag5)
end
else
print("Scanned for curruptions. No one was flagged.")
end
end)
I would greatly appreciate it if someone helped.