So here is the script…
local Players = game.Players
local loaded = false
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:connect(function(char)
local rank = Player:GetRankInGroup([GroupID)
if rank == 0 or rank == 241 or rank == 242 then
Player.Backpack.PrimaryClearance.Value = "CD"
elseif rank == 244 then
Player.Backpack.PrimaryClearance.Value = "L0"
elseif rank == 245 then
Player.Backpack.PrimaryClearance.Value = "L1"
elseif rank == 246 then
Player.Backpack.PrimaryClearance.Value = "L2"
elseif rank == 247 then
Player.Backpack.PrimaryClearance.Value = "L3"
elseif rank == 248 then
Player.Backpack.PrimaryClearance.Value = "L4"
elseif rank == 249 then
Player.Backpack.PrimaryClearance.Value = "L5"
wait()
if not Player.Backpack:FindFirstChild("Detain") then
local Detain = script.Detain:Clone()
Detain.Parent = Player.Backpack
end
elseif rank >= 251 then
Player.Backpack.PrimaryClearance.Value = "Omni"
wait()
if not Player.Backpack:FindFirstChild("Detain") then
local Detain = script.Detain:Clone()
Detain.Parent = Player.Backpack
loaded = true
end
end
end)
end)
if loaded then
print("Clearance Giver successfully loaded")
else
print("Clearance Giver was not loaded")
end
And I want it to get rid of the rankID’s and replace it with teams as in…
Class-D Team will get a “CD” Clearance anyone know how to do this?