Advertisement
zayzaaa2030

Untitled

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