Colors next to names depending on rank in chat!

Hello, so basically I am buliding a hotel and I am looking for a way to make it so that every rank has different colors next to there name in chat. I need help figuring this out. For example owner= blue next to his name.

Hey try using this script local GroupId = 1141296

05

06 local TextColorByRank = {

07 "Member" = Color 3. new( 1 , 1 , 1 ),

08 "Administrator" = Color 3. new( 1 , 1 , 1 ),

09 "Owner" = Color 3. new( 1 , 1 , 1 ),

10 }

11

12 while not Game.Players.LocalPlayer do wait() end

13 local plr = game.Players.LocalPlayer

14 local head = plr:WaitForChild( "Head" )

15 if plr:IsInGroup(GroupId) then

16 local gui = Instance.new( "BillboardGui" , head)

17 gui.Adornee = head

18 gui.Size = UDim 2. new( 100 , 0 , 1 , 0 )

19 gui.StudsOffset = Vector 3. new( 0 , 3 , 0 )

20 gui.Name = "RankGui"

21 local rank = Instance.new( "TextLabel" , gui)

22 rank.Name = "Rank"

23 rank.BackgroundTransparency = 1

24 rank.BorderSizePixel = 0

25 rank.ZIndex = 2

26 rank.Font = "ArialBold"

27 rank.Text = plr:GetRoleInGroup(GroupId)

28 rank.Size = UDim 2. new( 1 , 0 , 1 , 0 )

29 rank.TextColor 3 = TextColorByRank [ plr:GetRoleInGroup(GroupId) ] --The line I changed.

30 rank.TextStrokeColor 3 = Color 3. new( 0 , 0 , 0 )

31 rank.TextStrokeTransparency = 0

32 rank.TextScaled = true

33 rank.TextWrapped = false remove the numbers next to the script

1 Like