Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Anomaly
- local hpMain
- function WTS(part)
- local screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
- return Vector2.new(screen.x, screen.y)
- end
- function UpdateHealth(model)
- if model:FindFirstChild("Humanoid") and model ~= nil then
- print("working")
- local kumming
- local humanoid = model:WaitForChild("Humanoid")
- kumming = humanoid.HealthChanged:Connect(function(HP)
- if model == nil then
- hpMain = false
- terrorHpMain = false
- return kumming:Disconnect()
- end
- hpMain = humanoid.Health
- end)
- end
- end
- function ESP(part, text, color)
- local name = Drawing.new("Text")
- name.Text = text
- name.Color = color
- name.Position = WTS(part)
- name.Size = 20.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)
- if Anomaly and Anomaly.Humanoid:FindFirstChild("inside_health") then
- name.Color = Color3.new(255, 0, 0)
- name.Text = "[ANOMALY]: " .. Anomaly.Name .. "\n [HP]: " .. hpMain .. "\n [TERROR HP]: " .. Anomaly.Humanoid["inside_health"].Value
- else
- name.Color = Color3.new(255, 5, 0)
- name.Text = "[ANOMALY]: " .. Anomaly.Name .. "\n [HP]: " .. hpMain
- end
- end
- local _, screen = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
- if screen then
- name.Visible = true
- else
- name.Visible = false
- end
- end)
- end)
- end
- game:GetService("Workspace").mainGame["active_anomaly"].ChildAdded:Connect(function(modelB)
- if not modelB:FindFirstChild("Head") then
- return
- end
- coroutine.wrap(UpdateHealth)(modelB)
- Anomaly = modelB
- task.wait(1)
- ESP(modelB.Head, "[ANOMALY]: " .. modelB.Name .. "\n [HP]: " .. hpMain, Color3.new(255, 5, 0))
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement