local Players = game:GetService("Players")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Character)
local GuiClone = script.PlayerNametag:Clone()
GuiClone.Parent = Character.Head
local Text = GuiClone.Role.Text
local Username = GuiClone.Username.Text
local PlayerName = player.Name
local PlayerRank = player:GetRoleInGroup() -- Put your group ID in the ()
local NotInGroup = "Civilian" -- What players not in the group are named
local NotInGroupColor = Color3.new(1, 1, 1) -- The GUI's color of the people not in the group
local MainGroupID = "13355183" -- Put the main group ID in the " "
local MainGroupColor = Color3.new(0.227451, 0.396078, 0.580392) -- The color of the main group's gui
local HRTID = "13506906" -- Put the Second Group ID in the " ".
local HRTCOLOR = Color3.new(0.623529, 0.180392, 0.231373) -- The color of the second group's gui
local SFID = "13434037" -- Put the Third Group ID in the " ".
local SFColor = Color3.new(0, 0, 0) -- The color of the third group's gui
local IAID = "13433975" -- Put the Third Group ID in the " ".
local IAColor = Color3.new(0, 0.12549, 0.376471) -- The color of the third group's gui
local SID = "13433862" -- Put the Third Group ID in the " ".
local SColor = Color3.new(0.254902, 0.321569, 0.741176) -- The color of the third group's gui
local TAID = "13355801" -- Put the Third Group ID in the " ".
local TAColor = Color3.new(0.152941, 0.27451, 0.176471) -- The color of the third group's gui
-- [[ CUSTOMIZE ]] --
-- SCRIPT --
if player:GetRankInGroup(MainGroupID) >= 18 then
Text.Text = PlayerRank
Text.TextColor3 = MainGroupColor
Username.Text = PlayerName
Username.TextColor3 = MainGroupColor
GuiClone.Division.BackgroundColor3 = MainGroupColor
GuiClone.Division.Text.Text = "FBI Headquarters"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10202071783"
elseif player:IsInGroup(HRTID) then
Text.Text = PlayerRank
Text.TextColor3 = HRTCOLOR
Username.Text = PlayerName
Username.TextColor3 = HRTCOLOR
GuiClone.Division.BackgroundColor3 = HRTCOLOR
GuiClone.Division.Text.Text = "Hostage Rescue Team"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10202071783"
elseif player:IsInGroup(SFID) then
Text.Text = PlayerRank
Text.TextColor3 = SFColor
Username.Text = PlayerName
Username.TextColor3 = SFColor
GuiClone.Division.BackgroundColor3 = SFColor
GuiClone.Division.Text.Text = "Special Forces"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10201970115"
elseif player:IsInGroup(IAID) then
Text.Text = PlayerRank
Text.TextColor3 = IAColor
Username.Text = PlayerName
Username.TextColor3 = IAColor
GuiClone.Division.BackgroundColor3 = IAColor
GuiClone.Division.Text.Text = "Internal Affairs"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10202002219"
elseif player:IsInGroup(SID) then
Text.Text = PlayerRank
Text.TextColor3 = SColor
Username.Text = PlayerName
Username.TextColor3 = SColor
GuiClone.Division.BackgroundColor3 = SColor
GuiClone.Division.Text.Text = "Security"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10202015067"
elseif player:IsInGroup(TAID) then
Text.Text = PlayerRank
Text.TextColor3 = TAColor
Username.Text = PlayerName
Username.TextColor3 = TAColor
GuiClone.Division.BackgroundColor3 = TAColor
GuiClone.Division.Text.Text = "Training Academy"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10201981573"
elseif player:IsInGroup(MainGroupID) then
Text.Text = PlayerRank
Text.TextColor3 = MainGroupColor
Username.Text = PlayerName
Username.TextColor3 = MainGroupColor
GuiClone.Division.BackgroundColor3 = MainGroupColor
GuiClone.Division.Text.Text = "FBI Personnel"
GuiClone.Division.ImageLabel.Image = "rbxassetid://10201626414"
else
Text.Text = NotInGroup
Text.TextColor3 = NotInGroupColor
Username.Text = PlayerName
Username.TextColor3 = NotInGroupColor
GuiClone.Division.BackgroundColor3 = NotInGroupColor
GuiClone.Division.Text.Text = " "
GuiClone.Line.BackgroundColor3 = NotInGroupColor
GuiClone.Division.ImageLabel.ImageTransparency = 1
end
end)
end)
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Wait()
wait(0.8)
player:LoadCharacter()
end)