Advertisement
Imperious123

Untitled

Jul 26th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. local AlreadyGot = {};
  2.  
  3. game:GetService("RunService").Heartbeat:Connect(function()
  4.  
  5. for i,v in pairs(game.Players:GetChildren()) do
  6. local chara = v.Character
  7. if AlreadyGot[chara] == nil then
  8. table.insert(AlreadyGot, chara);
  9. local Line = Drawing.new("Line")
  10. local a,b = workspace.CurrentCamera:WorldToViewportPoint(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).X, workspace.CurrentCamera:WorldToViewportPoint(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).Y
  11. local x,y = workspace.CurrentCamera:WorldToViewportPoint(chara.HumanoidRootPart.Position).X, workspace.CurrentCamera:WorldToViewportPoint(chara:WaitForChild("HumanoidRootPart").Position).Y
  12. local chara = v.Character
  13. local _, withinScreenBounds = workspace.CurrentCamera:WorldToScreenPoint(chara.Head.Position)
  14.  
  15. if withinScreenBounds then
  16. Line.Visible = true
  17. else
  18. Line.Visible = false
  19. end;
  20. Line.From = Vector2.new(a,b)
  21.  
  22. Line.To = Vector2.new(x,y)
  23. if v.TeamColor == game:GetService("Players").LocalPlayer.TeamColor then
  24. Line.Color = Color3.fromRGB(0, 255, 0)
  25. else
  26. Line.Color = Color3.fromRGB(255, 0, 0)
  27. end;
  28. Line.Thickness = 2
  29. Line.Transparency = 1
  30. wait(0.001);
  31. Line:Remove()
  32.  
  33. end
  34. end;
  35. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement