SekkayGod

Untitled

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