Advertisement
zayzaaa2030

Untitled

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