Mr_G_Curry

Aimbot script made by Youtube: MrGabbe. Disc: Mr_G_Curry #6982

Nov 13th, 2021
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. --Created by YouTube: MrGabbe.   Discord: Mr_G_Curry #6982
  2. local UIS = game:GetService("UserInputService")
  3. local camera = game.Workspace.CurrentCamera
  4.  
  5. function getClosest()
  6.     local closestPlayer = nil
  7.     local closestDist = math.huge
  8.     for i,v in pairs(game.Players:GetPlayers()) do
  9.         if v ~= game.Players.LocalPlayer then
  10.             local Dist = (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).magnitude
  11.             if Dist < closestDist then
  12.                 closestDist = Dist
  13.                 closestPlayer = v
  14.             end
  15.         end
  16.     end
  17.     return closestPlayer
  18. end
  19.  
  20.  
  21.  
  22. _G.aim = false
  23. UIS.InputBegan:Connect(function(inp)
  24.     if inp.UserInputType == Enum.UserInputType.MouseButton2 then
  25.         _G.aim = true
  26.         while wait() do
  27.             camera.CFrame = CFrame.new(camera.CFrame.Position,getClosest().Character.Head.Position)
  28.             if _G.aim == false then return end
  29.         end
  30.     end
  31. end)
  32.  
  33.  
  34. UIS.InputEnded:Connect(function(inp)
  35.     if inp.UserInputType == Enum.UserInputType.MouseButton2 then
  36.         _G.aim = false
  37.     end
  38. end)
Advertisement
Add Comment
Please, Sign In to add comment