Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local groupID = 0;
- local before_name = false;
- local ts = tostring
- game.Players.PlayerAdded:connect(function(player)
- repeat wait() until player.Character
- local char = player.Character
- getRole(player)
- player.Changed:connect(function()
- repeat wait() until player.Character
- wait()
- getRole(player)
- end)
- end)
- function createTitle(p, s)
- local gui = script.Title
- local clone = gui:Clone()
- clone.Parent = p.Character.Head
- if before_name then
- clone.F.T.Text = s.." "..p.Name
- else
- clone.F.T.Text = p.Name..", "..s
- end
- end
- function getRole(player)
- player.Character.Humanoid.NameOcclusion = "OccludeAll"
- if player.Character.Head:findFirstChild("Title") then
- return false
- elseif not player.Character.Head:findFirstChild("Title") and player:IsInGroup(groupID) then
- local rankString = player:GetRoleInGroup(groupID)
- createTitle(player, rankString)
- elseif not player:IsInGroup(groupID) then
- createTitle(player, "Customer")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement