Advertisement
Guest User

Project esp

a guest
Oct 17th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. function screen(part, text)
  2. local pos, vis = game.workspace.Camera:WorldToScreenPoint(part.Position)
  3. if vis then
  4. text.Visible = true
  5. return Vector2.new(pos.x, pos.y)
  6. else text.Visible = false
  7. return Vector2.new(0, 0) end end
  8. esp = {}
  9. function insert(part)
  10. if esp[part] ~= nil then return end
  11. esp[part] = {
  12.     ["t"] = Drawing.new("Text"),
  13.     ["obj"] = part
  14. }
  15. end
  16. function esp1(v)
  17.         insert(v)
  18. end
  19. function esp2()
  20. for i,v in pairs(esp) do
  21.         local text = v["t"]
  22.         local o = v["obj"]
  23. text.Visible = true
  24. text.Text = _G.text
  25. text.Size = _G.size
  26. text.Color = _G.color
  27. text.Position = screen(o, text)
  28. end end
  29. for i,v in pairs(game.workspace.Items:GetDescendants()) do
  30.     if v:IsA("BasePart") then
  31.     esp1(v) end end
  32. game.workspace.Items.ChildAdded:Connect(function(v)
  33.     esp1(v.Part)
  34.     end)
  35. game:GetService("RunService").RenderStepped:Connect(function()
  36. esp2() end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement