The_Banana

Pastebin

Apr 30th, 2022
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.88 KB | None | 0 0
  1. local lplr = game.Players.LocalPlayer
  2. local camera = game:GetService("Workspace").CurrentCamera
  3. local CurrentCamera = workspace.CurrentCamera
  4. local worldToViewportPoint = CurrentCamera.worldToViewportPoint
  5.  
  6. _G.TeamCheck = false -- Use True or False to toggle TeamCheck
  7.  
  8. for i,v in pairs(game.Players:GetChildren()) do
  9.     local Tracer = Drawing.new("Line")
  10.     Tracer.Visible = false
  11.     Tracer.Color = Color3.new(1,1,1)
  12.     Tracer.Thickness = 1
  13.     Tracer.Transparency = 1
  14.  
  15.     function lineesp()
  16.         game:GetService("RunService").RenderStepped:Connect(function()
  17.             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
  18.                 local Vector, OnScreen = camera:worldToViewportPoint(v.Character.HumanoidRootPart.Position)
  19.  
  20.                 if OnScreen then
  21.                     Tracer.From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 1)
  22.                     Tracer.To = Vector2.new(Vector.X, Vector.Y)
  23.  
  24.                     if _G.TeamCheck and v.TeamColor == lplr.TeamColor then
  25.                         --//Teammates
  26.                         Tracer.Visible = false
  27.                     else
  28.                         --//Enemies
  29.                         Tracer.Visible = true
  30.                     end
  31.                 else
  32.                     Tracer.Visible = false
  33.                 end
  34.             else
  35.                 Tracer.Visible = false
  36.             end
  37.         end)
  38.     end
  39.     coroutine.wrap(lineesp)()
  40. end
  41.  
  42. game.Players.PlayerAdded:Connect(function(v)
  43.     local Tracer = Drawing.new("Line")
  44.     Tracer.Visible = false
  45.     Tracer.Color = Color3.new(1,1,1)
  46.     Tracer.Thickness = 1
  47.     Tracer.Transparency = 1
  48.  
  49.     function lineesp()
  50.         game:GetService("RunService").RenderStepped:Connect(function()
  51.             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
  52.                 local Vector, OnScreen = camera:worldToViewportPoint(v.Character.HumanoidRootPart.Position)
  53.  
  54.                 if OnScreen then
  55.                     Tracer.From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 1)
  56.                     Tracer.To = Vector2.new(Vector.X, Vector.Y)
  57.  
  58.                     if _G.TeamCheck and v.TeamColor == lplr.TeamColor then
  59.                         --//Teammates
  60.                         Tracer.Visible = false
  61.                     else
  62.                         --//Enemies
  63.                         Tracer.Visible = true
  64.                     end
  65.                 else
  66.                     Tracer.Visible = false
  67.                 end
  68.             else
  69.                 Tracer.Visible = false
  70.             end
  71.         end)
  72.     end
  73.     coroutine.wrap(lineesp)()
  74. end)
Advertisement
Add Comment
Please, Sign In to add comment