Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script:WaitForChild("Dodge1")
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local UsrInput = game:GetService("UserInputService")
- local Debounce = false
- local Dodge1 = script.Dodge1
- local Dodge2 = script.Dodge2
- local Dodge3 = script.Dodge3
- UsrInput.InputBegan:connect(function(Key)
- if Key.KeyCode == Enum.KeyCode.E and Debounce == false then
- local RandomAnim = math.random(1,3)
- if RandomAnim == 1 and Debounce == false then
- Debounce = true
- local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge1)
- Dodge:Play()
- wait(.5)
- Debounce = false
- elseif RandomAnim == 2 and Debounce == false then
- Debounce = true
- local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge2)
- Dodge:Play()
- wait(.5)
- Debounce = false
- elseif RandomAnim == 3 and Debounce == false then
- Debounce = true
- local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge3)
- Dodge:Play()
- wait(.5)
- Debounce = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment