Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function WTS(part)
- local screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
- return Vector2.new(screen.x, screen.y)
- end
- function ESPText(part, color)
- local name = Drawing.new("Text")
- name.Text = part.Parent.Name
- name.Color = color
- name.Position = WTS(part)
- name.Size = 100.0
- name.Outline = true
- name.Center = true
- name.Visible = true
- game:GetService("RunService").Stepped:connect(function()
- pcall(function()
- local destroyed = not part:IsDescendantOf(workspace)
- if destroyed and name ~= nil then
- name:Remove()
- end
- if part ~= nil then
- name.Position = WTS(part)
- end
- local _, screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
- if screen then
- name.Visible = true
- else
- name.Visible = false
- end
- end)
- end)
- end
- local players = game.Players:getChildren()
- for i=1,#players do
- if players[i] ~= game.Players.LocalPlayer then
- if players[i].Character:findFirstChild("HumanoidRootPart") then
- ESPText(players[i].Character.HumanoidRootPart, Color3.new(255/255,0/255,0/255))
- end
- players[i].CharacterAdded:connect(function(char)
- local hrp = char:WaitForChild("HumanoidRootPart")
- ESPText(hrp, Color3.new(255/255,0/255,0/255))
- end)
- end
- end
- game.Players.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:connect(function(char)
- local hrp = char:WaitForChild("HumanoidRootPart")
- ESPText(hrp, Color3.new(255/255,0/255,0/255))
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement