local Players = game:GetService("Players") local VirtualInputManager = game:GetService("VirtualInputManager") local Player = Players.LocalPlayer or Players.PlayerAdded:Wait() local Balls = workspace:WaitForChild("Balls", 9e9) local function VerifyBall(Ball) if typeof(Ball) == "Instance" and Ball:IsA("BasePart") and Ball:IsDescendantOf(Balls) and Ball:GetAttribute("realBall") == true then return true end end local function IsTarget() return (Player.Character and Player.Character:FindFirstChild("Highlight")) end local function Parry() VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 0) VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 0) end Balls.ChildAdded:Connect(function(Ball) if not VerifyBall(Ball) then return end local OldPosition = Ball.Position local OldTick = tick() Ball:GetPropertyChangedSignal("Position"):Connect(function() if IsTarget() then local Distance = (Ball.Position - workspace.CurrentCamera.Focus.Position).Magnitude local Velocity = (OldPosition - Ball.Position).Magnitude if (Distance / Velocity) <= 10 then Parry() end end if (tick() - OldTick >= 1/60) then OldTick = tick() OldPosition = Ball.Position end end) end)