REDPlays

Ultra Instinct Dodge Script Revamped

Aug 4th, 2018
4,518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.03 KB | None | 0 0
  1. script:WaitForChild("Dodge1")
  2. local Player = game.Players.LocalPlayer
  3. local Character = Player.Character
  4. local UsrInput = game:GetService("UserInputService")
  5.  
  6. local Debounce = false
  7. local Dodge1 = script.Dodge1
  8. local Dodge2 = script.Dodge2
  9. local Dodge3 = script.Dodge3
  10.  
  11. UsrInput.InputBegan:connect(function(Key)
  12.     if Key.KeyCode == Enum.KeyCode.E and Debounce == false then
  13.         local RandomAnim = math.random(1,3)
  14.         if RandomAnim == 1 and Debounce == false then
  15.             Debounce = true
  16.             local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge1)
  17.             Dodge:Play()
  18.            
  19.             wait(.5)
  20.             Debounce = false
  21.         elseif RandomAnim == 2 and Debounce == false then
  22.             Debounce = true
  23.             local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge2)
  24.             Dodge:Play()
  25.            
  26.             wait(.5)
  27.             Debounce = false
  28.         elseif RandomAnim == 3 and Debounce == false then
  29.             Debounce = true
  30.             local Dodge = Character:FindFirstChild("Humanoid"):LoadAnimation(Dodge3)
  31.             Dodge:Play()
  32.            
  33.             wait(.5)
  34.             Debounce = false
  35.         end
  36.     end
  37. end)
Advertisement
Add Comment
Please, Sign In to add comment