Advertisement
Guest User

Custom Nametags

a guest
Jun 19th, 2017
845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. --[[Change the "NAMEHERE" to your Username Enjoy <3
  2. Script by: RobloxManagement
  3. Pastebin by: RuneShark
  4. ]]--
  5. local ad = Vector2.new(5,1)
  6.  
  7. local function CreateNameTag(Head)
  8. local Adornee = Head:Clone()
  9. Adornee:ClearAllChildren()
  10. Adornee.Transparency = 1
  11.  
  12. local bill = Instance.new("BillboardGui", Adornee)
  13. bill.Size = UDim2.new(1, 0, 1, 0)
  14. bill.StudsOffset = Vector3.new(0, 2, 0)
  15.  
  16. local Frame = Instance.new("Frame", bill)
  17. Frame.Size = UDim2.new(1, 0, 1, 0)
  18. Frame.BackgroundTransparency = 1
  19.  
  20. local text = Instance.new("TextLabel", Frame)
  21. text.BackgroundTransparency = 1
  22. text.Size = UDim2.new(ad.X,0,ad.Y,0)
  23. text.Position = UDim2.new((1 - ad.X)/2,0,(1 - ad.Y)/2)
  24. text.TextColor3 = Color3.new(1,1,1)
  25. text.TextScaled = true
  26.  
  27. return Adornee, text
  28. end
  29.  
  30. game.Players.ChildAdded:connect(function(plr)
  31. plr.CharacterAdded:connect(function(char)
  32. if plr.Name == "Player1" and plr.Name == "NAMEHERE" then
  33. local Head = char:WaitForChild("Head")
  34. local Adornee, text = CreateNameTag(Head)
  35. text.Text = plr.Name
  36. Adornee.Parent = Instance.new("Model", char)
  37.  
  38. local Joint = Instance.new("Weld")
  39. Joint.Part0 = Head
  40. Joint.Part1 = Adornee
  41. Joint.Parent = game.JointsService
  42. wait()
  43. game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").DisplayDistanceType = "None"
  44. else
  45. local Head = char:WaitForChild("Head")
  46. local Adornee, text = CreateNameTag(Head)
  47. text.Text = plr.Name .. " [Developer]"
  48. text.TextColor3 = Color3.fromRGB(0,0,255)
  49. Adornee.Parent = Instance.new("Model", char)
  50.  
  51. local Joint = Instance.new("Weld")
  52. Joint.Part0 = Head
  53. Joint.Part1 = Adornee
  54. Joint.Parent = game.JointsService
  55. wait()
  56. game.Workspace:WaitForChild(plr.Name):WaitForChild("Humanoid").DisplayDistanceType = "None"
  57. end
  58. end)
  59. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement