Advertisement
Guest User

Sythical | Apoc Rising Script (Zombie ESP)

a guest
Jul 25th, 2022
496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. -- // services
  2. local run_service = game:GetService("RunService")
  3. local camera = workspace.CurrentCamera
  4. local localplayer = game:GetService("Players").LocalPlayer
  5. -- // tables
  6. local settings = {
  7. location = {enabled = true, color = Color3.new(1,1,1), distance = 1000},
  8. zombie = {enabled = true, color = Color3.new(1,0,0), distance = 1000}
  9. }
  10. --
  11. local location_drawings = {}
  12. local zombie_drawings = {}
  13. -- // functions
  14. function draw(instance, properties)
  15. local drawing = Drawing.new(instance)
  16. for i,v in pairs(properties) do
  17. drawing[i] = v
  18. end
  19. return drawing
  20. end
  21. --
  22. function createtext(type, table)
  23. if not table[type] then
  24. table[type] = draw('Text', {Size = 13, Font = 2, Center = true, Outline = true, Color = Color3.new(1,1,1)})
  25. end
  26. end
  27. --
  28. function removetext(type, table)
  29. if table[type] then
  30. table[type]:Remove()
  31. table[type] = nil
  32. end
  33. end
  34. -- // location script
  35. for _,v in next, workspace.Locations:GetChildren() do
  36. createtext(v, location_drawings)
  37. end
  38. -- // zombie script
  39. for _,v in next, workspace.Zombies.Mobs:GetChildren() do
  40. createtext(v, zombie_drawings)
  41. end
  42. --
  43. workspace.Zombies.Mobs.ChildAdded:Connect(function(v)
  44. createtext(v, zombie_drawings)
  45. end)
  46. --
  47. workspace.Zombies.Mobs.ChildRemoved:Connect(function(v)
  48. removetext(v, zombie_drawings)
  49. end)
  50. -- // runservice shit (bad methods :sob:)
  51. run_service.RenderStepped:Connect(function()
  52. for _,v in next, location_drawings do
  53. local pos, visible = camera:WorldToViewportPoint(_.CFrame.p)
  54. local mag = math.floor((_.CFrame.p - camera.CFrame.p).magnitude)
  55. v.Visible = visible and settings.location.enabled and (mag <= settings.location.distance) and localplayer.Character ~= nil or false
  56. if v.Visible then
  57. v.Position = Vector2.new(pos.X,pos.Y)
  58. v.Text = tostring(_.Name ..' ['..mag..' studs]')
  59. v.Color = settings.location.color or Color3.new(1,1,1)
  60. end
  61. end
  62. --
  63. for _,v in next, zombie_drawings do
  64. if _:FindFirstChild("HumanoidRootPart") then
  65. local pos, visible = camera:WorldToViewportPoint(_.HumanoidRootPart.Position)
  66. local mag = math.floor((_.HumanoidRootPart.CFrame.p - camera.CFrame.p).magnitude)
  67. v.Visible = visible and settings.zombie.enabled and (mag <= settings.zombie.distance) and localplayer.Character ~= nil or false
  68. if v.Visible then
  69. v.Position = Vector2.new(pos.X,pos.Y)
  70. v.Text = tostring('Zombie' ..' ['..mag..' studs]')
  71. v.Color = settings.zombie.color or Color3.new(1,0,0)
  72. end
  73. end
  74. end
  75. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement