KrystekYY

Untitled

Aug 5th, 2021
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function isnil(thing)
  2. return (thing == nil)
  3. end
  4.  
  5.  
  6. local function round(n)
  7. return math.floor(tonumber(n) + 0.5)
  8. end
  9.  
  10. function UpdatePlayerChams()
  11. for i,v in pairs(game:GetService'Players':GetChildren()) do
  12. pcall(function()
  13. if not isnil(v.Character) then
  14. for _,k in pairs(v.Character:GetChildren()) do
  15. if k:IsA'BasePart' and not k:FindFirstChild'Cham' then
  16. local cham = Instance.new('BoxHandleAdornment',k)
  17. cham.ZIndex= 10
  18. cham.Adornee=k
  19. cham.AlwaysOnTop=true
  20. cham.Size=k.Size
  21. cham.Transparency=.7
  22. cham.Color3=Color3.new(1,0,0)
  23. cham.Name = 'Cham'
  24. end
  25. end
  26. if not isnil(v.Character.Head) and not v.Character.Head:FindFirstChild'NameEsp' then
  27. local bill = Instance.new('BillboardGui',v.Character.Head)
  28. bill.Name = 'NameEsp'
  29. bill.Size=UDim2.new(1,200,1,30)
  30. bill.Adornee=v.Character.Head
  31. bill.AlwaysOnTop=true
  32. local name = Instance.new('TextLabel',bill)
  33. name.TextWrapped=true
  34. name.Text = (v.Name ..' '.. round((game:GetService('Players').LocalPlayer.Character.Head.Position - v.Character.Head.Position).Magnitude/3) ..'m')
  35. name.Size = UDim2.new(1,0,1,0)
  36. name.TextYAlignment='Top'
  37. name.TextColor3=Color3.new(0,0,0)
  38. name.BackgroundTransparency=1
  39. else
  40. v.Character.Head.NameEsp.TextLabel.Text = (v.Name ..' '.. round((game:GetService('Players').LocalPlayer.Character.Head.Position - v.Character.Head.Position).Magnitude/3) ..'m')
  41. end
  42. end
  43. end)
  44. end
  45. end
  46.  
  47. while wait() do
  48. UpdatePlayerChams()
  49. end
RAW Paste Data