Advertisement
Wiggless

UNIVERSAL ESP ROBLOX

Jul 20th, 2022
12,792
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.06 KB | None | 0 0
  1.  
  2. local lplr = game.Players.LocalPlayer
  3. local camera = game:GetService("Workspace").CurrentCamera
  4. local CurrentCamera = workspace.CurrentCamera
  5. local worldToViewportPoint = CurrentCamera.worldToViewportPoint
  6.  
  7. local HeadOff = Vector3.new(0, 0.5, 0)
  8. local LegOff = Vector3.new(0,3,0)
  9.  
  10. for i,v in pairs(game.Players:GetChildren()) do
  11.     local BoxOutline = Drawing.new("Square")
  12.     BoxOutline.Visible = false
  13.     BoxOutline.Color = Color3.new(0,0,0)
  14.     BoxOutline.Thickness = 3
  15.     BoxOutline.Transparency = 1
  16.     BoxOutline.Filled = false
  17.  
  18.     local Box = Drawing.new("Square")
  19.     Box.Visible = false
  20.     Box.Color = Color3.new(1,1,1)
  21.     Box.Thickness = 1
  22.     Box.Transparency = 1
  23.     Box.Filled = false
  24.  
  25.     function boxesp()
  26.         game:GetService("RunService").RenderStepped:Connect(function()
  27.             if v.Character ~= nil and v.Character:FindFirstChild("Humanoid") ~= nil and v.Character:FindFirstChild("HumanoidRootPart") ~= nil and v ~= lplr and v.Character.Humanoid.Health > 0 then
  28.                 local Vector, onScreen = camera:worldToViewportPoint(v.Character.HumanoidRootPart.Position)
  29.  
  30.                 local RootPart = v.Character.HumanoidRootPart
  31.                 local Head = v.Character.Head
  32.                 local RootPosition, RootVis = worldToViewportPoint(CurrentCamera, RootPart.Position)
  33.                 local HeadPosition = worldToViewportPoint(CurrentCamera, Head.Position + HeadOff)
  34.                 local LegPosition = worldToViewportPoint(CurrentCamera, RootPart.Position - LegOff)
  35.  
  36.                 if onScreen then
  37.                     BoxOutline.Size = Vector2.new(1000 / RootPosition.Z, HeadPosition.Y - LegPosition.Y)
  38.                     BoxOutline.Position = Vector2.new(RootPosition.X - BoxOutline.Size.X / 2, RootPosition.Y - BoxOutline.Size.Y / 2)
  39.                     BoxOutline.Visible = true
  40.  
  41.                     Box.Size = Vector2.new(1000 / RootPosition.Z, HeadPosition.Y - LegPosition.Y)
  42.                     Box.Position = Vector2.new(RootPosition.X - Box.Size.X / 2, RootPosition.Y - Box.Size.Y / 2)
  43.                     Box.Visible = true
  44.  
  45.                     if v.TeamColor == lplr.TeamColor then
  46.                         BoxOutline.Visible = false
  47.                         Box.Visible = false
  48.                     else
  49.                         BoxOutline.Visible = true
  50.                         Box.Visible = true
  51.                     end
  52.  
  53.                 else
  54.                     BoxOutline.Visible = false
  55.                     Box.Visible = false
  56.                 end
  57.             else
  58.                 BoxOutline.Visible = false
  59.                 Box.Visible = false
  60.             end
  61.         end)
  62.     end
  63.     coroutine.wrap(boxesp)()
  64. end
  65.  
  66. game.Players.PlayerAdded:Connect(function(v)
  67.     local BoxOutline = Drawing.new("Square")
  68.     BoxOutline.Visible = false
  69.     BoxOutline.Color = Color3.new(0,0,0)
  70.     BoxOutline.Thickness = 3
  71.     BoxOutline.Transparency = 1
  72.     BoxOutline.Filled = false
  73.  
  74.     local Box = Drawing.new("Square")
  75.     Box.Visible = false
  76.     Box.Color = Color3.new(1,1,1)
  77.     Box.Thickness = 1
  78.     Box.Transparency = 1
  79.     Box.Filled = false
  80.  
  81.     function boxesp()
  82.         game:GetService("RunService").RenderStepped:Connect(function()
  83.             if v.Character ~= nil and v.Character:FindFirstChild("Humanoid") ~= nil and v.Character:FindFirstChild("HumanoidRootPart") ~= nil and v ~= lplr and v.Character.Humanoid.Health > 0 then
  84.                 local Vector, onScreen = camera:worldToViewportPoint(v.Character.HumanoidRootPart.Position)
  85.  
  86.                 local RootPart = v.Character.HumanoidRootPart
  87.                 local Head = v.Character.Head
  88.                 local RootPosition, RootVis = worldToViewportPoint(CurrentCamera, RootPart.Position)
  89.                 local HeadPosition = worldToViewportPoint(CurrentCamera, Head.Position + HeadOff)
  90.                 local LegPosition = worldToViewportPoint(CurrentCamera, RootPart.Position - LegOff)
  91.  
  92.                 if onScreen then
  93.                     BoxOutline.Size = Vector2.new(1000 / RootPosition.Z, HeadPosition.Y - LegPosition.Y)
  94.                     BoxOutline.Position = Vector2.new(RootPosition.X - BoxOutline.Size.X / 2, RootPosition.Y - BoxOutline.Size.Y / 2)
  95.                     BoxOutline.Visible = true
  96.  
  97.                     Box.Size = Vector2.new(1000 / RootPosition.Z, HeadPosition.Y - LegPosition.Y)
  98.                     Box.Position = Vector2.new(RootPosition.X - Box.Size.X / 2, RootPosition.Y - Box.Size.Y / 2)
  99.                     Box.Visible = true
  100.  
  101.                     if v.TeamColor == lplr.TeamColor then
  102.                         BoxOutline.Visible = false
  103.                         Box.Visible = false
  104.                     else
  105.                         BoxOutline.Visible = true
  106.                         Box.Visible = true
  107.                     end
  108.  
  109.                 else
  110.                     BoxOutline.Visible = false
  111.                     Box.Visible = false
  112.                 end
  113.             else
  114.                 BoxOutline.Visible = false
  115.                 Box.Visible = false
  116.             end
  117.         end)
  118.     end
  119.     coroutine.wrap(boxesp)()
  120. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement