Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Humanoid = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
- local UIS = game:GetService('UserInputService')
- local LastTapped,Tapped = false,false
- local Run = Humanoid:LoadAnimation(script:WaitForChild("Run"))
- UIS.InputBegan:Connect(function(Input, IsTyping)
- if IsTyping then return end
- if Input.KeyCode == Enum.KeyCode.W then
- if Tapped == false then
- Tapped = true
- else
- LastTapped = true
- Tapped = false
- Run:Play()
- Humanoid.WalkSpeed = 32
- end
- delay(.4, function()
- if Tapped then
- Tapped = false
- end
- end)
- end
- end)
- UIS.InputEnded:Connect(function(Input, IsTyping)
- if IsTyping then return end
- if Input.KeyCode == Enum.KeyCode.W and LastTapped and not Tapped then
- Humanoid.WalkSpeed = 16
- Run:Stop()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement