LuanHackingPro

Roblox Script Rankup

Nov 27th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. repeat wait() until game.Players.LocalPlayer.Character and game.Players.LocalPlayer:findFirstChild("PlayerGui") and game.Workspace.CurrentCamera
  2. -- Put this script in the StarterGui.
  3. -- Then change the GroupId to your Group's Id.
  4.  
  5. local GroupId = 0
  6.  
  7. local plrgui = game.Players.LocalPlayer.PlayerGui
  8. local cam = game.Workspace.CurrentCamera
  9.  
  10. function GG(v, char) if not v:IsA("Player") then return end
  11. repeat wait() until v and char and char:findFirstChild("Head")
  12. if v and v ~= game.Players.LocalPlayer and char and char:findFirstChild("Head") then
  13. local gui = Instance.new("BillboardGui", plrgui)
  14. if char.Head.Transparency == 0 then gui.Enabled = true else gui.Enabled = false end
  15. gui.Adornee = char.Head char.Head.Changed:connect(function() if char.Head.Transparency == 0 then gui.Enabled = true else gui.Enabled = false end end)
  16. gui.Size = UDim2.new(1,0,1,0)
  17. gui.StudsOffset = Vector3.new(0,3,0)
  18. gui.Name = "RankGui"
  19. local rank = Instance.new("TextLabel", gui)
  20. rank.Name = "Rank"
  21. rank.BackgroundTransparency = 1
  22. rank.ZIndex = 10
  23. rank.Font = "ArialBold"
  24. rank.Size = UDim2.new(1,0,1,0)
  25. rank.TextColor3 = v.TeamColor.Color v.Changed:connect(function() rank.TextColor3 = v.TeamColor.Color end)
  26. rank.TextStrokeColor3 = Color3.new(0,0,0)
  27. rank.TextStrokeTransparency = 0.5
  28. rank.FontSize = "Size8"
  29. rank.Visible = false
  30. rank.Text = "Unknown"
  31. coroutine.resume(coroutine.create(function()
  32. repeat
  33. if v:IsInGroup(GroupId) then
  34. rank.Text = v:GetRoleInGroup(GroupId)
  35. else
  36. rank.Text = "Unknown"
  37. end
  38. wait(1)
  39. until nil
  40. end))
  41. coroutine.wrap(function()
  42. repeat if (char.Head.Position - cam.CoordinateFrame.p).magnitude <= 100 then rank.Visible = true else rank.Visible = false end
  43. if (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7) then rank.FontSize = "Size18"
  44. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7)*2 then rank.FontSize = "Size14"
  45. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7)*3 then rank.FontSize = "Size12"
  46. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7)*4 then rank.FontSize = "Size11"
  47. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7)*5 then rank.FontSize = "Size10"
  48. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= (100/7)*6 then rank.FontSize = "Size9"
  49. elseif (char.Head.Position - cam.CoordinateFrame.p).magnitude <= 100 then rank.FontSize = "Size8"
  50. end wait(1/13.37)
  51. until v.Character ~= char end)()
  52. end
  53. end
  54.  
  55. game.Players.ChildAdded:connect(function(v) v.CharacterAdded:connect(function(char) GG(v, char) end) end)
  56. for i,v in pairs(game.Players:children()) do coroutine.wrap(function() repeat wait() until v.Character GG(v, v.Character) end)() v.CharacterAdded:connect(function(char) GG(v, char) end) end
Add Comment
Please, Sign In to add comment