I don't know how to make the top bit actually appear on the Rank GUI?
local GUI = script:WaitForChild("Rank")
function returnname(Player)
if Player:IsInGroup(4186863) then
return '|TECOM|'..Player:GetRoleInGroup(4186863)..''..Player:GetRoleInGroup(4186863)
elseif Player:IsInGroup(4186863) then
return ''..Player:GetRoleInGroup(4186863)..'\n'..Player:GetRoleInGroup(4186863)
elseif Player:IsInGroup(4186863) then
return 'Military Police - '..Player:GetRoleInGroup(4186863)..'\n'..Player:GetRoleInGroup(4186863)
elseif Player:IsInGroup(4186863) then
return 'TECOM - '..Player:GetRoleInGroup(4186863)..'\n'..Player:GetRoleInGroup(4186863)
else
return Player:GetRoleInGroup(4186863)
end
end
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
spawn(function()
wait(.8)
local a = GUI:clone()
a.Adornee = Character:WaitForChild("Head")
a.Frame.Name1.Text = Player.Name
if Player.UserId==202142044 then
a.Frame.Name2.Text = Player:GetRoleInGroup(4186798)
elseif Player.UserId==115858190 then
a.Frame.Name2.Text = Player:GetRoleInGroup(3126567)
elseif Player.UserId==1721298 then
a.Frame.Name2.Text = Player:GetRoleInGroup(3126567)
elseif Player.UserId==207946248 then
a.Frame.Name2.Text = Player:GetRoleInGroup(3126567)
elseif Player.UserId==28086589 then
a.Frame.Name2.Text = Player:GetRoleInGroup(3126567)
elseif Player:IsInGroup(3126567) then
a.Frame.Name2.Text = returnname(Player)
else
a.Frame.Name2.Text = 'Civilian'
end
a.Enabled = true
a.Frame.Name1.TextColor3 = Player.TeamColor.Color
a.Parent = Character
Character:WaitForChild('Humanoid').NameOcclusion = Enum.NameOcclusion.OccludeAll
local h = Character.Head:Clone()
local m = Instance.new('Model',Character)
m.Name = 'NameTag'
h.Parent = m
Character.Head:WaitForChild('face'):Destroy()
Character.Head.Transparency = 1
local w = Instance.new('Weld',Character.Head)
w.Part0, w.Part1 = Character.Head, h
end)
end)
end)