Advertisement
Rufus14

Combat Tool

Dec 5th, 2019
3,378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 47.96 KB | None | 0 0
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. Tool0 = Instance.new("Tool")
  4. Sound2 = Instance.new("Sound")
  5. Sound3 = Instance.new("Sound")
  6. Sound4 = Instance.new("Sound")
  7. Sound5 = Instance.new("Sound")
  8. Sound6 = Instance.new("Sound")
  9. Sound7 = Instance.new("Sound")
  10. Tool0.Name = "Combat"
  11. Tool0.CanBeDropped = false
  12. Tool0.Grip = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  13. Tool0.GripForward = Vector3.new(-1, -0, -0)
  14. Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
  15. Tool0.GripRight = Vector3.new(0, 1, 0)
  16. Tool0.GripUp = Vector3.new(0, 0, 1)
  17. Tool0.RequiresHandle = false
  18. Tool0.ToolTip = "Hold left mouse button to block, jump and attack for a drop kick."
  19. Sound2.Name = "Kick"
  20. Sound2.Parent = script
  21. Sound2.SoundId = "rbxassetid://542443306"
  22. Sound3.Name = "Swoosh"
  23. Sound3.Parent = script
  24. Sound3.SoundId = "rbxassetid://1489705211"
  25. Sound3.Volume = 0.69999998807907
  26. Sound4.Name = "Punch"
  27. Sound4.Parent = script
  28. Sound4.SoundId = "rbxassetid://3932505023"
  29. Sound5.Name = "Bass"
  30. Sound5.Parent = script
  31. Sound5.SoundId = "rbxassetid://2487714799"
  32. Sound5.Volume = 1
  33. Sound6.Name = "Ouch"
  34. Sound6.Parent = script
  35. Sound6.SoundId = "rbxassetid://4306991962"
  36. Sound7.Name = "Block"
  37. Sound7.Parent = script
  38. Sound7.SoundId = "rbxassetid://4306994664"
  39. Tool0.Parent = owner.Character
  40. coroutine.wrap(function()
  41. --By Rufus14
  42. canattack = true
  43. cananimate = false
  44. equipped = false
  45. tool = Tool0
  46. swishsound = script.Swoosh
  47. blocksound = script.Block
  48. punchsound = script.Punch
  49. kicksound = script.Kick
  50. goresound = script.Ouch
  51. basssound = script.Bass
  52. owner = nil
  53. character = nil
  54. mouseclick = false
  55. attacknumber = 1
  56. instancewhitelist = {}
  57. runservice = game:GetService("RunService")
  58. --
  59. tool.Activated:connect(function()
  60.     mouseclick = true
  61. end)
  62. tool.Deactivated:connect(function()
  63.     mouseclick = false
  64. end)
  65. --
  66. function ragdollkill(character)
  67.     local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  68.     local checkragd = character:findFirstChild("ragded")
  69.     if not checkragd then
  70.         local boolvalue = Instance.new("BoolValue", character)
  71.         boolvalue.Name = "ragded"
  72.         if not character:findFirstChild("UpperTorso") then
  73.             character.Archivable = true
  74.             for i,v in pairs(character:GetChildren()) do
  75.                 if v.ClassName == "Sound" then
  76.                     v:remove()
  77.                 end
  78.                 for q,w in pairs(v:GetChildren()) do
  79.                     if w.ClassName == "Sound" then
  80.                         w:remove()
  81.                     end
  82.                 end
  83.             end
  84.             local ragdoll = character:Clone()
  85.             for i,v in pairs(ragdoll:GetDescendants()) do
  86.                 if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  87.                     v:destroy()
  88.                 end
  89.             end
  90.             ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  91.             ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  92.             if ragdoll:findFirstChild("Health") then
  93.                 if ragdoll:findFirstChild("Health").ClassName == "Script" then
  94.                     ragdoll:findFirstChild("Health").Disabled = true
  95.                 end
  96.             end
  97.             for i,v in pairs(character:GetChildren()) do
  98.                 if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  99.                     v:destroy()
  100.                 end
  101.             end
  102.             for i,v in pairs(character:GetChildren()) do
  103.                 if v.ClassName == "Accessory" then
  104.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  105.                     if attachment1 then
  106.                         for q,w in pairs(character:GetChildren()) do
  107.                             if w.ClassName == "Part" then
  108.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  109.                                 if attachment2 then
  110.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  111.                                     hinge.Attachment0 = attachment1
  112.                                     hinge.Attachment1 = attachment2
  113.                                     hinge.LimitsEnabled = true
  114.                                     hinge.LowerAngle = 0
  115.                                     hinge.UpperAngle = 0
  116.                                 end
  117.                             end
  118.                         end
  119.                     end
  120.                 end
  121.             end
  122.             ragdoll.Parent = workspace
  123.             if ragdoll:findFirstChild("Right Arm") then
  124.                 local glue = Instance.new("Glue", ragdoll.Torso)
  125.                 glue.Part0 = ragdoll.Torso
  126.                 glue.Part1 = ragdoll:findFirstChild("Right Arm")
  127.                 glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  128.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  129.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  130.                 limbcollider.Size = Vector3.new(1.4,1,1)
  131.                 limbcollider.Shape = "Cylinder"
  132.                 limbcollider.Transparency = 1
  133.                 limbcollider.Name = "LimbCollider"
  134.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  135.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  136.                 limbcolliderweld.Part1 = limbcollider
  137.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  138.             end
  139.             if ragdoll:findFirstChild("Left Arm") then
  140.                 local glue = Instance.new("Glue", ragdoll.Torso)
  141.                 glue.Part0 = ragdoll.Torso
  142.                 glue.Part1 = ragdoll:findFirstChild("Left Arm")
  143.                 glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  144.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  145.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  146.                 limbcollider.Size = Vector3.new(1.4,1,1)
  147.                 limbcollider.Shape = "Cylinder"
  148.                 limbcollider.Name = "LimbCollider"
  149.                 limbcollider.Transparency = 1
  150.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  151.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  152.                 limbcolliderweld.Part1 = limbcollider
  153.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  154.             end
  155.             if ragdoll:findFirstChild("Left Leg") then
  156.                 local glue = Instance.new("Glue", ragdoll.Torso)
  157.                 glue.Part0 = ragdoll.Torso
  158.                 glue.Part1 = ragdoll:findFirstChild("Left Leg")
  159.                 glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  160.                 glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  161.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  162.                 limbcollider.Size = Vector3.new(1.4,1,1)
  163.                 limbcollider.Shape = "Cylinder"
  164.                 limbcollider.Name = "LimbCollider"
  165.                 limbcollider.Transparency = 1
  166.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  167.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  168.                 limbcolliderweld.Part1 = limbcollider
  169.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  170.             end
  171.             if ragdoll:findFirstChild("Right Leg") then
  172.                 local glue = Instance.new("Glue", ragdoll.Torso)
  173.                 glue.Part0 = ragdoll.Torso
  174.                 glue.Part1 = ragdoll:findFirstChild("Right Leg")
  175.                 glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  176.                 glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  177.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  178.                 limbcollider.Size = Vector3.new(1.4,1,1)
  179.                 limbcollider.Shape = "Cylinder"
  180.                 limbcollider.Name = "LimbCollider"
  181.                 limbcollider.Transparency = 1
  182.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  183.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  184.                 limbcolliderweld.Part1 = limbcollider
  185.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  186.             end
  187.             if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  188.                 local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  189.                 HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  190.                 local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  191.                 connection.LimitsEnabled = true
  192.                 connection.Attachment0 = ragdoll.Torso.NeckAttachment
  193.                 connection.Attachment1 = HeadAttachment
  194.                 connection.UpperAngle = 60
  195.                 connection.LowerAngle = -60
  196.             elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  197.                 local hedweld = Instance.new("Weld", ragdoll.Torso)
  198.                 hedweld.Part0 = ragdoll.Torso
  199.                 hedweld.Part1 = ragdoll.Head
  200.                 hedweld.C0 = CFrame.new(0,1.5,0)
  201.             end
  202.             game.Debris:AddItem(ragdoll, 30)
  203.             local function aaaalol()
  204.                 wait(0.2)
  205.                 local function searchforvelocity(wot)
  206.                     for i,v in pairs(wot:GetChildren()) do
  207.                         searchforvelocity(v)
  208.                         if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  209.                             v:destroy()
  210.                         end
  211.                     end
  212.                 end
  213.                 searchforvelocity(ragdoll)
  214.                 wait(0.5)
  215.                 if ragdoll:findFirstChildOfClass("Humanoid") then
  216.                     ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  217.                 end
  218.                 if ragdoll:findFirstChild("HumanoidRootPart") then
  219.                     ragdoll:findFirstChild("HumanoidRootPart"):destroy()
  220.                 end
  221.             end
  222.             spawn(aaaalol)
  223.         elseif character:findFirstChild("UpperTorso") then
  224.             character.Archivable = true
  225.             for i,v in pairs(character:GetChildren()) do
  226.                 if v.ClassName == "Sound" then
  227.                     v:remove()
  228.                 end
  229.                 for q,w in pairs(v:GetChildren()) do
  230.                     if w.ClassName == "Sound" then
  231.                         w:remove()
  232.                     end
  233.                 end
  234.             end
  235.             local ragdoll = character:Clone()
  236.             ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  237.             for i,v in pairs(ragdoll:GetDescendants()) do
  238.                 if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  239.                     v:destroy()
  240.                 end
  241.             end
  242.             ragdoll:BreakJoints()
  243.             ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  244.             if ragdoll:findFirstChild("Health") then
  245.                 if ragdoll:findFirstChild("Health").ClassName == "Script" then
  246.                     ragdoll:findFirstChild("Health").Disabled = true
  247.                 end
  248.             end
  249.             for i,v in pairs(character:GetChildren()) do
  250.                 if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  251.                     v:destroy()
  252.                 end
  253.             end
  254.             for i,v in pairs(character:GetChildren()) do
  255.                 if v.ClassName == "Accessory" then
  256.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  257.                     if attachment1 then
  258.                         for q,w in pairs(character:GetChildren()) do
  259.                             if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  260.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  261.                                 if attachment2 then
  262.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  263.                                     hinge.Attachment0 = attachment1
  264.                                     hinge.Attachment1 = attachment2
  265.                                     hinge.LimitsEnabled = true
  266.                                     hinge.LowerAngle = 0
  267.                                     hinge.UpperAngle = 0
  268.                                 end
  269.                             end
  270.                         end
  271.                     end
  272.                 end
  273.             end
  274.             ragdoll.Parent = workspace
  275.             local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  276.             Humanoid.PlatformStand = true
  277.             local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  278.                 local connection = Instance.new('BallSocketConstraint', limb)
  279.                 connection.LimitsEnabled = true
  280.                 connection.Attachment0 = attachementone
  281.                 connection.Attachment1 = attachmenttwo
  282.                 connection.TwistLimitsEnabled = true
  283.                 connection.TwistLowerAngle = twistlower
  284.                 connection.TwistUpperAngle = twistupper
  285.                 local limbcollider = Instance.new("Part", limb)
  286.                 limbcollider.Size = Vector3.new(0.1,1,1)
  287.                 limbcollider.Shape = "Cylinder"
  288.                 limbcollider.Transparency = 1
  289.                 limbcollider:BreakJoints()
  290.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  291.                 limbcolliderweld.Part0 = limb
  292.                 limbcolliderweld.Part1 = limbcollider
  293.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  294.             end
  295.             local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  296.                 local connection = Instance.new('HingeConstraint', limb)
  297.                 connection.LimitsEnabled = true
  298.                 connection.Attachment0 = attachementone
  299.                 connection.Attachment1 = attachmenttwo
  300.                 connection.LimitsEnabled = true
  301.                 connection.LowerAngle = lower
  302.                 connection.UpperAngle = upper
  303.                 local limbcollider = Instance.new("Part", limb)
  304.                 limbcollider.Size = Vector3.new(0.1,1,1)
  305.                 limbcollider.Shape = "Cylinder"
  306.                 limbcollider.Transparency = 1
  307.                 limbcollider:BreakJoints()
  308.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  309.                 limbcolliderweld.Part0 = limb
  310.                 limbcolliderweld.Part1 = limbcollider
  311.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  312.             end
  313.             local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  314.             HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  315.             if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
  316.                 makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  317.             end
  318.             makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  319.             makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  320.             makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  321.             makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  322.             --
  323.             makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  324.             makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  325.             makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  326.             --
  327.             makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  328.             makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  329.             makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  330.             --
  331.             makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  332.             makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  333.             makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  334.             for i,v in pairs(Humanoid.Parent:GetChildren()) do
  335.                 if v.ClassName == "Accessory" then
  336.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  337.                     if attachment1 then
  338.                         for q,w in pairs(Humanoid.Parent:GetChildren()) do
  339.                             if w.ClassName == "Part" then
  340.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  341.                                 if attachment2 then
  342.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  343.                                     hinge.Attachment0 = attachment1
  344.                                     hinge.Attachment1 = attachment2
  345.                                     hinge.LimitsEnabled = true
  346.                                     hinge.LowerAngle = 0
  347.                                     hinge.UpperAngle = 0
  348.                                 end
  349.                             end
  350.                         end
  351.                     end
  352.                 end
  353.             end
  354.             for i,v in pairs(ragdoll:GetChildren()) do
  355.                 for q,w in pairs(v:GetChildren()) do
  356.                     if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
  357.                         w:destroy()
  358.                     end
  359.                 end
  360.             end
  361.             if ragdoll:findFirstChild("HumanoidRootPart") then
  362.                 ragdoll.HumanoidRootPart:destroy()
  363.             end
  364.             if ragdoll:findFirstChildOfClass("Humanoid") then
  365.                 ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  366.             end
  367.             local function waitfordatmoment()
  368.                 wait(0.2)
  369.                 local function searchforvelocity(wot)
  370.                     for i,v in pairs(wot:GetChildren()) do
  371.                         searchforvelocity(v)
  372.                         if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  373.                             v:destroy()
  374.                         end
  375.                     end
  376.                 end
  377.                 searchforvelocity(ragdoll)
  378.             end
  379.             spawn(waitfordatmoment)
  380.             game.Debris:AddItem(ragdoll, 30)
  381.         end
  382.     end
  383. end
  384. function damage(what, action, t, range)
  385.     for i,v in pairs(workspace:GetDescendants()) do
  386.         if v.ClassName == "Model" then
  387.             local head = v:findFirstChild("Head")
  388.             local humanoid = v:findFirstChildOfClass("Humanoid")
  389.             local torso = v:findFirstChild("Torso")
  390.             local ragdolled = v:findFirstChild("ragdolledpunch")
  391.             if humanoid and head then
  392.                 if (head.Position - what.Position).magnitude < range and v ~= character and humanoid.Health > 0 then
  393.                     if action ~= "stomp" then
  394.                         if ragdolled then
  395.                             return
  396.                         end
  397.                     end
  398.                     local ragdolledpunch = Instance.new("BoolValue", v)
  399.                     ragdolledpunch.Name = "ragdolledpunch"
  400.                     game.Debris:AddItem(ragdolledpunch, t)
  401.                     if action == "punch" then
  402.                         local velocity = Instance.new("BodyVelocity", head)
  403.                         velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  404.                         velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(5,15)
  405.                         punchsound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  406.                         punchsound:Play()
  407.                         game.Debris:AddItem(velocity, 0.2)
  408.                     elseif action == "uppercut" then
  409.                         local velocity = Instance.new("BodyVelocity", head)
  410.                         velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  411.                         velocity.Velocity = (character.HumanoidRootPart.CFrame.upVector * math.random(5,15)) + (character.HumanoidRootPart.CFrame.lookVector * math.random(5,15))
  412.                         kicksound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  413.                         kicksound:Play()
  414.                         game.Debris:AddItem(velocity, 0.2)
  415.                     elseif action == "kick" then
  416.                         local velocity = Instance.new("BodyVelocity", head)
  417.                         velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  418.                         velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * 20
  419.                         goresound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  420.                         goresound:Play()
  421.                         game.Debris:AddItem(velocity, 0.2)
  422.                     elseif action == "dropkick" then
  423.                         local velocity = Instance.new("BodyVelocity", head)
  424.                         velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  425.                         velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * 30
  426.                         kicksound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  427.                         kicksound:Play()
  428.                         goresound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  429.                         goresound:Play()
  430.                         game.Debris:AddItem(velocity, 0.2)
  431.                     elseif action == "stomp" then
  432.                         punchsound.PlaybackSpeed = 1+(math.random(-5,5)/15)
  433.                         punchsound:Play()
  434.                     end
  435.                     if action ~= "blocked" then
  436.                         local dmg = math.random(30,50)
  437.                         if action == "uppercut" then
  438.                             dmg = dmg + math.random(20,30)
  439.                         elseif action == "kick" then
  440.                             dmg = dmg + math.random(40,50)
  441.                         elseif action == "dropkick" then
  442.                             dmg = dmg + math.random(50,90)
  443.                         end
  444.                         if humanoid.Health <= dmg then
  445.                             humanoid.Health = 0
  446.                             ragdollkill(v)
  447.                         end
  448.                         humanoid.Health = humanoid.Health - dmg
  449.                     end
  450.                     if action ~= "blocked" and action ~= "uppercut" and action ~= "kick" and action ~= "dropkick" then
  451.                         if math.random(1,5) ~= 1 then
  452.                             return
  453.                         end
  454.                     end
  455.                     if action == "stomp" then
  456.                         return
  457.                     end
  458.                     humanoid.PlatformStand = true
  459.                     coroutine.wrap(function()
  460.                         wait(t)
  461.                         humanoid.PlatformStand = false
  462.                     end)()
  463.                     if torso then
  464.                         coroutine.wrap(function()
  465.                             humanoid = v:WaitForChild("Humanoid")
  466.                             local ragdoll = v
  467.                             if ragdoll:findFirstChild("Right Arm") then
  468.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  469.                                 glue.Part0 = ragdoll.Torso
  470.                                 glue.Part1 = ragdoll:findFirstChild("Right Arm")
  471.                                 glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  472.                                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  473.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  474.                                 limbcollider.Size = Vector3.new(1.4,1,1)
  475.                                 limbcollider.Shape = "Cylinder"
  476.                                 limbcollider.Transparency = 1
  477.                                 limbcollider.Name = "LimbCollider"
  478.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  479.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  480.                                 limbcolliderweld.Part1 = limbcollider
  481.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  482.                                 coroutine.wrap(function()
  483.                                     if ragdoll.Torso:findFirstChild("Right Shoulder") then
  484.                                         local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone()
  485.                                         ragdoll.Torso:findFirstChild("Right Shoulder"):destroy()
  486.                                         coroutine.wrap(function()
  487.                                             wait(t)
  488.                                             limbclone.Parent = ragdoll.Torso
  489.                                             limbclone.Part0 = ragdoll.Torso
  490.                                             limbclone.Part1 = ragdoll["Right Arm"]
  491.                                         end)()
  492.                                     end
  493.                                     wait(t)
  494.                                     glue:destroy()
  495.                                     limbcollider:destroy()
  496.                                     limbcolliderweld:destroy()
  497.                                 end)()
  498.                             end
  499.                             if ragdoll:findFirstChild("Left Arm") then
  500.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  501.                                 glue.Part0 = ragdoll.Torso
  502.                                 glue.Part1 = ragdoll:findFirstChild("Left Arm")
  503.                                 glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  504.                                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  505.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  506.                                 limbcollider.Size = Vector3.new(1.4,1,1)
  507.                                 limbcollider.Shape = "Cylinder"
  508.                                 limbcollider.Name = "LimbCollider"
  509.                                 limbcollider.Transparency = 1
  510.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  511.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")        
  512.                                 limbcolliderweld.Part1 = limbcollider
  513.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  514.                                 coroutine.wrap(function()
  515.                                     if ragdoll.Torso:findFirstChild("Left Shoulder") then
  516.                                         local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
  517.                                         ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
  518.                                         coroutine.wrap(function()
  519.                                             wait(t)
  520.                                             limbclone.Parent = ragdoll.Torso
  521.                                             limbclone.Part0 = ragdoll.Torso
  522.                                             limbclone.Part1 = ragdoll["Left Arm"]
  523.                                         end)()
  524.                                     end
  525.                                     wait(t)
  526.                                     glue:destroy()
  527.                                     limbcollider:destroy()
  528.                                     limbcolliderweld:destroy()
  529.                                 end)()
  530.                             end
  531.                             if ragdoll:findFirstChild("Left Leg") then
  532.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  533.                                 glue.Part0 = ragdoll.Torso
  534.                                 glue.Part1 = ragdoll:findFirstChild("Left Leg")
  535.                                 glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  536.                                 glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  537.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  538.                                 limbcollider.Size = Vector3.new(1.5,1,1)
  539.                                 limbcollider.Shape = "Cylinder"
  540.                                 limbcollider.Name = "LimbCollider"
  541.                                 limbcollider.Transparency = 1
  542.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  543.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  544.                                 limbcolliderweld.Part1 = limbcollider
  545.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  546.                                 coroutine.wrap(function()
  547.                                     if ragdoll.Torso:findFirstChild("Left Hip") then
  548.                                         local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
  549.                                         ragdoll.Torso:findFirstChild("Left Hip"):destroy()
  550.                                         coroutine.wrap(function()
  551.                                             wait(t)
  552.                                             limbclone.Parent = ragdoll.Torso
  553.                                             limbclone.Part0 = ragdoll.Torso
  554.                                             limbclone.Part1 = ragdoll["Left Leg"]
  555.                                         end)()
  556.                                     end
  557.                                     wait(t)
  558.                                     glue:destroy()
  559.                                     limbcollider:destroy()
  560.                                     limbcolliderweld:destroy()
  561.                                 end)()
  562.                             end
  563.                             if ragdoll:findFirstChild("Right Leg") then
  564.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  565.                                 glue.Part0 = ragdoll.Torso
  566.                                 glue.Part1 = ragdoll:findFirstChild("Right Leg")
  567.                                 glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  568.                                 glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  569.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  570.                                 limbcollider.Size = Vector3.new(1.5,1,1)
  571.                                 limbcollider.Shape = "Cylinder"
  572.                                 limbcollider.Name = "LimbCollider"
  573.                                 limbcollider.Transparency = 1
  574.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  575.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  576.                                 limbcolliderweld.Part1 = limbcollider
  577.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  578.                                 coroutine.wrap(function()
  579.                                     if ragdoll.Torso:findFirstChild("Right Hip") then
  580.                                         local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
  581.                                         ragdoll.Torso:findFirstChild("Right Hip"):destroy()
  582.                                         coroutine.wrap(function()
  583.                                             wait(t)
  584.                                             limbclone.Parent = ragdoll.Torso
  585.                                             limbclone.Part0 = ragdoll.Torso
  586.                                             limbclone.Part1 = ragdoll["Right Leg"]
  587.                                         end)()
  588.                                     end
  589.                                     wait(t)
  590.                                     glue:destroy()
  591.                                     limbcollider:destroy()
  592.                                     limbcolliderweld:destroy()
  593.                                 end)()
  594.                             end
  595.                         end)()
  596.                     end
  597.                 end
  598.             end
  599.         end
  600.     end
  601. end
  602. --
  603. tool.Activated:connect(function()
  604.     if owner ~= nil and character ~= nil and canattack then
  605.         local rightarmweld = character.Torso:findFirstChild("RightArmWeldpunch")
  606.         local leftarmweld = character.Torso:findFirstChild("LeftArmWeldpunch")
  607.         local headweld = character.Torso:findFirstChild("HeadWeldpunch")
  608.         local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpunch")
  609.         for i,v in pairs(workspace:GetDescendants()) do
  610.             if v.ClassName == "Model" and v ~= character then
  611.                 local humanoid = v:findFirstChildOfClass("Humanoid")
  612.                 local headepic = v:findFirstChild("Head")
  613.                 if humanoid and headepic then
  614.                     if (headepic.Position - character.HumanoidRootPart.Position).magnitude < 5 and humanoid.PlatformStand and humanoid.Health > 0 then
  615.                         local rightlegweld = Instance.new("Weld", character.Torso)
  616.                         rightlegweld.Part0 = character.Torso
  617.                         rightlegweld.Part1 = character["Right Leg"]
  618.                         rightlegweld.C0 = CFrame.new(0.5,-2,0)
  619.                         rightlegweld.Name = "RightLegWeldbat"
  620.                         local leftlegweld = Instance.new("Weld", character.Torso)
  621.                         leftlegweld.Part0 = character.Torso
  622.                         leftlegweld.Part1 = character["Left Leg"]
  623.                         leftlegweld.C0 = CFrame.new(-0.5,-2,0)
  624.                         leftlegweld.Name = "LeftLegWeldbat"
  625.                         character:findFirstChildOfClass("Humanoid").WalkSpeed = 0
  626.                         for i = 0,1 , 0.1 do
  627.                             cananimate = false
  628.                             canattack = false
  629.                             character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, Vector3.new(headepic.Position.x,character.HumanoidRootPart.Position.y,headepic.Position.z))
  630.                             rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5, -0.75804615, -1.03058243, 1, 0, 0, 0, 1, 5.96046448e-08, 0, -5.96046448e-08, 1),i)
  631.                             leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5, -1.93969202, 0.342020512, 1, 0, 0, 0, 0.939692557, 0.342020333, 0, -0.342020392, 0.939692557),i)
  632.                             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0,0),i)
  633.                             leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0,0),i)
  634.                             rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.939692557, -0.342020363, 0, 0.342020363, 0.939692557),i)
  635.                             headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.38302135, -0.32139349, 1, 0, 0, 0, 0.766044259, 0.642787755, 0, -0.642787755, 0.766044259),i)
  636.                             runservice.Stepped:wait()
  637.                         end
  638.                         for i = 0,1 , 0.15 do
  639.                             rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5, -1.93246841, -1.17564046, 1, 0, 0, 0, 0.939692557, -0.342019618, 0, 0.342019647, 0.939692676),i)
  640.                             leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5, -1.98480701, 0.173648238, 1, 0, 0, 0, 0.984807491, 0.173648387, 0, -0.173648402, 0.984807551),i)
  641.                             rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.64085674, 0.201163769, -2.38418579e-07, 0.939692616, -0.342020124, 0, 0.342020094, 0.939692497, 0, 0, 0, 0.99999994),i)
  642.                             leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.64085674, 0.201163769, -2.38418579e-07, 0.939692616, 0.342020124, 0, -0.342020094, 0.939692497, 0, 0, 0, 0.99999994),i)
  643.                             rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, -0.0347294807, -0.396961689, 1, 0, 0, 0, 0.98480773, 0.173648179, 0, -0.173648179, 0.98480773),i)
  644.                             headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.38302231, -0.321393967, 1, 0, 0, 0, 0.766044259, 0.642787695, 0, -0.642787695, 0.766044259),i)
  645.                             runservice.Stepped:wait()
  646.                         end
  647.                         damage(character["Right Leg"], "stomp", 1, 3.5)
  648.                         coroutine.wrap(function()
  649.                             for i = 0,1 ,0.07 do
  650.                                 leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
  651.                                 rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
  652.                                 runservice.Stepped:wait()
  653.                             end
  654.                             leftlegweld:destroy()
  655.                             rightlegweld:destroy()
  656.                             character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
  657.                         end)()
  658.                         cananimate = true
  659.                         canattack = true
  660.                         return
  661.                     end
  662.                 end
  663.             end
  664.         end
  665.         if character:findFirstChildOfClass("Humanoid").Jump then
  666.             canattack = false
  667.             cananimate = false
  668.             character:findFirstChildOfClass("Humanoid").PlatformStand = true
  669.             local rightlegweld = Instance.new("Weld", character.Torso)
  670.             rightlegweld.Part0 = character.Torso
  671.             rightlegweld.Part1 = character["Right Leg"]
  672.             rightlegweld.C0 = CFrame.new(0.5,-2,0)
  673.             rightlegweld.Name = "RightLegWeldpunch"
  674.             local leftlegweld = Instance.new("Weld", character.Torso)
  675.             leftlegweld.Part0 = character.Torso
  676.             leftlegweld.Part1 = character["Left Leg"]
  677.             leftlegweld.C0 = CFrame.new(-0.5,-2,0)
  678.             leftlegweld.Name = "LeftLegWeldpunch"
  679.             local vel = Instance.new("BodyVelocity", character.HumanoidRootPart)
  680.             vel.MaxForce = Vector3.new(math.huge,600,math.huge)
  681.             vel.Velocity = character.HumanoidRootPart.CFrame.lookVector * 20
  682.             for i = 0,1 , 0.13 do
  683.                 damage(character["Left Leg"], "dropkick", 3.5, 3)
  684.                 damage(character["Right Leg"], "dropkick", 3.5, 3)
  685.                 rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5, -1, -0.400000095, 0.999999881, 0, 0, 0, 0.999999881, 0, 0, -1.49011612e-08, 0.99999994),i)
  686.                 leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5, -1, -0.400000095, 0.999999881, 0, 0, 0, 0.999999881, 0, 0, -1.49011612e-08, 0.99999994),i)
  687.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.64085579, 0.201163769, 0, 0.939692438, -0.342020065, 0, 0.342020094, 0.939692438, 0, 0, 0, 0.99999994),i)
  688.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.64085579, 0.201163769, 0, 0.939692438, 0.342020065, 0, -0.342020094, 0.939692438, 0, 0, 0, 0.99999994),i)
  689.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.pi/2,0,0),i)
  690.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.24999976, -0.433012486, 0.999999881, 0, 0, 0, 0.5, 0.866025448, 0, -0.866025448, 0.5),i)
  691.                 runservice.Stepped:wait()
  692.             end
  693.             swishsound.PlaybackSpeed = 1+(math.random(-2,5)/12)
  694.             swishsound:Play()
  695.             for i = 0,1 , 0.13 do
  696.                 damage(character["Left Leg"], "dropkick", 3.5, 3)
  697.                 damage(character["Right Leg"], "dropkick", 3.5, 3)
  698.                 rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 1.49011612e-08, 0.99999994),i)
  699.                 leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 1.49011612e-08, 0.99999994),i)
  700.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.57922745, 0.094420433, 4.76837158e-07, 0.98480773, -0.173648179, 0, 0.173648149, 0.984807611, 0, -1.86264515e-09, 0, 0.99999994),i)
  701.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.57922745, 0.094420433, 4.76837158e-07, 0.98480773, 0.173648179, 0, -0.173648149, 0.984807611, 0, 1.86264515e-09, 0, 0.99999994),i)
  702.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ((math.pi/2)-math.rad(30),0,0),i)
  703.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.32139361, -0.383021832, 1, 0, 0, 0, 0.642787635, 0.766044438, 0, -0.766044438, 0.642787635),i)
  704.                 runservice.Stepped:wait()
  705.             end
  706.             for i = 1,20 do
  707.                 damage(character["Left Leg"], "dropkick", 3.5, 3)
  708.                 damage(character["Right Leg"], "dropkick", 3.5, 3)
  709.                 runservice.Stepped:wait()
  710.             end
  711.             vel:destroy()
  712.             rightlegweld:destroy()
  713.             leftlegweld:destroy()
  714.             coroutine.wrap(function()
  715.                 wait(0.8)
  716.                 character:findFirstChildOfClass("Humanoid").PlatformStand = false
  717.             end)()
  718.             canattack = true
  719.             cananimate = true
  720.         else
  721.             canattack = false
  722.             cananimate = false
  723.             if attacknumber == 1 then
  724.                 local sine = 0
  725.                 local tiltval = 0
  726.                 for i = 1,20 do --17 and sine 3
  727.                     sine = sine + 1
  728.                     damage(character["Right Arm"], "punch", 1, 2)
  729.                     headweld.C0 = headweld.C0:lerp(CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,math.sin(sine/3.25),0),0.3)
  730.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,-math.sin(sine/3.25)*2) * CFrame.new(0,-0.5,0),0.3)
  731.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,(-math.sin(sine/3.25)*1.5)-math.rad(10)+(math.cos(sine/11.25))) * CFrame.new(0,-0.5,0),0.3)
  732.                     if i == 3 then
  733.                         swishsound.PlaybackSpeed = 1+(math.random(-2,5)/12)
  734.                         swishsound:Play()
  735.                     end
  736.                     if i > 10 then
  737.                         if i < 17 then
  738.                             tiltval = tiltval + 0.048
  739.                         end
  740.                         rightarmweld.C0 = rightarmweld.C0 * CFrame.new(-tiltval/2,0,0) * CFrame.fromEulerAnglesXYZ(0,0,-tiltval)
  741.                     end
  742.                     rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(sine/3.25)/8,-math.sin(sine/3.25)*2.3,0), 0.3)
  743.                     runservice.Stepped:wait()
  744.                 end
  745.                 attacknumber = 2
  746.             elseif attacknumber == 2 then
  747.                 local sine = 0
  748.                 local tiltval = 0
  749.                 for i = 1,20 do --17 and sine 3
  750.                     sine = sine + 1
  751.                     damage(character["Left Arm"], "punch", 1, 2)
  752.                     headweld.C0 = headweld.C0:lerp(CFrame.new(0,1.5,0) * CFrame.fromEulerAnglesXYZ(0,-math.sin(sine/3.25),0),0.3)
  753.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,(math.sin(sine/3.25)*1.5)+math.rad(10)-(math.cos(sine/11.25))) * CFrame.new(0,-0.5,0),0.3)
  754.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,math.sin(sine/3.25)*2) * CFrame.new(0,-0.5,0),0.3)
  755.                     if i == 3 then
  756.                         swishsound.PlaybackSpeed = 1+(math.random(-2,5)/12)
  757.                         swishsound:Play()
  758.                     end
  759.                     if i > 10 then
  760.                         if i < 17 then
  761.                             tiltval = tiltval + 0.048
  762.                         end
  763.                         leftarmweld.C0 = leftarmweld.C0 * CFrame.new(tiltval/2,0,0) * CFrame.fromEulerAnglesXYZ(0,0,tiltval)
  764.                     end
  765.                     rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(sine/3.25)/8,math.sin(sine/3.25)*2.3,0), 0.3)
  766.                     runservice.Stepped:wait()
  767.                 end
  768.                 attacknumber = 3
  769.             elseif attacknumber == 3 then
  770.                 for i = 0,1 , 0.06 do
  771.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.52833557, 0.510312557, 0.469846129, 0.939692497, -0.116977774, -0.321393788, 0.342020124, 0.321393818, 0.88302213, 1.49011612e-08, -0.939692616, 0.342020124),i)
  772.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.64085674, 0.307911873, -0.228921652, 0.939692557, 0.342020094, 0, -0.219846308, 0.604022801, -0.766044378, -0.262002587, 0.719846249, 0.642787576),i)
  773.                     rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.98480773, 0, -0.173648179, 0.0593911819, 0.939692616, 0.336824119, 0.163175911, -0.342020184, 0.925416529),i)
  774.                     headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.49240446, 0.0868239403, 0.999999881, -1.86264515e-09, 0, 3.7252903e-09, 0.984807789, -0.17364797, 0, 0.17364794, 0.98480773),i)
  775.                     runservice.Stepped:wait()
  776.                 end
  777.                 swishsound.PlaybackSpeed = 1+(math.random(-2,5)/12)
  778.                 swishsound:Play()
  779.                 for i = 0.35,0.65 , 0.1 do
  780.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.64085674, 0.201164246, 2.38418579e-07, 0.939692497, -0.342020154, 2.7474016e-08, 0.342020005, 0.939692378, -8.94069672e-08, -1.49011612e-08, 1.1920929e-07, 0.999999762) * CFrame.fromEulerAnglesXYZ(0.2,0,0),i)
  781.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.60084724, 0.132367611, 0.0618722439, 0.939692557, 0.262002587, 0.219846293, -0.219846219, 0.955111742, -0.198565692, -0.262002587, 0.138258308, 0.955111921),i)
  782.                     rootweld.C0 = rootweld.C0:lerp(CFrame.new(0.0180921555, -0.590343475, 0.105676413, 0.999541819, -0.0301466491, -0.00267778337, 0.0292237774, 0.938346207, 0.344459206, -0.0078715831, -0.344379693, 0.938797355),i)
  783.                     headweld.C0 = headweld.C0:lerp(CFrame.new(9.53674316e-07, 1.49240351, 0.0868239403, 0.999999881, 2.32830644e-09, 2.09547579e-08, -2.09547579e-09, 0.984807611, -0.173648, 2.14204192e-08, 0.173647881, 0.984807551),i)
  784.                     runservice.Stepped:wait()
  785.                 end
  786.                 for i = 0,1 , 0.1 do
  787.                     damage(character["Right Arm"], "uppercut", 1.5, 2)
  788.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.50000012, 1.00000048, -9.53674316e-07, 0.999999881, -1.1920929e-07, 9.12696123e-08, 1.1920929e-07, -0.999999702, -8.80099833e-08, -5.21540642e-08, 6.0768798e-08, -0.999999523),i)
  789.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.68977165, 0.475360394, 0.153648376, 0.682796299, 0.696747243, 0.219846189, -0.667948365, 0.717228174, -0.198565692, -0.296030015, -0.0112660835, 0.955111802),i)
  790.                     rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.00488264859, 0.0593911037, 0.998222649, -0.184096873, 0.981225967, -0.0574793406, -0.98289597, -0.183489174, 0.0157247484),i)
  791.                     headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0558092594, 1.49647284, 0.0200033188, 0.63302207, -0.11161878, -0.766044497, 0.0400089845, 0.992945373, -0.111618832, 0.773098826, 0.0400085226, 0.633021951),i)
  792.                     runservice.Stepped:wait()
  793.                 end
  794.                 attacknumber = 4
  795.             elseif attacknumber == 4 then
  796.                 local rightlegweld = Instance.new("Weld", character.Torso)
  797.                 rightlegweld.Part0 = character.Torso
  798.                 rightlegweld.Part1 = character["Right Leg"]
  799.                 rightlegweld.C0 = CFrame.new(0.5,-2,0)
  800.                 rightlegweld.Name = "RightLegWeldpunch"
  801.                 local leftlegweld = Instance.new("Weld", character.Torso)
  802.                 leftlegweld.Part0 = character.Torso
  803.                 leftlegweld.Part1 = character["Left Leg"]
  804.                 leftlegweld.C0 = CFrame.new(-0.5,-2,0)
  805.                 leftlegweld.Name = "LeftLegWeldpunch"
  806.                 character:findFirstChildOfClass("Humanoid").WalkSpeed = character:findFirstChildOfClass("Humanoid").WalkSpeed - 10
  807.                 for i = 0,1 , 0.06 do
  808.                     rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.500000954, -1.86602545, -0.499999046, 1, -1.49011665e-08, 2.98023224e-08, -2.98023224e-08, 0.866025329, -0.5, 2.98023224e-08, 0.5, 0.866025448),i)
  809.                     leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5, -0.999999523, 1, 1, -2.98023224e-08, -4.47034836e-08, -2.98023224e-08, -5.96046448e-08, 0.999999881, 2.98023224e-08, -1, -1.78813934e-07),i)
  810.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.50000095, 0.250000477, 0.433013439, 1, -5.96046448e-08, -1.09083995e-08, -2.98023224e-08, 0.5, 0.866025388, 2.98023224e-08, -0.866025567, 0.49999997),i)
  811.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.49999905, 0.75, -0.433012009, 1, 5.96046448e-08, 3.99276701e-09, -4.47034836e-08, -0.50000006, -0.866025388, 2.98023224e-08, 0.866025507, -0.50000006),i)
  812.                     rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.866025329, -0.250000119, 0.433012873, 0, 0.866025388, 0.5, -0.500000179, -0.433012664, 0.74999994),i)
  813.                     headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0434112549, 1.49240398, 0.0751919746, 0.866025329, -0.0868241489, -0.492404073, -4.47034836e-08, 0.98480767, -0.173648179, 0.500000179, 0.150383696, 0.852868497),i)
  814.                     runservice.Stepped:wait()
  815.                 end
  816.                 swishsound.PlaybackSpeed = 1+(math.random(-3,5)/12)
  817.                 swishsound:Play()
  818.                 for i = 0,1 , 0.15 do
  819.                     damage(character["Left Leg"], "kick", 1.5, 3.5)
  820.                     rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5, -1.93969274, 0.342020035, 1.00000024, -2.98023224e-08, 0, -1.49011612e-08, 0.939692557, 0.342019916, 0, -0.342019945, 0.939692676),i)
  821.                     leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.500000477, -0.826352119, -0.984807968, 1.00000024, 2.98023224e-08, 1.49011612e-08, -1.49011612e-08, -0.173648193, -0.984807611, 0, 0.98480767, -0.173648223),i)
  822.                     rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.50000095, 0.116978168, 0.321393967, 1.00000024, -1.49011612e-08, 2.98023224e-08, 2.98023224e-08, 0.766044378, 0.642787695, 0, -0.642787814, 0.766044557),i)
  823.                     leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.50000048, 0.116977692, 0.321393013, 1.00000024, -1.49011612e-08, 0, -1.49011612e-08, 0.766044438, 0.642787576, 0, -0.642787576, 0.766044497),i)
  824.                     rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.766044676, -0.111618795, -0.63302207, -1.68030141e-07, 0.98480773, -0.173648238, 0.642787516, 0.133022398, 0.754406631),i)
  825.                     headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0525569916, 1.49498224, -0.0472278595, 0.663642108, -0.105113029, 0.74062866, -0.000909253955, 0.989964247, 0.141314477, -0.748049736, -0.0944556296, 0.656886339),i)
  826.                     runservice.Stepped:wait()
  827.                 end
  828.                 coroutine.wrap(function()
  829.                     for i = 0,1 ,0.07 do
  830.                         leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
  831.                         rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
  832.                         runservice.Stepped:wait()
  833.                     end
  834.                     leftlegweld:destroy()
  835.                     rightlegweld:destroy()
  836.                     character:findFirstChildOfClass("Humanoid").WalkSpeed = character:findFirstChildOfClass("Humanoid").WalkSpeed + 10
  837.                 end)()
  838.                 attacknumber = 1
  839.             end
  840.             if mouseclick then
  841.                 coroutine.wrap(function()
  842.                     local humhp = character:findFirstChildOfClass("Humanoid").Health
  843.                     while runservice.Stepped:wait() and mouseclick do
  844.                         cananimate = false
  845.                         if character:findFirstChildOfClass("Humanoid").Health < humhp then
  846.                             character:findFirstChildOfClass("Humanoid").PlatformStand = false
  847.                             character:findFirstChildOfClass("Humanoid").Health = character:findFirstChildOfClass("Humanoid").Health + (humhp-character:findFirstChildOfClass("Humanoid").Health)
  848.                             character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
  849.                             basssound.TimePosition = 1.525
  850.                             blocksound:Play()
  851.                             basssound:Play()
  852.                             coroutine.wrap(function()
  853.                                 local thehpp = character:findFirstChildOfClass("Humanoid").Health
  854.                                 for i = 1,20 do
  855.                                     character:findFirstChildOfClass("Humanoid").Health = thehpp
  856.                                     runservice.Stepped:wait()
  857.                                 end
  858.                             end)()
  859.                             local nearestdistance = math.huge
  860.                             local nearestplr = nil
  861.                             for i,v in pairs(workspace:GetDescendants()) do
  862.                                 if v.ClassName == "Model" and v ~= character then
  863.                                     local headdw = v:findFirstChild("Head")
  864.                                     local humanoiddw = v:findFirstChildOfClass("Humanoid")
  865.                                     if humanoiddw and headdw then
  866.                                         if (headdw.Position - character.Head.Position).magnitude < 10 and (headdw.Position - character.Head.Position).magnitude < nearestdistance then
  867.                                             nearestdistance = (headdw.Position - character.Head.Position).magnitude
  868.                                             nearestplr = v
  869.                                         end
  870.                                     end
  871.                                 end
  872.                             end
  873.                             if nearestplr ~= nil then
  874.                                 character.Head.CFrame = CFrame.new(character.Head.Position, nearestplr.Head.Position)
  875.                                 nearestplr.Head.CFrame = CFrame.new(nearestplr.Head.Position, character.Head.Position)
  876.                                 local noon = Instance.new("BodyVelocity", nearestplr.Head)
  877.                                 noon.MaxForce = Vector3.new(math.huge,0,math.huge)
  878.                                 noon.Velocity = nearestplr.Head.CFrame.lookVector * -math.random(15,25)
  879.                                 game.Debris:AddItem(noon, 0.2)
  880.                                 damage(nearestplr.Head, "blocked", 3, 0.5)
  881.                             end
  882.                             local velocity = Instance.new("BodyVelocity", character.Head)
  883.                             velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  884.                             velocity.Velocity = character.Head.CFrame.lookVector * -math.random(10,15)
  885.                             game.Debris:AddItem(velocity, 0.2)
  886.                             break
  887.                         end
  888.                         rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.999663353, 0.0246764347, 0.00799234211, -0.0226141848, 0.980059326, -0.19741419, -0.0127044618, 0.197166979, 0.980287552) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/20,0,0),0.3)
  889.                         leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-0.0263385773, 0.920211315, -1.15523124, 0.76604414, -0.642787278, 7.17118382e-08, -0.604022741, -0.719846249, -0.342020154, 0.219846427, 0.262002707, -0.939692557) * CFrame.new(0,math.cos(tick())/20,0),0.3)
  890.                         headweld.C0 = headweld.C0:lerp(CFrame.new(-9.53674316e-07, 1.49240446, -0.0868245959, 0.999999642, -1.33004505e-08, -1.58324838e-08, -1.51339918e-08, 0.98480773, 0.173648581, -1.3038516e-08, -0.1736487, 0.984807611) * CFrame.fromEulerAnglesXYZ(-math.sin(tick())/20,0,0),0.3)
  891.                         rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(0.0363903046, 0.923784733, -1.1914165, 0.721851647, 0.684478879, -0.102069058, 0.613821924, -0.701371074, -0.362355202, -0.319613039, 0.198914632, -0.926434338) * CFrame.new(0,math.cos(tick())/20,0),0.3)
  892.                         humhp = character:findFirstChildOfClass("Humanoid").Health
  893.                     end
  894.                     cananimate = true
  895.                     canattack = true
  896.                 end)()
  897.             else
  898.                 canattack = true
  899.                 cananimate = true
  900.             end
  901.         end
  902.     end
  903. end)
  904. --
  905. tool.Equipped:connect(function()
  906.     equipped = true
  907.     owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  908.     character = owner.Character
  909.     local rightarm = Instance.new("Weld", character.Torso)
  910.     rightarm.Part0 = character.Torso
  911.     rightarm.Part1 = character["Right Arm"]
  912.     rightarm.C0 = CFrame.new(1.5,0,0)
  913.     rightarm.Name = "RightArmWeldpunch"
  914.     local leftarm = Instance.new("Weld", character.Torso)
  915.     leftarm.Part0 = character.Torso
  916.     leftarm.Part1 = character["Left Arm"]
  917.     leftarm.C0 = CFrame.new(-1.5,0,0)
  918.     leftarm.Name = "LeftArmWeldpunch"
  919.     local head = Instance.new("Weld", character.Torso)
  920.     head.Part0 = character.Torso
  921.     head.Part1 = character.Head
  922.     head.C0 = CFrame.new(0,1.5,0)
  923.     head.Name = "HeadWeldpunch"
  924.     local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
  925.     humanoidrootpart.Part0 = character.HumanoidRootPart
  926.     humanoidrootpart.Part1 = character.Torso
  927.     humanoidrootpart.Name = "HumanoidRootPartWeldpunch"
  928.     for i,v in pairs(script:GetChildren()) do
  929.         if v.ClassName == "Sound" then
  930.             v.Parent = character.HumanoidRootPart
  931.         end
  932.     end
  933.     cananimate = true
  934.     local savedchar = character
  935.     local lasthp = character:findFirstChildOfClass("Humanoid").Health
  936.     coroutine.wrap(function()
  937.         local humhp = character:findFirstChildOfClass("Humanoid").Health
  938.         while runservice.Stepped:wait() and equipped do
  939.             if character:findFirstChildOfClass("Humanoid").Health < humhp then
  940.                 local thedamage = humhp - character:findFirstChildOfClass("Humanoid").Health
  941.                 character:findFirstChildOfClass("Humanoid").Health = character:findFirstChildOfClass("Humanoid").Health + thedamage/2.5
  942.             end
  943.             if cananimate then
  944.                 head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1)
  945.                 humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.2)
  946.                 leftarm.C0 = leftarm.C0:lerp(CFrame.new(-0.8,0.15,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi-(math.rad(20)),0,math.rad(15)) * CFrame.new(0,-0.5,0),0.2)
  947.                 rightarm.C0 = rightarm.C0:lerp(CFrame.new(0.8,0.15,-0.5) * CFrame.fromEulerAnglesXYZ(math.pi-(math.rad(20)),0,math.rad(-15)) * CFrame.new(0,-0.5,0),0.2)
  948.             end
  949.             humhp = character:findFirstChildOfClass("Humanoid").Health
  950.         end
  951.     end)()
  952. end)
  953. tool.Unequipped:connect(function()
  954.     equipped = false
  955.     instancewhitelist = {}
  956.     mouseclick = false
  957.     cananimate = false
  958.     for i,v in pairs(character.HumanoidRootPart:GetChildren()) do
  959.         if v.ClassName == "Sound" then
  960.             v.Parent = script
  961.         end
  962.     end
  963.     if character.Torso:findFirstChild("LeftArmWeldpunch") then
  964.         character.Torso:findFirstChild("LeftArmWeldpunch"):destroy()
  965.     end
  966.     if character.Torso:findFirstChild("RightArmWeldpunch") then
  967.         character.Torso:findFirstChild("RightArmWeldpunch"):destroy()
  968.     end
  969.     if character.Torso:findFirstChild("HeadWeldpunch") then
  970.         character.Torso:findFirstChild("HeadWeldpunch"):destroy()
  971.     end
  972.     if character:findFirstChild("HumanoidRootPart") then
  973.         if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpunch") then
  974.             character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldpunch"):destroy()
  975.         end
  976.     end
  977. end)
  978.  
  979. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement