local uis = game:GetService("UserInputService") local lp = game.Players.LocalPlayer local chr = lp.Character or lp.CharacterAdded:Wait() local hum = chr:WaitForChild("Humanoid") local hrp = chr:WaitForChild("HumanoidRootPart") local cam = workspace.CurrentCamera hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false) hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false) hum:SetStateEnabled(Enum.HumanoidStateType.Flying, false) local dashReady = true local playAnim = hum.LoadAnimation local anims = {} anims.F = Instance.new("Animation") anims.F.AnimationId = "rbxassetid://75379493908377" anims.L = Instance.new("Animation") anims.L.AnimationId = "rbxassetid://140228401244639" anims.R = Instance.new("Animation") anims.R.AnimationId = "rbxassetid://70599036000611" anims.B = Instance.new("Animation") anims.B.AnimationId = "rbxassetid://95851300535352" local function dash(dir) if not dashReady or hum.Sit then return end dashReady = false local angle = ({ [Enum.KeyCode.W] = 0, [Enum.KeyCode.A] = 90, [Enum.KeyCode.D] = -90, [Enum.KeyCode.S] = 180 })[dir] local bv = Instance.new("BodyVelocity") bv.MaxForce = Vector3.new(1,0,1)*100000 bv.Velocity = (CFrame.new(hrp.Position, hrp.Position + cam.CFrame.LookVector * Vector3.new(1, 0, 1)) * CFrame.Angles(0, math.rad(angle), 0)).LookVector * 50 bv.Parent = hrp game.Debris:AddItem(bv, 0.4) local id = ({ [Enum.KeyCode.W] = anims.F, [Enum.KeyCode.A] = anims.L, [Enum.KeyCode.D] = anims.R, [Enum.KeyCode.S] = anims.B })[dir] pcall(function() playAnim(hum, id):Play() end) task.delay(1, function() dashReady = true end) end uis.InputBegan:Connect(function(input, gpe) if gpe then return end if input.KeyCode == Enum.KeyCode.Q then if uis:IsKeyDown(Enum.KeyCode.W) then dash(Enum.KeyCode.W) elseif uis:IsKeyDown(Enum.KeyCode.A) then dash(Enum.KeyCode.A) elseif uis:IsKeyDown(Enum.KeyCode.D) then dash(Enum.KeyCode.D) elseif uis:IsKeyDown(Enum.KeyCode.S) then dash(Enum.KeyCode.S) end end end)