Advertisement
zayzaaa2030

Untitled

Jun 23rd, 2022
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. _G.Prediction = ( .10 )
  2.  
  3. _G.FOV = ( 67 )
  4.  
  5. _G.AimKey = ( "+" )
  6.  
  7.  
  8. --[[
  9. Do not edit anything under this.
  10. ]]
  11.  
  12. local SilentAim = true
  13. local LocalPlayer = game:GetService("Players").LocalPlayer
  14. local Players = game:GetService("Players")
  15. local Mouse = LocalPlayer:GetMouse()
  16. local Camera = game:GetService("Workspace").CurrentCamera
  17. hookmetamethod = hookmetamethod
  18. Drawing = Drawing
  19.  
  20. local FOV_CIRCLE = Drawing.new("Circle")
  21. FOV_CIRCLE.Visible = false
  22. FOV_CIRCLE.Filled = true
  23. FOV_CIRCLE.Thickness = 1
  24. FOV_CIRCLE.Transparency = 6
  25. FOV_CIRCLE.Color = Color3.new(0, 1, 0)
  26. FOV_CIRCLE.Radius = _G.FOV
  27. FOV_CIRCLE.Position = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  28.  
  29. Options = {
  30. Torso = "Torso";
  31. Head = "Head";
  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 == false then
  49. FOV_CIRCLE.Color = Color3.new(0, 1, 0)
  50. SilentAim = true
  51. elseif SilentAim == true 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.Head
  89. local ShootThis = Targete[Options.Torso] -- or Options.UpperTorso
  90. local Predicted_Position = ShootThis.CFrame + (ShootThis.Velocity * _G.Prediction + Vector3.new(0,-1,0)) -- (-1) = Less blatant
  91. return ((Index == "Hit" and Predicted_Position))
  92. end
  93. end
  94.  
  95. end
  96. return oldIndex(self, Index)
  97. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement