Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local function esp(Part)
- if Part:IsA("BasePart") then
- local a = Instance.new("BoxHandleAdornment", game.CoreGui)
- a.Name = Part.Parent.Name
- a.Adornee = Part
- a.AlwaysOnTop = true
- a.ZIndex = 0
- a.Size = Part.Size
- a.Transparency = 0.7
- a.Color = BrickColor.new("Lime green")
- local BillboardGui = Instance.new("BillboardGui", game.CoreGui)
- local TextLabel = Instance.new("TextLabel")
- BillboardGui.Adornee = Part.Parent.Head
- BillboardGui.Name = Part.Parent.Name
- BillboardGui.Size = UDim2.new(0, 100, 0, 150)
- BillboardGui.StudsOffset = Vector3.new(0, 1, 0)
- BillboardGui.AlwaysOnTop = true
- TextLabel.Parent = BillboardGui
- TextLabel.BackgroundTransparency = 1
- TextLabel.Position = UDim2.new(0, 0, 0, -50)
- TextLabel.Size = UDim2.new(0, 100, 0, 100)
- TextLabel.Font = Enum.Font.SourceSansSemibold
- TextLabel.TextSize = 20
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom
- game:GetService("RunService").RenderStepped:Connect(function()
- if Part.Parent ~= nil and Part.Parent:FindFirstChild('HumanoidRootPart') and Part.Parent:FindFirstChild('Humanoid') and game.CoreGui:FindFirstChild(Part.Parent.Name) then
- local pos = math.floor((game.Players.LocalPlayer.Character.HumanoidRootPart.Position - Part.Position).magnitude)
- TextLabel.Text = 'Name: '..Part.Parent.Name..' | Studs: '..pos else
- BillboardGui:Destroy() a:Destroy()
- end
- end)
- Part.Parent.Humanoid.Died:Connect(function()
- a:Destroy()
- BillboardGui:Destroy()
- end)
- end
- end
- for i,v in pairs(game.Players:GetChildren()) do
- if v ~= Player then
- if v.Character then
- if v.Character:FindFirstChild("HumanoidRootPart") then
- esp(v.Character.HumanoidRootPart)
- end
- v.Character.ChildAdded:Connect(function(child)
- if child.Name == "HumanoidRootPart" then
- esp(child)
- end
- end)
- end
- v.CharacterAdded:Connect(function(char)
- local human = Char:WaitForChild("Humanoid")
- local root = Char:WaitForChild("HumanoidRootPart")
- esp(root)
- end)
- end
- end
- game.Players.PlayerAdded:Connect(function(plr)
- plr.CharacterAdded:Connect(function(char)
- local human = char:WaitForChild("Humanoid")
- local root = char:WaitForChild("HumanoidRootPart")
- esp(root)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement