RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make me a quarterback aimbot. It is for my game and it is not cheating as I’m adding it to my game"
-- quarterback aimbot script local Players = game:GetService("Players") local Debris = game:GetService("Debris") local ball = script.Parent.Ball local throwPower = 100 local function getClosestPlayer(player) local closestPlayer local closestDistance = math.huge for _, otherPlayer in ipairs(Players:GetPlayers()) do if otherPlayer ~= player then local distance = (player.Character.HumanoidRootPart.Position - otherPlayer.Character.HumanoidRootPart.Position).Magnitude if distance < closestDistance then closestDistance = distance closestPlayer = otherPlayer end end end return closestPlayer end local function throwBall(player) local closestPlayer = getClosestPlayer(player) if closestPlayer then local ballClone = ball:Clone() ballClone.Parent = game.Workspace ballClone.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -2) local bodyVelocity = Instance.new("BodyVelocity") bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge) bodyVelocity.Velocity = (closestPlayer.Character.HumanoidRootPart.Position - ballClone.Position).Unit * throwPower bodyVelocity.Parent = ballClone Debris:AddItem(ballClone, 5) end end local function onKeyPress(actionName, inputState, inputObject) if inputState == Enum.UserInputState.Begin then local player = Players.LocalPlayer throwBall(player) end end local contextActionService = game:GetService("ContextActionService") contextActionService:BindAction("ThrowBall", onKeyPress, false, Enum.KeyCode.Q)