local b = workspace.Objects.Balls.PLAIN_BALL local h = b:WaitForChild("HITBOX_BALL") local r = game:GetService("ReplicatedStorage").Remotes.Ball.Dribble local u = game:GetService("UserInputService") local p = game.Players.LocalPlayer local d, s, a, f, bk, rt, lt = false, 0.27, 1.8, {8992767630, 8992995494, 8992999517}, {8992767630, 8992995494, 8992999517}, 8993107088, 8993146631 local function anim(id) local x = Instance.new("Animation", p.Character) x.AnimationId = "rbxassetid://" .. id p.Character.Humanoid:LoadAnimation(x):Play() end local function drb() while d and b and h and h:IsDescendantOf(workspace) do local dir = (h.Position - p.Character.HumanoidRootPart.Position).Unit if dir.Z > 0.5 then anim(f[math.random(#f)]) end if dir.Z < -0.5 then anim(bk[math.random(#bk)]) end if dir.X > 0.5 then anim(rt) end if dir.X < -0.5 then anim(lt) end r:FireServer(b, Vector3.new(dir.X * a, 0, dir.Z * a)) task.wait(s) end end if not u.TouchEnabled then u.InputBegan:Connect(function(i, g) if g or i.KeyCode ~= Enum.KeyCode.C then return end d = not d if d then task.spawn(drb) end end) else local g = Instance.new("ScreenGui", p.PlayerGui) local btn = Instance.new("TextButton", g) btn.Size, btn.Position, btn.Text = UDim2.new(0, 100, 0, 50), UDim2.new(0.9, -100, 0.8, 0), "Dribble" btn.MouseButton1Click:Connect(function() d = not d if d then task.spawn(drb) end end) end