Advertisement
SekkayGod

7

Apr 14th, 2022
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. shared.iDrawings.FOV_Circle_Outline = Circle_Outline;
  2.  
  3. local Line = shared.iDrawings.Tracer or Drawing.new'Line';
  4. Line.Color = Color3.new(1, 1, 1);
  5. Line.From = Vector2.new(50, 200);
  6. Line.To = Vector2.new(500, 200);
  7. Line.Thickness = 2;
  8. Line.Visible = true;
  9.  
  10. shared.iDrawings.Tracer = Line;
  11.  
  12. local Text = shared.iDrawings.Info or Drawing.new'Text';
  13. Text.Outline = true;
  14. Text.Center = true;
  15. Text.Visible = true;
  16. Text.Size = 20;
  17. Text.Text = '';
  18. Text.Color = Color3.new(1, 1, 1);
  19. Text.Position = Vector2.new((Line.From.X + Line.To.X) / 2, (Line.From.Y + Line.To.Y) / 2 - 25);
  20. Text.Transparency = 1;
  21.  
  22. shared.iDrawings.Info = Text;
  23.  
  24. local TSize = {};
  25.  
  26. function CreateCircleTween()
  27. TSize.Circle = Tween.new(1 / 2, {
  28. Radius = shared.iDrawings.FOV_Circle.Radius;
  29. }, {
  30. Radius = 100;
  31. }, 'outBounce');
  32. end
  33. local CurrentCamera = workspace.CurrentCamera
  34. local Players = game.GetService(game, "Players")
  35. local LocalPlayer = Players.LocalPlayer
  36. local Mouse = LocalPlayer:GetMouse()
  37. function ClosestPlayer()
  38. local MaxDist, Closest = math.huge
  39. for I,V in pairs(Players.GetPlayers(Players)) do
  40. if V == LocalPlayer then continue end
  41. if V.Team == LocalPlayer then continue end
  42. if not V.Character then continue end
  43. local Head = V.Character.FindFirstChild(V.Character, "Head")
  44. if not Head then continue end
  45. local Pos, Vis = CurrentCamera.WorldToScreenPoint(CurrentCamera, Head.Position)
  46. if not Vis then continue end
  47. local MousePos, TheirPos = Vector2.new(Mouse.X, Mouse.Y), Vector2.new(Pos.X, Pos.Y)
  48. local Dist = (TheirPos - MousePos).Magnitude
  49. if Dist < MaxDist then
  50. MaxDist = Dist
  51. Closest = V
  52. print("working")
  53. end
  54. end
  55. return Closest
  56. end
  57. local MT = getrawmetatable(game)
  58. local OldNC = MT.__namecall
  59. local OldIDX = MT.__index
  60. setreadonly(MT, false)
  61. MT.__namecall = newcclosure(function(self, ...)
  62. local Args, Method = {...}, getnamecallmethod()
  63. if Method == "FindPartOnRayWithIgnoreList" and not checkcaller() then
  64. local CP = ClosestPlayer()
  65. if CP and CP.Character and CP.Character.FindFirstChild(CP.Character, "Head") then
  66. Args[1] = Ray.new(CurrentCamera.CFrame.Position, (CP.Character.Head.Position - CurrentCamera.CFrame.Position).Unit * 1000)
  67. return OldNC(self, unpack(Args))
  68. end
  69. end
  70. return OldNC(self, ...)
  71. end)
  72. MT.__index = newcclosure(function(self, K)
  73. if K == "Clips" then
  74. return workspace.Map
  75. end
  76. return OldIDX(self, K)
  77. end)
  78. setreadonly(MT, true)w
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement