Advertisement
VapeL

punch punch woo

Dec 13th, 2020
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.37 KB | None | 0 0
  1. local tool = script.Parent
  2. local plr = tool.Parent.Parent
  3. repeat wait() until plr.Character
  4. local char = plr.Character
  5. local idl = char:WaitForChild('Humanoid'):LoadAnimation(script.idl)
  6.  
  7. local deb = script.deb.Value
  8.  
  9. tool.Equipped:Connect(function()
  10.     idl:Play()
  11. end)
  12.  
  13. tool.Unequipped:Connect(function()
  14.     idl:Stop()
  15. end)
  16.  
  17. tool.Activated:Connect(function()
  18.     local punch = char:WaitForChild('Humanoid'):LoadAnimation(script.punch)
  19.    
  20.     if deb == false then
  21.         deb = true
  22.  
  23.         local arm = char['Right Arm']
  24.         punch:Play()
  25.        
  26.         arm.Touched:Connect(function(touched)
  27.             if touched.Parent.Humanoid and touched.Parent.deb.Value == false then
  28.                 touched.Parent.deb.Value = true
  29.                 touched.Parent.Humanoid:TakeDamage(60)
  30.                
  31.                 local bv = Instance.new("BodyVelocity")
  32.                 bv.Parent = touched.Parent.HumanoidRootPart
  33.                 bv.Velocity = char.HumanoidRootPart.CFrame.lookVector * 1500
  34.                
  35.                 local bv2 = Instance.new("BodyVelocity")
  36.                 bv2.Parent = touched.Parent.HumanoidRootPart
  37.                 bv2.Velocity = Vector3.new(0,500,0)
  38.                
  39.                 coroutine.wrap(function(timee)
  40.                     wait(timee)
  41.                     bv.Parent = game:GetService('Debris')
  42.                     bv2.Parent = game:GetService('Debris')
  43.                 end)(.5)
  44.                
  45.                 for i = 5,1,-1 do
  46.                     tool.Name = 'punch('..i..')'
  47.                     wait(1)
  48.                 end
  49.  
  50.                 tool.Name = 'punch'
  51.                 touched.Parent.deb.Value = false
  52.                 deb = false
  53.             end
  54.         end)
  55.     end
  56. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement