MaxproGlitcher

Aimbot Béta Manque Team Check .lua

Oct 8th, 2024 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3. local aimbotActive = false
  4.  
  5. function getClosestPlayer()
  6. local closestPlayer = nil
  7. local closestDistance = math.huge
  8.  
  9. for _, target in pairs(game.Players:GetPlayers()) do
  10. if target ~= player and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  11. local distance = (target.Character.HumanoidRootPart.Position - player.Character.HumanoidRootPart.Position).magnitude
  12. if distance < closestDistance then
  13. closestDistance = distance
  14. closestPlayer = target
  15. end
  16. end
  17. end
  18.  
  19. return closestPlayer
  20. end
  21.  
  22. function aimAt(target)
  23. if target and target.Character and target.Character:FindFirstChild("HumanoidRootPart") then
  24. workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position, target.Character.HumanoidRootPart.Position)
  25. end
  26. end
  27.  
  28. mouse.Button2Down:Connect(function()
  29. aimbotActive = true
  30. end)
  31.  
  32. mouse.Button2Up:Connect(function()
  33. aimbotActive = false
  34. end)
  35.  
  36. game:GetService("RunService").RenderStepped:Connect(function()
  37. if aimbotActive then
  38. local closestPlayer = getClosestPlayer()
  39. if closestPlayer then
  40. aimAt(closestPlayer)
  41. end
  42. end
  43. end)
  44.  
Advertisement
Add Comment
Please, Sign In to add comment