Advertisement
Dr1llz_

Da hood aimbot script

Oct 12th, 2024 (edited)
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | Gaming | 0 0
  1. getgenv().Aimbot = {
  2. Status = true,
  3. Keybind = 'Q',
  4. Hitpart = 'HumanoidRootPart',
  5. ['Prediction'] = {
  6. X = 0.165,
  7. Y = 0.1,
  8. },
  9. }
  10.  
  11. if getgenv().AimbotRan then
  12. return
  13. else
  14. getgenv().AimbotRan = true
  15. end
  16. -- make it reexecutable to update settings
  17.  
  18.  
  19. local RunService = game:GetService('RunService')
  20. local Workspace = game:GetService('Workspace')
  21. local Players = game:GetService('Players')
  22.  
  23. local LocalPlayer = Players.LocalPlayer
  24. local Camera = Workspace.CurrentCamera
  25. local Mouse = LocalPlayer:GetMouse()
  26.  
  27. local Player = nil -- Our target player
  28.  
  29.  
  30. local GetClosestPlayer = function() -- // Optimized GetClosestPlayer i believe?
  31. local ClosestDistance, ClosestPlayer = 100000, nil
  32. for _, Player : Player in pairs(Players:GetPlayers()) do
  33. if Player.Name ~= LocalPlayer.Name and Player.Character and Player.Character:FindFirstChild('HumanoidRootPart') then
  34. local Root, Visible = Camera:WorldToScreenPoint(Player.Character.HumanoidRootPart.Position)
  35. if not Visible then
  36. continue
  37. end
  38. Root = (Vector2.new(Mouse.X, Mouse.Y) - Vector2.new(Root.X, Root.Y)).Magnitude
  39. if Root < ClosestDistance then
  40. ClosestPlayer = Player
  41. ClosestDistance = Root
  42. end
  43. end
  44. end
  45. return ClosestPlayer
  46. end
  47.  
  48. Mouse.KeyDown:Connect(function(key) -- Get our closest player (toggle)
  49. if key == Aimbot.Keybind:lower() then
  50. Player = not Player and GetClosestPlayer() or nil
  51. end
  52. end)
  53.  
  54. RunService.RenderStepped:Connect(function()
  55. if not Player then
  56. return
  57. end
  58. if not Aimbot.Status then
  59. return
  60. end
  61. local Hitpart = Player.Character:FindFirstChild(Aimbot.Hitpart)
  62. if not Hitpart then
  63. return
  64. end
  65. Camera.CFrame = CFrame.new(Camera.CFrame.Position, Hitpart.Position + Hitpart.Velocity * Vector3.new(Aimbot.Prediction.X, Aimbot.Prediction.Y, Aimbot.Prediction.X))
  66. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement