Advertisement
REDPlays

Rasengan

Jul 15th, 2018
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.43 KB | None | 0 0
  1. script:WaitForChild("Charge")
  2. local Player = game.Players.LocalPlayer
  3. local Character = Player.Character
  4. local UserInput = game:GetService("UserInputService")
  5. local Mouse = Player:GetMouse()
  6.  
  7. local Charge = script.Charge
  8. local Hold = script.Hold
  9. local Attack = script.Attack
  10. local Damaged = script.DamageAnim
  11.  
  12. local Use = false
  13. local Damage = false
  14.  
  15. local Power = script.Damage
  16.  
  17. UserInput.InputBegan:connect(function(Key)
  18.     if Key.KeyCode == Enum.KeyCode.E and Use == false then
  19.         local Begin = Character:FindFirstChild("Humanoid"):LoadAnimation(Charge)
  20.         Begin:Play()
  21.        
  22.         wait(.25)
  23.        
  24.         local Rasen = Instance.new("Part")
  25.         Rasen.Name = "Rasen"
  26.         Rasen.CFrame = Character:FindFirstChild("RightHand").CFrame * CFrame.new(0,-.25,0)
  27.         Rasen.Shape = "Ball"
  28.         Rasen.Size = Vector3.new(.5,.5,.5)
  29.         Rasen.Material = "Neon"
  30.         Rasen.CanCollide = false
  31.         Rasen.Anchored = true
  32.         Rasen.BrickColor = BrickColor.new("Storm blue")
  33.         Rasen.Parent = Character:FindFirstChild("RightHand")
  34.        
  35.         local Effects = script.Effects:Clone()
  36.         Effects.Parent = Rasen
  37.        
  38.         for i=0,5,1 do
  39.             Rasen.Size = Rasen.Size + Vector3.new(.1,.1,.1)
  40.             wait()
  41.         end
  42.         Rasen.Anchored = false
  43.        
  44.         Rasen.CFrame = Character:FindFirstChild("RightHand").CFrame
  45.        
  46.         local Weld = Instance.new("ManualWeld")
  47.         Weld.Part0 = Rasen
  48.         Weld.Part1 = Character:WaitForChild("RightHand")
  49.         Weld.C0 = Rasen.CFrame:inverse() * Character:WaitForChild("RightHand").CFrame
  50.         Weld.Parent = Rasen
  51.        
  52.         wait(.5)
  53.         local Mid = Character:FindFirstChild("Humanoid"):LoadAnimation(Hold)
  54.         Mid:Play()
  55.         Character:FindFirstChild("Humanoid").WalkSpeed = 24
  56.        
  57.         Mouse.Button1Down:connect(function(click)
  58.             if Use == false then
  59.                 Use = true
  60.                
  61.                 Rasen.Touched:connect(function(Hit)
  62.                     if Hit.Parent == Character then
  63.                         print(Character)
  64.                     elseif Hit.Parent ~= Character and Damage == false then
  65.                         Damage = true
  66.                         local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
  67.                         if Humanoid then
  68.                             Humanoid.Health = Humanoid.Health - Power.Value
  69.                             Weld:Destroy()
  70.                        
  71.                             local Touch = Hit.Parent:FindFirstChild("Humanoid"):LoadAnimation(Damaged)
  72.                             Touch:Play()
  73.                        
  74.                             local Vel = Instance.new("BodyVelocity")
  75.                             Vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  76.                             Vel.Velocity = Character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 30
  77.                             Vel.Parent = Hit.Parent:FindFirstChild("HumanoidRootPart")
  78.                        
  79.                             local Weld1 = Instance.new("ManualWeld")
  80.                             Weld1.Part0 = Rasen
  81.                             Weld1.Part1 = Hit.Parent:FindFirstChild("HumanoidRootPart")
  82.                             Weld1.C0 = Rasen.CFrame:inverse() * Hit.Parent:FindFirstChild("HumanoidRootPart").CFrame
  83.                             Weld1.Parent = Rasen
  84.                        
  85.                             wait(1)
  86.                             Vel:Destroy()
  87.                             Rasen.Anchored = true
  88.                            
  89.                            
  90.                             Humanoid.Health = Humanoid.Health - Power.Value
  91.                             Rasen.CanCollide = false
  92.                             for i=0,10,1 do
  93.                                 Rasen.Size = Rasen.Size + Vector3.new(3,3,3)
  94.                                 wait()
  95.                             end
  96.                             wait()
  97.                             for i=0,10,1 do
  98.                                 Rasen.Size = Rasen.Size - Vector3.new(5,5,5)
  99.                                 wait()
  100.                             end
  101.                             Rasen:Destroy()
  102.                             end
  103.                         end
  104.                     wait(3)
  105.                     Damage = false
  106.                 end)
  107.                
  108.                 print(Character)
  109.                 Mid:Stop()
  110.            
  111.                 local End = Character:FindFirstChild("Humanoid"):LoadAnimation(Attack)
  112.                 End:Play()
  113.            
  114.                 wait(2)
  115.                 --Rasen:Destroy()
  116.                 wait(2)
  117.                 Use = false
  118.             end
  119.         end)
  120.        
  121.     end
  122. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement