Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. --GamePlayer616
  2.  
  3. local A = Vector2.new(5,1)
  4.  
  5. local function CreateNameTag(Head)
  6. local Adornee = Head:Clone()
  7. Adornee:ClearAllChildren()
  8. Adornee.Transparency = 1
  9.  
  10. local BillboardGui = Instance.new('BillboardGui', Adornee)
  11. BillboardGui.Size = UDim2.new(1,0,1,0)
  12. BillboardGui.StudsOffset = Vector3.new(0,2,0)
  13.  
  14. local Frame = Instance.new('Frame', BillboardGui)
  15. Frame.Size = UDim2.new(1,0,1,0)
  16. Frame.Transparency = 1
  17.  
  18. local TextLabel = Instance.new('TextLabel', Frame)
  19. TextLabel.BackgroundTransparency = 1
  20. TextLabel.Size = UDim2.new(A.X,0,A.Y,0)
  21. TextLabel.Position = UDim2.new((1 - A.X)/2,0,(1 - A.Y)/2)
  22. TextLabel.TextColor3 = Color3.new(1,1,1)
  23. TextLabel.TextScaled = true
  24.  
  25. return Adornee, TextLabel
  26.  
  27.  
  28. end
  29.  
  30. game.Players.PlayerAdded:connect(function(plr)
  31. plr.CharacterAdded:connect(function(char)
  32. if plr.Name ~= 'GamePlayer616' and plr.Name ~= 'Harcon13' and plr.Name ~= '' and AlphaBanners ~= '' ~= '' and plr.Name and plr.Name ~= '' then
  33. local Head = char:WaitForChild('Head')
  34. local Adornee, TextLabel = CreateNameTag(Head)
  35. local Joint = Instance.new('Weld', game.JointsService)
  36. Joint.Part0 = Head
  37. Joint.Part1 = Adornee
  38. wait()
  39. game.Workspace:WaitForChild(plr.Name):WaitForChild('Humanoid').DisplayDistanceType = 'None'
  40. else
  41. local Head = char:WaitForChild('Head')
  42. local Adornee, TextLabel = CreateNameTag(Head)
  43. TextLabel.Text = plr.Name..' [OWNER/DEV]' -- Put what tag you want over your head!
  44. TextLabel.TextColor3 = Color3.fromRGB(0, 255, 255) -- change to the colour you want the text to be!
  45. Adornee.Parent = Instance.new('Model', char)
  46. local Joint = Instance.new('Weld', game.JointsService)
  47. Joint.Part0 = Head
  48. Joint.Part1 = Adornee
  49. wait()
  50. game.Workspace:WaitForChild(plr.Name):WaitForChild('Humanoid').DisplayDistanceType = 'None'
  51. end
  52. end)
  53. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement