Advertisement
zayzaaa2030

Untitled

Jun 14th, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. _G.Prediction = ( .18 )
  2.  
  3. _G.FOV = ( 18 )
  4.  
  5. _G.AimKey = ( "\" )
  6.  
  7.  
  8.  
  9. --[[
  10. Do not edit anything under this.
  11. ]]
  12.  
  13. local SilentAim = true
  14. local LocalPlayer = game:GetService("Players").LocalPlayer
  15. local Players = game:GetService("Players")
  16. local Mouse = LocalPlayer:GetMouse()
  17. local Camera = game:GetService("Workspace").CurrentCamera
  18. hookmetamethod = hookmetamethod
  19. Drawing = Drawing
  20.  
  21. local FOV_CIRCLE = Drawing.new("Circle")
  22. FOV_CIRCLE.Visible = false
  23. FOV_CIRCLE.Filled = true
  24. FOV_CIRCLE.Thickness = 1
  25. FOV_CIRCLE.Transparency = 3
  26. FOV_CIRCLE.Color = Color3.new(0, 1, 0)
  27. FOV_CIRCLE.Radius = 25
  28. FOV_CIRCLE.Position = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  29.  
  30. Options = {
  31. Torso = "Torso";
  32. UpperTorso = "UpperTorso";
  33. }
  34.  
  35. local function MoveFovCircle()
  36. pcall(function()
  37. local DoIt = true
  38. spawn(function()
  39. while DoIt do task.wait()
  40. FOV_CIRCLE.Position = Vector2.new(Mouse.X, (Mouse.Y + 36))
  41. end
  42. end)
  43. end)
  44. end coroutine.wrap(MoveFovCircle)()
  45.  
  46. Mouse.KeyDown:Connect(function(KeyPressed)
  47. if KeyPressed == (_G.AimKey:lower()) then
  48. if SilentAim == true then
  49. FOV_CIRCLE.Color = Color3.new(0, 1, 0)
  50. SilentAim = true
  51. elseif SilentAim == false then
  52. FOV_CIRCLE.Color = Color3.new(1, 0, 0)
  53. SilentAim = false
  54. end
  55. end
  56. end)
  57.  
  58. local oldIndex = nil
  59. oldIndex = hookmetamethod(game, "__index", function(self, Index)
  60. if self == Mouse and (Index == "Hit") then
  61. local Distance = 9e9
  62. local Targete = nil
  63. if SilentAim then
  64.  
  65. for _, v in pairs(Players:GetPlayers()) do
  66. if v ~= LocalPlayer and v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v.Character:FindFirstChild("Humanoid") and v.Character:FindFirstChild("Humanoid").Health > 0 then
  67. local Enemy = v.Character
  68. local CastingFrom = CFrame.new(Camera.CFrame.Position, Enemy[Options.Torso].CFrame.Position) * CFrame.new(0, 0, -4)
  69. local RayCast = Ray.new(CastingFrom.Position, CastingFrom.LookVector * 9000)
  70. local World, ToSpace = workspace:FindPartOnRayWithIgnoreList(RayCast, {LocalPlayer.Character:FindFirstChild("Head")})
  71. local RootWorld = (Enemy[Options.Torso].CFrame.Position - ToSpace).magnitude
  72. if RootWorld < 4 then
  73. local RootPartPosition, Visible = Camera:WorldToScreenPoint(Enemy[Options.Torso].Position)
  74. if Visible then
  75. local Real_Magnitude = (Vector2.new(Mouse.X, Mouse.Y) - Vector2.new(RootPartPosition.X, RootPartPosition.Y)).Magnitude
  76. if Real_Magnitude < Distance and Real_Magnitude < FOV_CIRCLE.Radius then
  77. Distance = Real_Magnitude
  78. Targete = Enemy
  79. end
  80. end
  81. end
  82. end
  83. end
  84. end
  85.  
  86. if Targete ~= nil and Targete[Options.Torso] and Targete:FindFirstChild("Humanoid").Health > 0 then
  87. if SilentAim then
  88. local ShootThis = Targete[Options.Torso] -- or Options.UpperTorso
  89. local Predicted_Position = ShootThis.CFrame + (ShootThis.Velocity * _G.Prediction + Vector3.new(0,-0.01,0)) -- (-0.01) = Less blatant
  90. return ((Index == "Hit" and Predicted_Position))
  91. end
  92. end
  93.  
  94. end
  95. return oldIndex(self, Index)
  96. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement