Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local camera = workspace.CurrentCamera
- for i, v in next, game:GetService("Players"):GetPlayers() do
- local line = Drawing.new("Line")
- line.Color = Color3.fromRGB(77, 143, 172)
- line.Visible = true
- line.Thickness = 3
- local text = Drawing.new("Text")
- text.Text = tostring(v)
- text.Color = Color3.fromRGB(255, 255, 255)
- text.Size = 20
- text.Visible = true
- text.Outline = true
- game:GetService("RunService").Stepped:connect(function()
- if v.Character == nil then
- line.Visible = false
- repeat wait() until v.Character
- line.Visible = true
- end
- local man, hacc = camera:WorldToScreenPoint(v.Character.Head.CFrame.p)
- local man2, hacc2 = camera:WorldToScreenPoint(game.Players.LocalPlayer.Character.Head.CFrame.p)
- if not hacc then
- line.Visible = false
- else
- line.Visible = true
- end
- line.From = Vector2.new(man.X, man.Y + 20)
- line.To = Vector2.new(man2.X, man2.Y + 20)
- end)
- game:GetService("RunService").Stepped:connect(function()
- if v.Character == nil then
- text.Visible = false
- repeat wait() until v.Character
- text.Visible = true
- end
- local man, hacc = camera:WorldToScreenPoint(v.Character.Head.CFrame.p)
- if not hacc then
- text.Visible = false
- else
- text.Visible = true
- end
- text.Position = Vector2.new(man.X - 30, man.Y + 30)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement