REDPlays

My Hero Academia Script

Jul 15th, 2018
2,309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.00 KB | None | 0 0
  1. script:WaitForChild("Wave")
  2. local Player = game.Players.LocalPlayer
  3. local Character = Player.Character
  4. local UserInput = game:GetService("UserInputService")
  5.  
  6.  
  7. Punch1 = script.Punch1
  8. Punch2 = script.Punch2
  9.  
  10. local Debounce = false
  11. local Damage = script.Damage
  12.  
  13. local CanPunch = false
  14.  
  15. UserInput.InputBegan:connect(function(Key)
  16.     if Key.KeyCode == Enum.KeyCode.Z and CanPunch == false then
  17.         CanPunch = true
  18.         local RandomAttack = math.random(1,2)
  19.         if RandomAttack == 1 then
  20.             local Attack1 = Character:FindFirstChild("Humanoid"):LoadAnimation(Punch1)
  21.             Attack1:Play()
  22.            
  23.             wait(.45)
  24.            
  25.             local Wave1 = script.Wave:Clone()
  26.             Wave1.Size = Vector3.new(8,8,2)
  27.             Wave1.CFrame = Character:FindFirstChild("RightLowerArm").CFrame
  28.             Wave1.Orientation = Character:FindFirstChild("HumanoidRootPart").Orientation
  29.             Wave1.Parent = Character:FindFirstChild("RightLowerArm")
  30.            
  31.             local VEL1 = Instance.new("BodyVelocity")
  32.             VEL1.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  33.             VEL1.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 100
  34.             VEL1.Parent = Wave1
  35.            
  36.             local Wave2 = script.Wave:Clone()
  37.             Wave2.Size = Vector3.new(6,6,1)
  38.             Wave2.CFrame = Wave1.CFrame * CFrame.new(0,0,-6)
  39.             Wave2.Parent = Wave1
  40.            
  41.             local VEL2 = Instance.new("BodyVelocity")
  42.             VEL2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  43.             VEL2.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 100
  44.             VEL2.Parent = Wave2
  45.            
  46.             local Wave3 = script.Wave:Clone()
  47.             Wave3.Size = Vector3.new(4,4,.5)
  48.             Wave3.CFrame = Wave2.CFrame * CFrame.new(0,0,-6)
  49.             Wave3.Parent = Wave2
  50.            
  51.             local VEL3 = Instance.new("BodyVelocity")
  52.             VEL3.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  53.             VEL3.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 100
  54.             VEL3.Parent = Wave3
  55.            
  56.             local Point = script.Point:Clone()
  57.             Point.Size = Vector3.new(2,2,.25)
  58.             Point.CFrame = Wave3.CFrame
  59.             Point.Parent = Wave3
  60.            
  61.             local VEL4 = Instance.new("BodyVelocity")
  62.             VEL4.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  63.             VEL4.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 100
  64.             VEL4.Parent = Point
  65.            
  66.             Point.Touched:connect(function(Hit)
  67.                 if Hit.Parent == Character or Hit.Parent.Parent == Character then
  68.                     print(Character)
  69.                 elseif Hit.Parent ~= Character and Debounce == false then
  70.                     local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
  71.                     if Humanoid and Debounce == false then
  72.                         Debounce = true
  73.                         Humanoid.Health = Humanoid.Health - Damage.Value
  74.                     end
  75.                     local HumanoidRP = Hit.Parent:FindFirstChild("HumanoidRootPart")
  76.                     if HumanoidRP then
  77.                         local Vel = Instance.new("BodyVelocity")
  78.                         Vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  79.                         Vel.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 50
  80.                         Vel.Parent = HumanoidRP
  81.                            
  82.                         wait(.5)
  83.                         Vel:Destroy()
  84.                     end
  85.                     wait(.5)
  86.                     Debounce = false
  87.                 end
  88.             end)
  89.            
  90.             for i=0,20,1 do
  91.                 Wave1.Size = Wave1.Size + Vector3.new(2,2,.5)
  92.                 Wave1.Orientation = Wave1.Orientation + Vector3.new(0,0,30)
  93.  
  94.                 Wave2.Size = Wave2.Size + Vector3.new(2,2,.5)
  95.                 Wave2.Orientation = Wave2.Orientation + Vector3.new(0,0,30)
  96.                
  97.                 Wave3.Size = Wave3.Size + Vector3.new(2,2,.5)
  98.                 Wave3.Orientation = Wave3.Orientation + Vector3.new(0,0,30)
  99.                
  100.                 Point.Size = Point.Size + Vector3.new(.75,.75,.75)
  101.                
  102.                 wait()
  103.             end
  104.            
  105.             Wave1:Destroy()
  106.            
  107.            
  108.         elseif RandomAttack == 2 then
  109.             local Attack2 = Character:FindFirstChild("Humanoid"):LoadAnimation(Punch2)
  110.             Attack2:Play()
  111.            
  112.             wait(.45)
  113.             local Wave1 = script.WaveOther:Clone()
  114.             Wave1.Size = Vector3.new(8,.2,8)
  115.             Wave1.CFrame = Character:FindFirstChild("RightLowerArm").CFrame * CFrame.new(0,3,0)
  116.             Wave1.Orientation = Character:FindFirstChild("HumanoidRootPart").Orientation + Vector3.new(0,90,0)
  117.             Wave1.Parent = Character:FindFirstChild("RightLowerArm")
  118.            
  119.             local VEL1 = Instance.new("BodyVelocity")
  120.             VEL1.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  121.             VEL1.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.upVector * 10
  122.             VEL1.Parent = Wave1
  123.            
  124.             local Wave2 = script.WaveOther:Clone()
  125.             Wave2.Size = Vector3.new(6,.2,6)
  126.             Wave2.CFrame = Wave1.CFrame * CFrame.new(0,3,0)
  127.             Wave2.Parent = Wave1
  128.            
  129.             local VEL2 = Instance.new("BodyVelocity")
  130.             VEL2.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  131.             VEL2.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.upVector * 10
  132.             VEL2.Parent = Wave2
  133.            
  134.             local Wave3 = script.WaveOther:Clone()
  135.             Wave3.Size = Vector3.new(4,.2,4)
  136.             Wave3.CFrame = Wave2.CFrame * CFrame.new(0,3,0)
  137.             Wave3.Parent = Wave2
  138.            
  139.             local VEL3 = Instance.new("BodyVelocity")
  140.             VEL3.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  141.             VEL3.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.upVector * 10
  142.             VEL3.Parent = Wave3
  143.            
  144.             Wave1.Touched:connect(function(Hit)
  145.                 if Hit.Parent == Character or Hit.Parent.Parent == Character then
  146.                     print(Character)
  147.                 elseif Hit.Parent ~= Character then
  148.                     local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
  149.                     if Humanoid then
  150.                        
  151.                         local HumanoidRP = Hit.Parent:FindFirstChild("HumanoidRootPart")
  152.                         if HumanoidRP then
  153.                             local Vel = Instance.new("BodyVelocity")
  154.                             Vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  155.                             Vel.Velocity = HumanoidRP.CFrame.lookVector * -50
  156.                             Vel.Parent = HumanoidRP
  157.                            
  158.                             wait(.5)
  159.                             Vel:Destroy()
  160.                         end
  161.                     end
  162.                 end
  163.             end)
  164.            
  165.             for i=0,10,1 do
  166.                 Wave1.Size = Wave1.Size + Vector3.new(2,.1,2)
  167.                
  168.                 Wave2.Size = Wave2.Size + Vector3.new(1.5,.1,1.5)
  169.                
  170.                 Wave3.Size = Wave3.Size + Vector3.new(1,.1,1)
  171.                
  172.                 wait()
  173.             end
  174.            
  175.             Wave1:Destroy()
  176.             local Arm = Character:FindFirstChild("Body Colors")
  177.             Arm.RightArmColor = BrickColor.new("Cocoa")
  178.         end
  179.         wait(2)
  180.         CanPunch = false
  181.     end
  182. end)
Advertisement
Add Comment
Please, Sign In to add comment