Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RunService = game:GetService("RunService")
- local camera = workspace.CurrentCamera
- local drawing = Drawing.new("Text")
- drawing.Visible = false
- drawing.Size = 20
- drawing.Color = Color3.new(1, 1, 1)
- drawing.Center = true
- drawing.Outline = true
- RunService.RenderStepped:Connect(function()
- for _, model in pairs(workspace:GetChildren()) do
- if model:IsA("Model") and model:FindFirstChild("Head") then
- local head = model.Head
- local screenPosition, onScreen = camera:WorldToScreenPoint(head.Position)
- if onScreen then
- drawing.Visible = true
- drawing.Position = Vector2.new(screenPosition.X, screenPosition.Y)
- local hasSteelHelmet = model:FindFirstChild("SteelHelmet") ~= nil
- drawing.Color = hasSteelHelmet and Color3.new(1, 0, 0) or Color3.new(1, 1, 1)
- drawing.Text = tostring((camera.CFrame.p - head.Position).Magnitude)
- else
- drawing.Visible = false
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement