Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = script.Parent
- local plr = tool.Parent.Parent
- repeat wait() until plr.Character
- local char = plr.Character
- local idl = char:WaitForChild('Humanoid'):LoadAnimation(script.idl)
- local deb = script.deb.Value
- tool.Equipped:Connect(function()
- idl:Play()
- end)
- tool.Unequipped:Connect(function()
- idl:Stop()
- end)
- tool.Activated:Connect(function()
- local punch = char:WaitForChild('Humanoid'):LoadAnimation(script.punch)
- if deb == false then
- deb = true
- local arm = char['Right Arm']
- punch:Play()
- arm.Touched:Connect(function(touched)
- if touched.Parent.Humanoid and touched.Parent.deb.Value == false then
- touched.Parent.deb.Value = true
- touched.Parent.Humanoid:TakeDamage(60)
- local bv = Instance.new("BodyVelocity")
- bv.Parent = touched.Parent.HumanoidRootPart
- bv.Velocity = char.HumanoidRootPart.CFrame.lookVector * 1500
- local bv2 = Instance.new("BodyVelocity")
- bv2.Parent = touched.Parent.HumanoidRootPart
- bv2.Velocity = Vector3.new(0,500,0)
- coroutine.wrap(function(timee)
- wait(timee)
- bv.Parent = game:GetService('Debris')
- bv2.Parent = game:GetService('Debris')
- end)(.5)
- for i = 5,1,-1 do
- tool.Name = 'punch('..i..')'
- wait(1)
- end
- tool.Name = 'punch'
- touched.Parent.deb.Value = false
- deb = false
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement