Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. -- Made by ActionWar for TCBY. GroupID can be found at the end of the URL.
  2. -- Note: If you have no experience with Lua scripting, Only edit the groupID and nothing else as you may mess it up.
  3. -- If you are changing the text colors, the values are placed as RGB values, and I suggest you look up a chart for them.
  4.  
  5. groupid = 4290703 --Write your group's id right here, you don't need to worry about anything else, unless you plan on changing colors.
  6.  
  7. game.Players.PlayerAdded:connect(onPlayerRespawned) --Connection for the function right below.
  8. function onPlayerRespawned(newPlayer) --When a player joins the "Players" service.
  9. wait(1) --Obviously waits to start the script
  10. if newPlayer then --Just checking if the player exist.
  11. newPlayer.Character.Humanoid.DisplayDistanceType = "None"
  12. local gui = game.ServerStorage.OverHeadRank:Clone()
  13. gui.Parent = newPlayer.Character.Head
  14. if newPlayer:IsInGroup(groupid) then --Checking if the player actually belongs to the group.
  15. gui.NameLabel.Text = newPlayer.Name
  16. gui.RankLabel.Text = newPlayer:GetRoleInGroup(groupid)
  17.  
  18. elseif not newPlayer:IsInGroup(groupid) then
  19. gui.NameLabel.Text = newPlayer.Name
  20. gui.RankLabel.Text = "Guest"
  21.  
  22. end
  23.  
  24. if newPlayer.UserId == 34323740 then
  25. gui.ColorLoopScript.Disabled = false
  26. end
  27.  
  28. if newPlayer.UserId == 348300378 then
  29. gui.NameLabel.TextColor3 = Color3.new(85/255,255/255,0/255)
  30. gui.RankLabel.TextColor3 = Color3.new(255/255,170/255,255/255)
  31. end
  32.  
  33. if newPlayer.UserId == 66904563 then
  34. gui.NameLabel.TextColor3 = Color3.new(85/255,255/255,255/255)
  35. gui.RankLabel.TextColor3 = Color3.new(139/255,0/255,0/255)
  36. end
  37.  
  38.  
  39. if newPlayer:GetRankInGroup(4290703) >= 14 and newPlayer.UserId ~= 295531036 then
  40. gui.ColorLoopScript.Disabled = false
  41. end
  42. end
  43. end
  44.  
  45. function onPlayerEntered(newPlayer)
  46. newPlayer.Changed:connect(function (property)
  47. if (property == "Character") then
  48. onPlayerRespawned(newPlayer)
  49.  
  50. end
  51. end)
  52. end
  53.  
  54. game.Players.PlayerAdded:connect(onPlayerEntered)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement