Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. local Service = game:GetService("MarketplaceService")
  2. game.Players.PlayerAdded:Connect(function(plr)
  3. plr.CharacterAdded:Connect(function(char)
  4. if not plr then
  5. warn("an error occured fetching the plr")
  6. end
  7. wait(1)
  8. local ui = script.Rank:Clone()
  9. ui.Parent = char
  10. ui.Adornee = char.Head
  11.  
  12. while not plr.Character.Humanoid do wait() end
  13. plr.Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  14. local frame = ui.Frame
  15. local name = frame.Name1
  16. local rank = frame.TextLabel
  17. name.Text = plr.Name
  18. rank.Text = "Guest"
  19.  
  20. local GroupService = game:GetService('GroupService')
  21. wait(2)
  22. while true do
  23. for i,v in pairs(GroupService:GetGroupsAsync(plr.UserId))do
  24. if v.Id == 4412069 then
  25. rank.Text = v.Role
  26. break
  27. else
  28. rank.Text = "Guest"
  29. end
  30. end
  31.  
  32.  
  33.  
  34. if plr:GetRankInGroup(4412069) == 2 then
  35. wait(1)
  36. name.TextColor3 = Color3.new(255, 255, 0)
  37. rank.TextColor3 = Color3.new(255, 255, 0)
  38. end
  39.  
  40. if rank.Text == "Unknown Rank" then
  41. rank.Text = "Guest"
  42. wait(2)
  43. end
  44.  
  45. plr.Chatted:Connect(function(Message)
  46. if (Message:lower() == "!host") and plr:GetRankInGroup(4412069) >= 11 then
  47. name.Text = "Host | ".. plr.Name
  48.  
  49.  
  50. else
  51. print(plr.Name.. ' nice try!')
  52. end
  53. end)
  54.  
  55. plr.Chatted:Connect(function(Message)
  56. if (Message:lower() == "!unrole") and plr:GetRankInGroup(4412069) >= 7 then
  57. name.Text = plr.Name
  58.  
  59.  
  60. else
  61. print(plr.Name.. ' nice try!')
  62. end
  63. end)
  64.  
  65. plr.Chatted:Connect(function(Message)
  66. if (Message:lower() == "!co-host") and plr:GetRankInGroup(4412069) >= 7 then
  67. name.Text = "Co-Host | ".. plr.Name
  68.  
  69.  
  70. else
  71. print(plr.Name.. ' nice try!')
  72. end
  73. end)
  74.  
  75. plr.Chatted:Connect(function(Message)
  76. if (Message:lower() == "!spectator") and plr:GetRankInGroup(4412069) >= 7 then
  77. name.Text = "Spectator | ".. plr.Name
  78.  
  79.  
  80. else
  81. print(plr.Name.. ' nice try!')
  82. end
  83. end)
  84.  
  85. plr.Chatted:Connect(function(Message)
  86. if (Message:lower() == "!afk") and plr:GetRankInGroup(4412069) >= 7 then
  87. name.Text = "AFK | ".. plr.Name
  88.  
  89.  
  90. plr.Character.Humanoid.WalkSpeed = 0
  91.  
  92. else
  93. print(plr.Name.. ' nice try!')
  94. end
  95. end)
  96. plr.Chatted:Connect(function(Message)
  97. if (Message:lower() == "!unafk") and plr:GetRankInGroup(4412069) >= 7 then
  98. name.Text = plr.Name
  99. plr.Character.Humanoid.WalkSpeed = 16
  100.  
  101.  
  102.  
  103. else
  104. print(plr.Name.. ' nice try!')
  105. end
  106. end)
  107.  
  108. plr.Chatted:Connect(function(Message)
  109. if (Message:lower() == "!interviewer") and plr:GetRankInGroup(4412069) >= 7 then
  110. name.Text = "Interviewer | "..plr.Name
  111.  
  112.  
  113. else
  114. print(plr.Name.. ' nice try!')
  115. end
  116. end)
  117.  
  118.  
  119. end
  120.  
  121.  
  122. end)
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement