Advertisement
mememasterYT

knife lol

Apr 6th, 2020
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. Tool0 = Instance.new("Tool")
  4. Part1 = Instance.new("Part")
  5. Sound2 = Instance.new("Sound")
  6. SpecialMesh3 = Instance.new("MeshPart")
  7. Sound4 = Instance.new("Sound")
  8. Sound5 = Instance.new("Sound")
  9. Sound6 = Instance.new("Sound")
  10. Trail7 = Instance.new("Trail")
  11. Sound8 = Instance.new("Sound")
  12. Sound9 = Instance.new("Sound")
  13. Sound10 = Instance.new("Sound")
  14. RemoteEvent13 = Instance.new("RemoteEvent")
  15. Tool0.Name = "Combat Knife"
  16. Tool0.ToolTip = "Hold left mouse button to throw."
  17. Part1.Name = "Handle"
  18. Part1.Parent = Tool0
  19. Part1.CFrame = CFrame.new(74.2750092, 1.40000033, -30.2500057, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  20. Part1.Orientation = Vector3.new(0, 180, 0)
  21. Part1.Position = Vector3.new(74.2750092, 1.40000033, -30.2500057)
  22. Part1.Rotation = Vector3.new(-180, 0, -180)
  23. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  24. Part1.Size = Vector3.new(0.149999991, 1.90000105, 0.699999988)
  25. Part1.BottomSurface = Enum.SurfaceType.Smooth
  26. Part1.BrickColor = BrickColor.new("Really black")
  27. Part1.Material = Enum.Material.DiamondPlate
  28. Part1.Reflectance = 0.0099999997764826
  29. Part1.TopSurface = Enum.SurfaceType.Smooth
  30. Part1.brickColor = BrickColor.new("Really black")
  31. Part1.FormFactor = Enum.FormFactor.Custom
  32. Part1.formFactor = Enum.FormFactor.Custom
  33. Sound2.Name = "Swoosh"
  34. Sound2.Parent = Part1
  35. Sound2.Pitch = 1.5
  36. Sound2.PlaybackSpeed = 1.5
  37. Sound2.SoundId = "http://www.roblox.com/asset?id=153647529"
  38. SpecialMesh3.Parent = Part1
  39. SpecialMesh3.MeshId = "https://www.roblox.com/library/4559738742/Arsenal-Knife"
  40. --http://www.roblox.com/asset/?id=121944778
  41. SpecialMesh3.Scale = Vector3.new(0.699999988, 0.699999988, 0.699999988)
  42. SpecialMesh3.TextureId = "https://www.roblox.com/library/2675785351/Black-Black-Black-Black-Black-Black-Black-Black"
  43. Sound4.Name = "Equip"
  44. Sound4.Parent = Part1
  45. Sound4.Pitch = 1.2000000476837
  46. Sound4.PlaybackSpeed = 1.2000000476837
  47. Sound4.SoundId = "rbxassetid://153647514"
  48. Sound5.Name = "Stab"
  49. Sound5.Parent = Part1
  50. Sound5.SoundId = "rbxassetid://2782131222"
  51. Sound5.Volume = 1
  52. Sound6.Name = "Unequip"
  53. Sound6.Parent = Part1
  54. Sound6.SoundId = "rbxassetid://769464514"
  55. Trail7.Parent = Part1
  56. local attach1 = Instance.new("Attachment", Part1)
  57. local attach2 = Instance.new("Attachment", Part1)
  58. attach1.Position = Vector3.new(0, -0.2, 0.15)
  59. attach2.Position = Vector3.new(0, 0.7, 0.15)
  60. Trail7.Attachment0 = attach1
  61. Trail7.Attachment1 = attach2
  62. Trail7.Enabled = false
  63. Trail7.LightInfluence = 1
  64. Trail7.Transparency = NumberSequence.new(0.8125,1)
  65. Trail7.Lifetime = 4
  66. Sound8.Name = "Hitmarker"
  67. Sound8.Parent = Part1
  68. Sound8.SoundId = "rbxassetid://160432334"
  69. Sound9.Name = "Hit"
  70. Sound9.Parent = Part1
  71. Sound9.Pitch = 3.2000000476837
  72. Sound9.PlaybackSpeed = 3.2000000476837
  73. Sound9.SoundId = "http://www.roblox.com/asset/?id=58831920"
  74. Sound10.Name = "Spray"
  75. Sound10.Parent = Part1
  76. Sound10.SoundId = "rbxassetid://843338638"
  77. Tool0.Parent = owner.Character
  78. coroutine.wrap(function()
  79. --By Rufus14
  80. canattack = true
  81. cananimate = false
  82. equipped = false
  83. tool = Tool0
  84. handle = tool.Handle
  85. equipsound = handle.Equip
  86. unequipsound = handle.Unequip
  87. stabsound = handle.Stab
  88. hitsound = handle.Hit
  89. spraysound = handle.Spray
  90. event = tool:WaitForChild("knifeevent")
  91. hitmarkersound = handle.Hitmarker
  92. swooshsound = handle.Swoosh
  93. owner = nil
  94. character = nil
  95. trail = handle.Trail
  96. skins = {"http://www.roblox.com/asset/?id=1587951817","http://www.roblox.com/asset/?id=197196512", "http://www.roblox.com/asset/?id=873992779", "http://www.roblox.com/asset/?id=255807446", "http://www.roblox.com/asset/?id=168000980", "http://www.roblox.com/asset/?id=874577611", "http://www.roblox.com/asset/?id=360376241", "http://www.roblox.com/asset/?id=1905836992", "http://www.roblox.com/asset/?id=155682302", "http://www.roblox.com/asset/?id=165164425","rbxassetid://389248139","http://www.roblox.com/asset/?id=4355817810", "rbxassetid://559676009","http://www.roblox.com/asset/?id=795156885","http://www.roblox.com/asset/?id=228691514","http://www.roblox.com/asset/?id=159953078","http://www.roblox.com/asset/?id=162822166","rbxassetid://998076663","http://www.roblox.com/asset/?id=161024169","http://www.roblox.com/asset/?id=163093131","http://www.roblox.com/asset/?id=175680432","http://www.roblox.com/asset/?id=201595653","http://www.roblox.com/asset/?id=161380326","http://www.roblox.com/asset/?id=367624667","http://www.roblox.com/asset/?id=173946596","rbxassetid://163069061"}
  97. skinnumber = 0
  98. step = game:GetService("RunService").Stepped
  99. swingnum = 0
  100. ragdolltime = 1.5
  101. spinning = false
  102. canthrow = false
  103. knifeeffect = "default"
  104. throwpos = nil
  105. pressed = false
  106. function spinanimation()
  107.     local spinvalue = 0
  108.     spinning = true
  109.     swooshsound.PlaybackSpeed = 1+(math.random(-2,6)/20)
  110.     swooshsound:Play()
  111.     for i = 1,14 do
  112.         if cananimate then
  113.             tool.Grip = tool.Grip * CFrame.fromEulerAnglesXYZ(-0.5,0,0)
  114.             step:wait()
  115.         end
  116.     end
  117.     spinning = true
  118.     trail.Enabled = true
  119. end
  120. --
  121. event.OnServerEvent:connect(function(player, what, where)
  122.     if player == owner then
  123.         if what == "throw" and canthrow and not canattack then
  124.             throwpos = where.p
  125.         end
  126.         if what == "skin" then
  127.             spraysound:Play()
  128.             skinnumber = skinnumber + 1
  129.             knifeeffect = "default"
  130.             stabsound.Volume = 1
  131.             swooshsound.SoundId = "http://www.roblox.com/asset?id=153647529"
  132.             stabsound.SoundId = "rbxassetid://2782131222"
  133.             if skinnumber > table.getn(skins) then
  134.                 skinnumber = 0
  135.                 handle:findFirstChildOfClass("SpecialMesh").TextureId = "http://www.roblox.com/asset/?id=172752354"
  136.             end
  137.             for i = 0,#skins do
  138.                 if i == skinnumber and i ~= 0 then
  139.                     handle:findFirstChildOfClass("SpecialMesh").TextureId = skins[i]
  140.                 end
  141.             end
  142.             --special abilites
  143.             if handle:findFirstChildOfClass("SpecialMesh") then
  144.                 local specialmesh = handle:findFirstChildOfClass("SpecialMesh")
  145.                 if specialmesh.TextureId == "http://www.roblox.com/asset/?id=197196512" then
  146.                     stabsound.SoundId = "rbxassetid://1559093526"
  147.                     knifeeffect = "clown noons be like:"
  148.                 elseif specialmesh.TextureId == "http://www.roblox.com/asset/?id=1587951817" then
  149.                     knifeeffect = "bro you could buy cs s bro"
  150.                 elseif specialmesh.TextureId == "http://www.roblox.com/asset/?id=360376241" then
  151.                     stabsound.SoundId = "rbxassetid://995908246"
  152.                     knifeeffect = "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc"
  153.                 elseif specialmesh.TextureId == "http://www.roblox.com/asset/?id=163093131" then
  154.                     stabsound.SoundId = "rbxassetid://3258183679"
  155.                     print("hamburger")
  156.                 elseif specialmesh.TextureId == "http://www.roblox.com/asset/?id=1905836992" then
  157.                     stabsound.SoundId = "rbxassetid://1304248173"  
  158.                     stabsound.Volume = 0.2
  159.                     print("rock n roll mcdonalds")         
  160.                 elseif specialmesh.TextureId == "rbxassetid://163069061" then
  161.                     stabsound.SoundId = "rbxassetid://1058021195"
  162.                     print("pizza")
  163.                 end
  164.             end
  165.             print(knifeeffect)
  166.         end
  167.     end
  168. end)
  169. tool.Activated:connect(function()
  170.     pressed = true
  171. end)
  172. tool.Deactivated:connect(function()
  173.     pressed = false
  174. end)
  175. --
  176. function funnyeffect(startcf, what)
  177.     if knifeeffect == "clown noons be like:" then
  178.         for i = 1,math.random(4,6) do
  179.             local ball = Instance.new("Part", workspace)
  180.             ball.Size = Vector3.new(0.6,0.6,0.6)
  181.             ball.BrickColor = BrickColor.Random()
  182.             ball.CanCollide = false
  183.             ball.CFrame = startcf
  184.             ball.Shape = "Ball"
  185.             local vel = Instance.new("BodyVelocity", ball)
  186.             vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  187.             vel.Velocity = Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  188.             game.Debris:AddItem(vel, 0.1)
  189.             game.Debris:AddItem(ball, 5)
  190.         end
  191.         if what.Parent:findFirstChild("Head") then
  192.             if not what.Parent.Head:findFirstChild("yo mama moment") then
  193.                 local honkhonk = Instance.new("Part", what.Parent.Head)
  194.                 honkhonk.Size = Vector3.new(0.4,0.4,0.4)
  195.                 honkhonk.BrickColor = BrickColor.new("Really red")
  196.                 honkhonk.CanCollide = false
  197.                 honkhonk.Material = "Neon"
  198.                 honkhonk.Name = "yo mama moment"
  199.                 honkhonk.Shape = "Ball"
  200.                 honkhonk:BreakJoints()
  201.                 local weld = Instance.new("Weld", honkhonk)
  202.                 weld.Part0 = what.Parent.Head
  203.                 weld.Part1 = honkhonk
  204.                 weld.C0 = CFrame.new(0,0,-what.Parent.Head.Size.z/2)
  205.             end
  206.         end
  207.     elseif knifeeffect == "bro you could buy cs s bro" then
  208.         if what.Name == "Head" then
  209.             for i,v in pairs(what.Parent:GetDescendants()) do
  210.                 if v.ClassName == "MeshPart" or v.ClassName == "Part" and not v:findFirstChild("missing") then
  211.                     local decal = Instance.new("Texture", v)
  212.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  213.                     decal.Face = "Top"
  214.                     decal.Name = "missing"
  215.                     local decal = Instance.new("Texture", v)
  216.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  217.                     decal.Face = "Front"
  218.                     decal.Name = "missing"
  219.                     local decal = Instance.new("Texture", v)
  220.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  221.                     decal.Face = "Back"
  222.                     decal.Name = "missing"
  223.                     local decal = Instance.new("Texture", v)
  224.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  225.                     decal.Face = "Bottom"
  226.                     decal.Name = "missing"
  227.                     local decal = Instance.new("Texture", v)
  228.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  229.                     decal.Face = "Left"
  230.                     decal.Name = "missing"
  231.                     local decal = Instance.new("Texture", v)
  232.                     decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  233.                     decal.Face = "Right"
  234.                     decal.Name = "missing"
  235.                 end
  236.             end
  237.         else
  238.             if not what:findFirstChild("missing") then
  239.                 local decal = Instance.new("Texture", what)
  240.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  241.                 decal.Face = "Top"
  242.                 decal.Name = "missing"
  243.                 local decal = Instance.new("Texture", what)
  244.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  245.                 decal.Face = "Front"
  246.                 decal.Name = "missing"
  247.                 local decal = Instance.new("Texture", what)
  248.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  249.                 decal.Face = "Back"
  250.                 decal.Name = "missing"
  251.                 local decal = Instance.new("Texture", what)
  252.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  253.                 decal.Face = "Bottom"
  254.                 decal.Name = "missing"
  255.                 local decal = Instance.new("Texture", what)
  256.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  257.                 decal.Face = "Left"
  258.                 decal.Name = "missing"
  259.                 local decal = Instance.new("Texture", what)
  260.                 decal.Texture = "http://www.roblox.com/asset/?id=1587951817"
  261.                 decal.Face = "Right"
  262.                 decal.Name = "missing"
  263.             end
  264.         end
  265.     elseif knifeeffect == "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  266.         for i,v in pairs(what.Parent:GetDescendants()) do
  267.             if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "Decal" or v.ClassName == "Texture" then
  268.                 if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  269.                     v.BrickColor = BrickColor.Random()
  270.                     v.Material = "Neon"
  271.                 end
  272.                 coroutine.wrap(function()
  273.                     for i = 1,150 do
  274.                         v.Transparency = v.Transparency + 0.0075
  275.                         step:wait()
  276.                     end
  277.                     v:destroy()
  278.                 end)()
  279.             end
  280.         end
  281.     end
  282. end
  283. --
  284. function damage()
  285.     for i,v in pairs(workspace:GetDescendants()) do
  286.         if v.ClassName == "Model" then
  287.             local head = v:findFirstChild("Head")
  288.             local humanoid = v:findFirstChildOfClass("Humanoid")
  289.             local torso = v:findFirstChild("Torso")
  290.             local ragdolled = v:findFirstChild("ragdolledknife")
  291.             if humanoid and head and not ragdolled then
  292.                 if (head.Position - handle.Position).magnitude < 2 and v ~= character and humanoid.Health > 0 then
  293.                     funnyeffect(head.CFrame, head)
  294.                     stabsound.PlaybackSpeed = 1+(math.random(-4,4)/10)
  295.                     stabsound:Play()
  296.                     hitmarkersound:Play()
  297.                     if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  298.                         local dmg = math.random(20,50)
  299.                         if humanoid.Health <= dmg then
  300.                             humanoid.Health = 0
  301.                             ragdollkill(v)
  302.                         end
  303.                         humanoid.Health = humanoid.Health - dmg
  304.                     end
  305.                     local ragdolledknife = Instance.new("BoolValue", v)
  306.                     ragdolledknife.Name = "ragdolledknife"
  307.                     local velocity = Instance.new("BodyVelocity", head)
  308.                     velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  309.                     velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(5,15)
  310.                     humanoid.PlatformStand = true
  311.                     coroutine.wrap(function()
  312.                         wait(ragdolltime)
  313.                         humanoid.PlatformStand = false
  314.                     end)()
  315.                     game.Debris:AddItem(ragdolledknife, 1)
  316.                     game.Debris:AddItem(velocity, 0.2)
  317.                     if torso then
  318.                         coroutine.wrap(function()
  319.                             humanoid = v:WaitForChild("Humanoid")
  320.                             local ragdoll = v
  321.                             if ragdoll:findFirstChild("Right Arm") then
  322.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  323.                                 glue.Part0 = ragdoll.Torso
  324.                                 glue.Part1 = ragdoll:findFirstChild("Right Arm")
  325.                                 glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  326.                                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  327.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  328.                                 limbcollider.Size = Vector3.new(1.4,1,1)
  329.                                 limbcollider.Shape = "Cylinder"
  330.                                 limbcollider.Transparency = 1
  331.                                 limbcollider.Name = "LimbCollider"
  332.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  333.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  334.                                 limbcolliderweld.Part1 = limbcollider
  335.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  336.                                 coroutine.wrap(function()
  337.                                     if ragdoll.Torso:findFirstChild("Right Shoulder") then
  338.                                         local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone()
  339.                                         ragdoll.Torso:findFirstChild("Right Shoulder"):destroy()
  340.                                         coroutine.wrap(function()
  341.                                             wait(ragdolltime)
  342.                                             limbclone.Parent = ragdoll.Torso
  343.                                             limbclone.Part0 = ragdoll.Torso
  344.                                             limbclone.Part1 = ragdoll["Right Arm"]
  345.                                         end)()
  346.                                     end
  347.                                     wait(ragdolltime)
  348.                                     glue:destroy()
  349.                                     limbcollider:destroy()
  350.                                     limbcolliderweld:destroy()
  351.                                 end)()
  352.                             end
  353.                             if ragdoll:findFirstChild("Left Arm") then
  354.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  355.                                 glue.Part0 = ragdoll.Torso
  356.                                 glue.Part1 = ragdoll:findFirstChild("Left Arm")
  357.                                 glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  358.                                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  359.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  360.                                 limbcollider.Size = Vector3.new(1.4,1,1)
  361.                                 limbcollider.Shape = "Cylinder"
  362.                                 limbcollider.Name = "LimbCollider"
  363.                                 limbcollider.Transparency = 1
  364.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  365.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")        
  366.                                 limbcolliderweld.Part1 = limbcollider
  367.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  368.                                 coroutine.wrap(function()
  369.                                     if ragdoll.Torso:findFirstChild("Left Shoulder") then
  370.                                         local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
  371.                                         ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
  372.                                         coroutine.wrap(function()
  373.                                             wait(ragdolltime)
  374.                                             limbclone.Parent = ragdoll.Torso
  375.                                             limbclone.Part0 = ragdoll.Torso
  376.                                             limbclone.Part1 = ragdoll["Left Arm"]
  377.                                         end)()
  378.                                     end
  379.                                     wait(ragdolltime)
  380.                                     glue:destroy()
  381.                                     limbcollider:destroy()
  382.                                     limbcolliderweld:destroy()
  383.                                 end)()
  384.                             end
  385.                             if ragdoll:findFirstChild("Left Leg") then
  386.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  387.                                 glue.Part0 = ragdoll.Torso
  388.                                 glue.Part1 = ragdoll:findFirstChild("Left Leg")
  389.                                 glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  390.                                 glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  391.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  392.                                 limbcollider.Size = Vector3.new(1.5,1,1)
  393.                                 limbcollider.Shape = "Cylinder"
  394.                                 limbcollider.Name = "LimbCollider"
  395.                                 limbcollider.Transparency = 1
  396.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  397.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  398.                                 limbcolliderweld.Part1 = limbcollider
  399.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  400.                                 coroutine.wrap(function()
  401.                                     if ragdoll.Torso:findFirstChild("Left Hip") then
  402.                                         local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
  403.                                         ragdoll.Torso:findFirstChild("Left Hip"):destroy()
  404.                                         coroutine.wrap(function()
  405.                                             wait(ragdolltime)
  406.                                             limbclone.Parent = ragdoll.Torso
  407.                                             limbclone.Part0 = ragdoll.Torso
  408.                                             limbclone.Part1 = ragdoll["Left Leg"]
  409.                                         end)()
  410.                                     end
  411.                                     wait(ragdolltime)
  412.                                     glue:destroy()
  413.                                     limbcollider:destroy()
  414.                                     limbcolliderweld:destroy()
  415.                                 end)()
  416.                             end
  417.                             if ragdoll:findFirstChild("Right Leg") then
  418.                                 local glue = Instance.new("Glue", ragdoll.Torso)
  419.                                 glue.Part0 = ragdoll.Torso
  420.                                 glue.Part1 = ragdoll:findFirstChild("Right Leg")
  421.                                 glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  422.                                 glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  423.                                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  424.                                 limbcollider.Size = Vector3.new(1.5,1,1)
  425.                                 limbcollider.Shape = "Cylinder"
  426.                                 limbcollider.Name = "LimbCollider"
  427.                                 limbcollider.Transparency = 1
  428.                                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  429.                                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  430.                                 limbcolliderweld.Part1 = limbcollider
  431.                                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  432.                                 coroutine.wrap(function()
  433.                                     if ragdoll.Torso:findFirstChild("Right Hip") then
  434.                                         local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
  435.                                         ragdoll.Torso:findFirstChild("Right Hip"):destroy()
  436.                                         coroutine.wrap(function()
  437.                                             wait(ragdolltime)
  438.                                             limbclone.Parent = ragdoll.Torso
  439.                                             limbclone.Part0 = ragdoll.Torso
  440.                                             limbclone.Part1 = ragdoll["Right Leg"]
  441.                                         end)()
  442.                                     end
  443.                                     wait(ragdolltime)
  444.                                     glue:destroy()
  445.                                     limbcollider:destroy()
  446.                                     limbcolliderweld:destroy()
  447.                                 end)()
  448.                             end
  449.                         end)()
  450.                     end
  451.                 end
  452.             end
  453.         end
  454.     end
  455. end
  456. function ragdollplr(v)
  457.     local head = v.Head
  458.     local torso = v:findFirstChild("Torso")
  459.     local humanoid = v:findFirstChildOfClass("Humanoid")
  460.     stabsound.PlaybackSpeed = 1+(math.random(-4,4)/10)
  461.     stabsound:Play()
  462.     hitmarkersound:Play()
  463.     if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  464.         local dmg = math.random(20,50)
  465.         if humanoid.Health <= dmg then
  466.             humanoid.Health = 0
  467.             ragdollkill(v)
  468.         end
  469.         humanoid.Health = humanoid.Health - dmg
  470.     end
  471.     local ragdolledknife = Instance.new("BoolValue", v)
  472.     ragdolledknife.Name = "ragdolledknife"
  473.     local velocity = Instance.new("BodyVelocity", head)
  474.     velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  475.     velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(5,15)
  476.     humanoid.PlatformStand = true
  477.     coroutine.wrap(function()
  478.         wait(ragdolltime)
  479.         humanoid.PlatformStand = false
  480.     end)()
  481.     game.Debris:AddItem(ragdolledknife, ragdolltime)
  482.     game.Debris:AddItem(velocity, 0.2)
  483.     if torso then
  484.         coroutine.wrap(function()
  485.             humanoid = v:WaitForChild("Humanoid")
  486.             local ragdoll = v
  487.             if ragdoll:findFirstChild("Right Arm") then
  488.                 local glue = Instance.new("Glue", ragdoll.Torso)
  489.                 glue.Part0 = ragdoll.Torso
  490.                 glue.Part1 = ragdoll:findFirstChild("Right Arm")
  491.                 glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  492.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  493.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  494.                 limbcollider.Size = Vector3.new(1.4,1,1)
  495.                 limbcollider.Shape = "Cylinder"
  496.                 limbcollider.Transparency = 1
  497.                 limbcollider.Name = "LimbCollider"
  498.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  499.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  500.                 limbcolliderweld.Part1 = limbcollider
  501.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  502.                 coroutine.wrap(function()
  503.                     if ragdoll.Torso:findFirstChild("Right Shoulder") then
  504.                         local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone()
  505.                         ragdoll.Torso:findFirstChild("Right Shoulder"):destroy()
  506.                         coroutine.wrap(function()
  507.                             wait(ragdolltime)
  508.                             if not ragdoll:findFirstChild("Torso") then
  509.                                 return
  510.                             end
  511.                             limbclone.Parent = ragdoll.Torso
  512.                             limbclone.Part0 = ragdoll.Torso
  513.                             limbclone.Part1 = ragdoll["Right Arm"]
  514.                         end)()
  515.                     end
  516.                     wait(ragdolltime)
  517.                     glue:destroy()
  518.                     limbcollider:destroy()
  519.                     limbcolliderweld:destroy()
  520.                 end)()
  521.             end
  522.             if ragdoll:findFirstChild("Left Arm") then
  523.                 local glue = Instance.new("Glue", ragdoll.Torso)
  524.                 glue.Part0 = ragdoll.Torso
  525.                 glue.Part1 = ragdoll:findFirstChild("Left Arm")
  526.                 glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  527.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  528.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  529.                 limbcollider.Size = Vector3.new(1.4,1,1)
  530.                 limbcollider.Shape = "Cylinder"
  531.                 limbcollider.Name = "LimbCollider"
  532.                 limbcollider.Transparency = 1
  533.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  534.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")        
  535.                 limbcolliderweld.Part1 = limbcollider
  536.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  537.                 coroutine.wrap(function()
  538.                     if ragdoll.Torso:findFirstChild("Left Shoulder") then
  539.                         local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
  540.                         ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
  541.                         coroutine.wrap(function()
  542.                             wait(ragdolltime)
  543.                             if not ragdoll:findFirstChild("Torso") then
  544.                                 return
  545.                             end
  546.                             limbclone.Parent = ragdoll.Torso
  547.                             limbclone.Part0 = ragdoll.Torso
  548.                             limbclone.Part1 = ragdoll["Left Arm"]
  549.                         end)()
  550.                     end
  551.                     wait(ragdolltime)
  552.                     glue:destroy()
  553.                     limbcollider:destroy()
  554.                     limbcolliderweld:destroy()
  555.                 end)()
  556.             end
  557.             if ragdoll:findFirstChild("Left Leg") then
  558.                 local glue = Instance.new("Glue", ragdoll.Torso)
  559.                 glue.Part0 = ragdoll.Torso
  560.                 glue.Part1 = ragdoll:findFirstChild("Left Leg")
  561.                 glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  562.                 glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  563.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  564.                 limbcollider.Size = Vector3.new(1.5,1,1)
  565.                 limbcollider.Shape = "Cylinder"
  566.                 limbcollider.Name = "LimbCollider"
  567.                 limbcollider.Transparency = 1
  568.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  569.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  570.                 limbcolliderweld.Part1 = limbcollider
  571.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  572.                 coroutine.wrap(function()
  573.                     if ragdoll.Torso:findFirstChild("Left Hip") then
  574.                         local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
  575.                         ragdoll.Torso:findFirstChild("Left Hip"):destroy()
  576.                         coroutine.wrap(function()
  577.                             wait(ragdolltime)
  578.                             if not ragdoll:findFirstChild("Torso") then
  579.                                 return
  580.                             end
  581.                             limbclone.Parent = ragdoll.Torso
  582.                             limbclone.Part0 = ragdoll.Torso
  583.                             limbclone.Part1 = ragdoll["Left Leg"]
  584.                         end)()
  585.                     end
  586.                     wait(ragdolltime)
  587.                     glue:destroy()
  588.                     limbcollider:destroy()
  589.                     limbcolliderweld:destroy()
  590.                 end)()
  591.             end
  592.             if ragdoll:findFirstChild("Right Leg") then
  593.                 local glue = Instance.new("Glue", ragdoll.Torso)
  594.                 glue.Part0 = ragdoll.Torso
  595.                 glue.Part1 = ragdoll:findFirstChild("Right Leg")
  596.                 glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  597.                 glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  598.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  599.                 limbcollider.Size = Vector3.new(1.5,1,1)
  600.                 limbcollider.Shape = "Cylinder"
  601.                 limbcollider.Name = "LimbCollider"
  602.                 limbcollider.Transparency = 1
  603.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  604.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  605.                 limbcolliderweld.Part1 = limbcollider
  606.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  607.                 coroutine.wrap(function()
  608.                     if ragdoll.Torso:findFirstChild("Right Hip") then
  609.                         local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
  610.                         ragdoll.Torso:findFirstChild("Right Hip"):destroy()
  611.                         coroutine.wrap(function()
  612.                             wait(ragdolltime)
  613.                             if not ragdoll:findFirstChild("Torso") then
  614.                                 return
  615.                             end
  616.                             limbclone.Parent = ragdoll.Torso
  617.                             limbclone.Part0 = ragdoll.Torso
  618.                             limbclone.Part1 = ragdoll["Right Leg"]
  619.                         end)()
  620.                     end
  621.                     wait(ragdolltime)
  622.                     glue:destroy()
  623.                     limbcollider:destroy()
  624.                     limbcolliderweld:destroy()
  625.                 end)()
  626.             end
  627.         end)()
  628.     end
  629. end
  630. tool.Activated:connect(function()
  631.     if owner ~= nil and character ~= nil and canattack then
  632.         cananimate = false
  633.         canattack = false
  634.         local rightarmweld = character.Torso:findFirstChild("RightArmWeldknif")
  635.         local leftarmweld = character.Torso:findFirstChild("LeftArmWeldknif")
  636.         local headweld = character.Torso:findFirstChild("HeadWeldknif")
  637.         local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldknif")
  638.         swooshsound:Play()
  639.         swooshsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
  640.         trail.Enabled = true
  641.         if swingnum == 0 then
  642.             swingnum = 1
  643.             for i = 1,21 do
  644.                 damage()
  645.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,math.sin(i/4)*2,0) * CFrame.new(0,0.5,0),0.2)
  646.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(math.sin(-i/4),0,0),0.2)
  647.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(i/4)/15,math.sin(-i/4)*2,0), 0.2)
  648.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(i/4)*0.6,0,math.sin(i/4)/1.5) * CFrame.new(0,-0.5,0), 0.2)
  649.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(-i/4)*1.8,0,math.rad(30)+math.sin(-i/4)) * CFrame.new(0,-0.5,0), 0.2)
  650.                 step:wait()
  651.             end
  652.             spawn(spinanimation)
  653.         elseif swingnum == 1 then
  654.             swingnum = 2
  655.             local howup = 0
  656.             for i = 1,21 do
  657.                 howup = howup + 1
  658.                 damage()
  659.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,math.sin(i/4)*2.5,0) * CFrame.new(0,0.5,0),0.2)
  660.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(math.sin(-i/4),0,0),0.2)
  661.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(i/4)/15,math.sin(-i/4)*2.5,0), 0.2)
  662.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,-math.pi/4) * CFrame.new(0,-0.5,0), 0.2)
  663.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5-(howup/30),0.5,-(howup/15)) * CFrame.fromEulerAnglesXYZ(0,-math.pi+howup/6,-math.pi/3-(howup/30)) * CFrame.new(0,-0.5,0), 0.2)
  664.                 step:wait()
  665.             end
  666.             damage()
  667.             spawn(spinanimation)
  668.         elseif swingnum == 2 then
  669.             swingnum = 0
  670.             for i = 1,21 do
  671.                 damage()
  672.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,math.sin(i/3)/2,0) * CFrame.new(0,0.5,0),0.2)
  673.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(math.pi,0,0),0.2)
  674.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(i/3)/10,math.sin(-i/3)/2,0), 0.2)
  675.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(i/3.5)*2,0,0) * CFrame.new(0,-0.7,0), 0.2)
  676.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(i/3.5)*2+math.pi,0,0) * CFrame.new(0,-1,0), 0.2)
  677.                 step:wait()
  678.             end
  679.             trail.Enabled = true
  680.         end
  681.         if equipped then
  682.             cananimate = true
  683.         end
  684.         if not pressed then
  685.             canattack = true
  686.         else
  687.             canthrow = true
  688.             cananimate = false
  689.             local throwsine = 0
  690.             while pressed and equipped and not cananimate and step:wait() do
  691.                 throwsine = throwsine + 1
  692.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,math.pi/3+math.sin(throwsine/20)/40,0) * CFrame.new(0,0.5,0),0.2)
  693.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(-math.rad(30),0,0),0.2)
  694.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(math.sin(throwsine/20)/40,-math.pi/3+math.sin(-throwsine/20)/40,0), 0.2)
  695.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(40)+math.sin(throwsine/20)/15,0,0) * CFrame.new(0,-0.5,0), 0.2)
  696.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.sin(throwsine/20)/20+math.pi,0,0) * CFrame.new(0,-0.7,0), 0.2)
  697.             end
  698.             if not equipped then
  699.                 handle.Transparency = 0
  700.                 throwpos = nil
  701.                 cananimate = true
  702.                 canattack = true
  703.                 return
  704.             end
  705.             swooshsound.PlaybackSpeed = 1+(math.random(-1,4)/10)
  706.             swooshsound:Play()
  707.             for i = 1,5 do
  708.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,-math.pi/3,0) * CFrame.new(0,0.5,0),0.2)
  709.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(-math.rad(30),0,0),0.2)
  710.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(-math.rad(10),math.pi/3,0), 0.2)
  711.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(-40),0,0) * CFrame.new(0,-0.5,0), 0.2)
  712.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0) * CFrame.new(0,-0.5,0), 0.2)
  713.                 step:wait()
  714.             end
  715.             handle.Transparency = 1
  716.             local knifeclone = Instance.new("Part", character.Head)
  717.             knifeclone.Size = Vector3.new(0.15, 1.9, 0.7)
  718.             knifeclone.CanCollide = false
  719.             knifeclone.Anchored = true
  720.             knifeclone.Name = "ThrowKnife"
  721.             knifeclone.CFrame = CFrame.new(handle.Position, throwpos)
  722.             local mesh = Instance.new("SpecialMesh", knifeclone)
  723.             mesh.TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId
  724.             mesh.MeshId = "http://www.roblox.com/asset/?id=121944778"
  725.             mesh.Scale = Vector3.new(0.7,0.7,0.7)
  726.             coroutine.wrap(function()
  727.                 local rotatevalue = 0
  728.                 local rayhit = false
  729.                 local lastpos = nil
  730.                 local throwtime = 500
  731.                 local gravitypower = 0
  732.                 local lasttorsopos = character.Torso.CFrame
  733.                 while step:wait() and not rayhit do
  734.                     throwtime = throwtime - 1
  735.                     if throwtime == 0 then
  736.                         knifeclone:Destroy()
  737.                         break
  738.                     end
  739.                     if rotatevalue >= 360 then
  740.                         rotatevalue = 0
  741.                     end
  742.                     knifeclone.CFrame = knifeclone.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(rotatevalue),0,0)
  743.                     rotatevalue = rotatevalue + 20
  744.                     local ignorelist = {handle, knifeclone, character}
  745.                     for q,w in pairs(workspace:GetDescendants()) do
  746.                         if w.Name == "ThrowKnife" then
  747.                             table.insert(ignorelist, w)
  748.                         end
  749.                     end
  750.                     local ray = Ray.new(knifeclone.Position, knifeclone.CFrame.lookVector*3)
  751.                     local ray1 = Ray.new(knifeclone.Position, knifeclone.CFrame.upVector*((-0.25)+(-gravitypower)))
  752.                     local hitt, pos = workspace:FindPartOnRayWithIgnoreList(ray, ignorelist)
  753.                     local hitt1, pos1 = workspace:FindPartOnRayWithIgnoreList(ray1, ignorelist)
  754.                     if hitt then
  755.                         --if hitt.Name ~= "ThrowKnife" then
  756.                             rayhit = true
  757.                             knifeclone.CFrame = CFrame.new(pos)
  758.                             if lastpos ~= nil then
  759.                                 knifeclone.CFrame = CFrame.new(knifeclone.Position, lastpos.p)
  760.                             else
  761.                                 knifeclone.CFrame = CFrame.new(knifeclone.Position, lasttorsopos.p)
  762.                             end
  763.                             knifeclone.CFrame = knifeclone.CFrame * CFrame.fromEulerAnglesXYZ(-math.pi/2,0,math.pi)
  764.                             local weldknife = Instance.new("Weld", knifeclone)
  765.                             weldknife.C0 = hitt.CFrame:toObjectSpace(knifeclone.CFrame)
  766.                             weldknife.Part0 = hitt
  767.                             weldknife.Name = "ouch_weld"
  768.                             weldknife.Part1 = knifeclone
  769.                             knifeclone.Anchored = false
  770.                             local hithumanoid = false
  771.                             coroutine.wrap(function()
  772.                                 knifeclone.Parent = hitt
  773.                                 wait()
  774.                                 hitsound.Parent = knifeclone
  775.                                 hitsound.PlaybackSpeed = 3.2+(math.random(-1,4)/10)
  776.                                 hitsound:Play()
  777.                                 wait(hitsound.TimeLength)
  778.                                 hitsound.Parent = handle
  779.                             end)()
  780.                             if hitt.Parent:findFirstChildOfClass("Humanoid") then
  781.                                 hithumanoid = true
  782.                                 coroutine.wrap(function()
  783.                                     wait()
  784.                                     stabsound.Parent = knifeclone
  785.                                     stabsound.PlaybackSpeed = 1+(math.random(-1,4)/10)
  786.                                     stabsound:Play()
  787.                                     wait(stabsound.TimeLength)
  788.                                     stabsound.Parent = handle
  789.                                 end)()
  790.                                 funnyeffect(hitt.CFrame, hitt)
  791.                                 ragdollplr(hitt.Parent)
  792.                                 if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  793.                                     local dmg = math.random(50,100)
  794.                                     if hitt.Parent ~= nil then
  795.                                         if hitt.Parent:findFirstChildOfClass("Humanoid").Health <= dmg then
  796.                                             hitt.Parent:findFirstChildOfClass("Humanoid").Health = 0
  797.                                             ragdollkill(hitt.Parent)
  798.                                         else
  799.                                             hitt.Parent:findFirstChildOfClass("Humanoid").Health = hitt.Parent:findFirstChildOfClass("Humanoid").Health - dmg
  800.                                         end
  801.                                     end
  802.                                 end
  803.                             elseif hitt.Parent.ClassName == "Accessory" or hitt.Parent.ClassName == "Hat" then
  804.                                 if hitt.Parent.Parent:findFirstChildOfClass("Humanoid") then
  805.                                     hithumanoid = true
  806.                                     coroutine.wrap(function()
  807.                                         wait()
  808.                                         stabsound.Parent = knifeclone
  809.                                         stabsound.PlaybackSpeed = 1+(math.random(-1,4)/10)
  810.                                         stabsound:Play()
  811.                                         wait(stabsound.TimeLength)
  812.                                         stabsound.Parent = handle
  813.                                     end)()
  814.                                     funnyeffect(hitt.CFrame, hitt)
  815.                                     ragdollplr(hitt.Parent.Parent)
  816.                                     if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  817.                                         if hitt.Parent ~= nil then
  818.                                             local dmg = math.random(50,100)
  819.                                             if hitt.Parent.Parent:findFirstChildOfClass("Humanoid").Health <= dmg then
  820.                                                 hitt.Parent.Parent:findFirstChildOfClass("Humanoid").Health = 0
  821.                                                 ragdollkill(hitt.Parent.Parent)
  822.                                             else
  823.                                                 hitt.Parent.Parent:findFirstChildOfClass("Humanoid").Health = hitt.Parent.Parent:findFirstChildOfClass("Humanoid").Health - dmg
  824.                                             end
  825.                                         end
  826.                                     end
  827.                                 end
  828.                             end
  829.                             if not hithumanoid then
  830.                                 game.Debris:AddItem(knifeclone, 30)
  831.                             end
  832.                         --end
  833.                     elseif hitt1 then
  834.                         --if hitt1.Name ~= "ThrowKnife" then
  835.                             rayhit = true
  836.                             knifeclone.CFrame = CFrame.new(pos1)
  837.                             knifeclone.CFrame = CFrame.new(knifeclone.Position, lasttorsopos.p)
  838.                             knifeclone.CFrame = knifeclone.CFrame * CFrame.fromEulerAnglesXYZ(math.pi/1.5,math.pi,0)
  839.                             local weldknife = Instance.new("Weld", knifeclone)
  840.                             weldknife.C0 = hitt1.CFrame:toObjectSpace(knifeclone.CFrame)
  841.                             weldknife.Part0 = hitt1
  842.                             weldknife.Name = "ouch_weld"
  843.                             weldknife.Part1 = knifeclone
  844.                             knifeclone.Anchored = false
  845.                             local hithumanoid = false
  846.                             coroutine.wrap(function()
  847.                                 knifeclone.Parent = hitt1
  848.                                 wait()
  849.                                 hitsound.Parent = knifeclone
  850.                                 hitsound.PlaybackSpeed = 3.2+(math.random(-1,4)/10)
  851.                                 hitsound:Play()
  852.                                 wait(hitsound.TimeLength)
  853.                                 hitsound.Parent = handle
  854.                             end)()
  855.                             if hitt1.Parent:findFirstChildOfClass("Humanoid") then
  856.                                 hithumanoid = true
  857.                                 coroutine.wrap(function()
  858.                                     wait()
  859.                                     stabsound.Parent = knifeclone
  860.                                     stabsound.PlaybackSpeed = 1+(math.random(-1,4)/10)
  861.                                     stabsound:Play()
  862.                                     wait(stabsound.TimeLength)
  863.                                     stabsound.Parent = handle
  864.                                 end)()
  865.                                 funnyeffect(hitt1.CFrame, hitt1)
  866.                                 ragdollplr(hitt1.Parent)
  867.                                 if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  868.                                     if hitt1.Parent ~= nil then
  869.                                         local dmg = math.random(50,100)
  870.                                         if hitt1.Parent:findFirstChildOfClass("Humanoid").Health <= dmg then
  871.                                             hitt1.Parent:findFirstChildOfClass("Humanoid").Health = 0
  872.                                             ragdollkill(hitt1.Parent)
  873.                                         else
  874.                                             hitt1.Parent:findFirstChildOfClass("Humanoid").Health = hitt1.Parent:findFirstChildOfClass("Humanoid").Health - dmg
  875.                                         end
  876.                                     end
  877.                                 end
  878.                             elseif hitt1.Parent.ClassName == "Accessory" or hitt1.Parent.ClassName == "Hat" then
  879.                                 if hitt1.Parent.Parent:findFirstChildOfClass("Humanoid") then
  880.                                     hithumanoid = true
  881.                                     coroutine.wrap(function()
  882.                                         wait()
  883.                                         stabsound.Parent = knifeclone
  884.                                         stabsound.PlaybackSpeed = 1+(math.random(-1,4)/10)
  885.                                         stabsound:Play()
  886.                                         wait(stabsound.TimeLength)
  887.                                         stabsound.Parent = handle
  888.                                     end)()
  889.                                     funnyeffect(hitt1.CFrame, hitt1)
  890.                                     ragdollplr(hitt1.Parent.Parent)
  891.                                     if knifeeffect ~= "64bits32bits16bits8bits4bits2bits1BIT-efgrineegtntrnfenecceimdwmmoc" then
  892.                                         if hitt1.Parent ~= nil then
  893.                                             local dmg = math.random(50,100)
  894.                                             if hitt1.Parent.Parent:findFirstChildOfClass("Humanoid").Health <= dmg then
  895.                                                 hitt1.Parent.Parent:findFirstChildOfClass("Humanoid").Health = 0
  896.                                                 ragdollkill(hitt1.Parent.Parent)
  897.                                             else
  898.                                                 hitt1.Parent.Parent:findFirstChildOfClass("Humanoid").Health = hitt1.Parent.Parent:findFirstChildOfClass("Humanoid").Health - dmg
  899.                                             end
  900.                                         end
  901.                                     end
  902.                                 end
  903.                             end
  904.                             if not hithumanoid then
  905.                                 game.Debris:AddItem(knifeclone, 30)
  906.                             end
  907.                         --end
  908.                     end
  909.                     if not rayhit then
  910.                         gravitypower = gravitypower + 0.015
  911.                         knifeclone.CFrame = knifeclone.CFrame * CFrame.new(0,-gravitypower,-3)
  912.                         lastpos = knifeclone.CFrame
  913.                         knifeclone.CFrame = knifeclone.CFrame * CFrame.fromEulerAnglesXYZ(-math.rad(rotatevalue),0,0)
  914.                     end
  915.                 end
  916.             end)()
  917.             for i = 1,15 do
  918.                 headweld.C0 = headweld.C0:lerp(CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(0,-math.pi/3,0) * CFrame.new(0,0.5,0),0.2)
  919.                 tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0) * CFrame.fromEulerAnglesXYZ(-math.rad(30),0,0),0.2)
  920.                 rootweld.C0 = rootweld.C0:lerp(CFrame.fromEulerAnglesXYZ(-math.rad(10),math.pi/3,0), 0.2)
  921.                 leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(-40),0,0) * CFrame.new(0,-0.5,0), 0.2)
  922.                 rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.rad(10),0,0) * CFrame.new(0,-0.5,0), 0.2)
  923.                 step:wait()
  924.             end
  925.             handle.Transparency = 0
  926.             throwpos = nil
  927.             cananimate = true
  928.             canattack = true
  929.         end
  930.     end
  931. end)
  932. tool.Equipped:connect(function()
  933.     equipped = true
  934.     owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  935.     character = owner.Character
  936.     cananimate = true
  937.     local sine = 0
  938.     equipsound:Play()
  939.     tool.Grip = CFrame.new(0,-0.85,0)
  940.     if character:findFirstChild("KnifeBack") then
  941.         character:findFirstChild("KnifeBack").Transparency = 1
  942.     end
  943.     local rightarm = Instance.new("Weld", character.Torso)
  944.     rightarm.Part0 = character.Torso
  945.     rightarm.Part1 = character["Right Arm"]
  946.     rightarm.C0 = CFrame.new(1.5,0,0)
  947.     rightarm.Name = "RightArmWeldknif"
  948.     local leftarm = Instance.new("Weld", character.Torso)
  949.     leftarm.Part0 = character.Torso
  950.     leftarm.Part1 = character["Left Arm"]
  951.     leftarm.C0 = CFrame.new(-1.5,0,0)
  952.     leftarm.Name = "LeftArmWeldknif"
  953.     local head = Instance.new("Weld", character.Torso)
  954.     head.Part0 = character.Torso
  955.     head.Part1 = character.Head
  956.     head.C0 = CFrame.new(0,1.5,0)
  957.     head.Name = "HeadWeldknif"
  958.     local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
  959.     humanoidrootpart.Part0 = character.HumanoidRootPart
  960.     humanoidrootpart.Part1 = character.Torso
  961.     humanoidrootpart.Name = "HumanoidRootPartWeldknif"
  962.     coroutine.wrap(function()
  963.         while step:wait() do
  964.             if cananimate then
  965.                 sine = sine + 1
  966.                 head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1)
  967.                 if not spinning then
  968.                     tool.Grip = tool.Grip:lerp(CFrame.new(0,-0.85,0),0.1)
  969.                 end
  970.                 humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1)
  971.                 leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2.7 + math.rad(1.5*math.sin(sine/40)),math.pi/-3 + math.rad(1.5*-math.cos(sine/80)),0) * CFrame.new(0,-0.5,0),0.1)
  972.                 rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi/2.7 + math.rad(1.5*math.sin(sine/40)),math.pi/3 + math.rad(1.5*math.cos(sine/80)),0) * CFrame.new(0,-0.5,0),0.1)
  973.             end
  974.         end
  975.     end)()
  976. end)
  977. tool.Unequipped:connect(function()
  978.     equipped = false
  979.     cananimate = false
  980.     canthrow = false
  981.     unequipsound:Play()
  982.     if character.Torso:findFirstChild("LeftArmWeldknif") then
  983.         character.Torso:findFirstChild("LeftArmWeldknif"):destroy()
  984.     end
  985.     if character.Torso:findFirstChild("RightArmWeldknif") then
  986.         character.Torso:findFirstChild("RightArmWeldknif"):destroy()
  987.     end
  988.     if character.Torso:findFirstChild("HeadWeldknif") then
  989.         character.Torso:findFirstChild("HeadWeldknif"):destroy()
  990.     end
  991.     if character:findFirstChild("HumanoidRootPart") then
  992.         if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldknif") then
  993.             character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldknif"):destroy()
  994.         end
  995.     end
  996.     if not character:findFirstChild("KnifeBack") then
  997.         local clone = handle:Clone()
  998.         clone:BreakJoints()
  999.         for i,v in pairs(clone:GetDescendants()) do
  1000.             if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then
  1001.                 v:destroy()
  1002.             end
  1003.         end
  1004.         local weld = Instance.new("Weld", clone)
  1005.         weld.Part0 = character.Torso
  1006.         weld.Part1 = clone
  1007.         weld.C0 = CFrame.new(1,-1,0)
  1008.         weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi-(math.pi/3),0,0)
  1009.         clone.Parent = character
  1010.         clone.Name = "KnifeBack"
  1011.     else
  1012.         character:findFirstChild("KnifeBack").Transparency = 0
  1013.     end
  1014.     character.KnifeBack:findFirstChildOfClass("SpecialMesh").TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId
  1015. end)
  1016. function ragdollkill(character)
  1017.     local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  1018.     local checkragd = character:findFirstChild("ragded")
  1019.     if not checkragd then
  1020.         local boolvalue = Instance.new("BoolValue", character)
  1021.         boolvalue.Name = "ragded"
  1022.         if not character:findFirstChild("UpperTorso") then
  1023.             character.Archivable = true
  1024.             for i,v in pairs(character:GetChildren()) do
  1025.                 if v.ClassName == "Sound" then
  1026.                     v:remove()
  1027.                 end
  1028.                 for q,w in pairs(v:GetChildren()) do
  1029.                     if w.ClassName == "Sound" then
  1030.                         w:remove()
  1031.                     end
  1032.                 end
  1033.             end
  1034.             local ragdoll = character:Clone()
  1035.             for i,v in pairs(ragdoll:GetDescendants()) do
  1036.                 if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  1037.                     v:destroy()
  1038.                 end
  1039.             end
  1040.             ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  1041.             ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  1042.             if ragdoll:findFirstChild("Health") then
  1043.                 if ragdoll:findFirstChild("Health").ClassName == "Script" then
  1044.                     ragdoll:findFirstChild("Health").Disabled = true
  1045.                 end
  1046.             end
  1047.             for i,v in pairs(character:GetChildren()) do
  1048.                 if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  1049.                     v:destroy()
  1050.                 end
  1051.             end
  1052.             for i,v in pairs(character:GetChildren()) do
  1053.                 if v.ClassName == "Accessory" then
  1054.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  1055.                     if attachment1 then
  1056.                         for q,w in pairs(character:GetChildren()) do
  1057.                             if w.ClassName == "Part" then
  1058.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  1059.                                 if attachment2 then
  1060.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  1061.                                     hinge.Attachment0 = attachment1
  1062.                                     hinge.Attachment1 = attachment2
  1063.                                     hinge.LimitsEnabled = true
  1064.                                     hinge.LowerAngle = 0
  1065.                                     hinge.UpperAngle = 0
  1066.                                 end
  1067.                             end
  1068.                         end
  1069.                     end
  1070.                 end
  1071.             end
  1072.             ragdoll.Parent = workspace
  1073.             if ragdoll:findFirstChild("Right Arm") then
  1074.                 local glue = Instance.new("Glue", ragdoll.Torso)
  1075.                 glue.Part0 = ragdoll.Torso
  1076.                 glue.Part1 = ragdoll:findFirstChild("Right Arm")
  1077.                 glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1078.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  1079.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  1080.                 limbcollider.Size = Vector3.new(1.4,1,1)
  1081.                 limbcollider.Shape = "Cylinder"
  1082.                 limbcollider.Transparency = 1
  1083.                 limbcollider.Name = "LimbCollider"
  1084.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1085.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  1086.                 limbcolliderweld.Part1 = limbcollider
  1087.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1088.             end
  1089.             if ragdoll:findFirstChild("Left Arm") then
  1090.                 local glue = Instance.new("Glue", ragdoll.Torso)
  1091.                 glue.Part0 = ragdoll.Torso
  1092.                 glue.Part1 = ragdoll:findFirstChild("Left Arm")
  1093.                 glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1094.                 glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1095.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  1096.                 limbcollider.Size = Vector3.new(1.4,1,1)
  1097.                 limbcollider.Shape = "Cylinder"
  1098.                 limbcollider.Name = "LimbCollider"
  1099.                 limbcollider.Transparency = 1
  1100.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1101.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  1102.                 limbcolliderweld.Part1 = limbcollider
  1103.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1104.             end
  1105.             if ragdoll:findFirstChild("Left Leg") then
  1106.                 local glue = Instance.new("Glue", ragdoll.Torso)
  1107.                 glue.Part0 = ragdoll.Torso
  1108.                 glue.Part1 = ragdoll:findFirstChild("Left Leg")
  1109.                 glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1110.                 glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1111.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  1112.                 limbcollider.Size = Vector3.new(1.4,1,1)
  1113.                 limbcollider.Shape = "Cylinder"
  1114.                 limbcollider.Name = "LimbCollider"
  1115.                 limbcollider.Transparency = 1
  1116.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1117.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  1118.                 limbcolliderweld.Part1 = limbcollider
  1119.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1120.             end
  1121.             if ragdoll:findFirstChild("Right Leg") then
  1122.                 local glue = Instance.new("Glue", ragdoll.Torso)
  1123.                 glue.Part0 = ragdoll.Torso
  1124.                 glue.Part1 = ragdoll:findFirstChild("Right Leg")
  1125.                 glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1126.                 glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1127.                 local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  1128.                 limbcollider.Size = Vector3.new(1.4,1,1)
  1129.                 limbcollider.Shape = "Cylinder"
  1130.                 limbcollider.Name = "LimbCollider"
  1131.                 limbcollider.Transparency = 1
  1132.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1133.                 limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  1134.                 limbcolliderweld.Part1 = limbcollider
  1135.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  1136.             end
  1137.             if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  1138.                 local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  1139.                 HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  1140.                 local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  1141.                 connection.LimitsEnabled = true
  1142.                 connection.Attachment0 = ragdoll.Torso.NeckAttachment
  1143.                 connection.Attachment1 = HeadAttachment
  1144.                 connection.UpperAngle = 60
  1145.                 connection.LowerAngle = -60
  1146.             elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  1147.                 local hedweld = Instance.new("Weld", ragdoll.Torso)
  1148.                 hedweld.Part0 = ragdoll.Torso
  1149.                 hedweld.Part1 = ragdoll.Head
  1150.                 hedweld.C0 = CFrame.new(0,1.5,0)
  1151.             end
  1152.             game.Debris:AddItem(ragdoll, 30)
  1153.             local function aaaalol()
  1154.                 wait(0.2)
  1155.                 local function searchforvelocity(wot)
  1156.                     for i,v in pairs(wot:GetChildren()) do
  1157.                         searchforvelocity(v)
  1158.                         if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  1159.                             v:destroy()
  1160.                         end
  1161.                     end
  1162.                 end
  1163.                 searchforvelocity(ragdoll)
  1164.                 wait(0.5)
  1165.                 if ragdoll:findFirstChildOfClass("Humanoid") then
  1166.                     ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  1167.                 end
  1168.                 if ragdoll:findFirstChild("HumanoidRootPart") then
  1169.                     ragdoll:findFirstChild("HumanoidRootPart"):destroy()
  1170.                 end
  1171.             end
  1172.             spawn(aaaalol)
  1173.         elseif character:findFirstChild("UpperTorso") then
  1174.             character.Archivable = true
  1175.             for i,v in pairs(character:GetChildren()) do
  1176.                 if v.ClassName == "Sound" then
  1177.                     v:remove()
  1178.                 end
  1179.                 for q,w in pairs(v:GetChildren()) do
  1180.                     if w.ClassName == "Sound" then
  1181.                         w:remove()
  1182.                     end
  1183.                 end
  1184.             end
  1185.             local ragdoll = character:Clone()
  1186.             ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  1187.             for i,v in pairs(ragdoll:GetDescendants()) do
  1188.                 if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  1189.                     v:destroy()
  1190.                 end
  1191.             end
  1192.             ragdoll:BreakJoints()
  1193.             ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  1194.             if ragdoll:findFirstChild("Health") then
  1195.                 if ragdoll:findFirstChild("Health").ClassName == "Script" then
  1196.                     ragdoll:findFirstChild("Health").Disabled = true
  1197.                 end
  1198.             end
  1199.             for i,v in pairs(character:GetChildren()) do
  1200.                 if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  1201.                     v:destroy()
  1202.                 end
  1203.             end
  1204.             for i,v in pairs(character:GetChildren()) do
  1205.                 if v.ClassName == "Accessory" then
  1206.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  1207.                     if attachment1 then
  1208.                         for q,w in pairs(character:GetChildren()) do
  1209.                             if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  1210.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  1211.                                 if attachment2 then
  1212.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  1213.                                     hinge.Attachment0 = attachment1
  1214.                                     hinge.Attachment1 = attachment2
  1215.                                     hinge.LimitsEnabled = true
  1216.                                     hinge.LowerAngle = 0
  1217.                                     hinge.UpperAngle = 0
  1218.                                 end
  1219.                             end
  1220.                         end
  1221.                     end
  1222.                 end
  1223.             end
  1224.             ragdoll.Parent = workspace
  1225.             local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  1226.             Humanoid.PlatformStand = true
  1227.             local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  1228.                 local connection = Instance.new('BallSocketConstraint', limb)
  1229.                 connection.LimitsEnabled = true
  1230.                 connection.Attachment0 = attachementone
  1231.                 connection.Attachment1 = attachmenttwo
  1232.                 connection.TwistLimitsEnabled = true
  1233.                 connection.TwistLowerAngle = twistlower
  1234.                 connection.TwistUpperAngle = twistupper
  1235.                 local limbcollider = Instance.new("Part", limb)
  1236.                 limbcollider.Size = Vector3.new(0.1,1,1)
  1237.                 limbcollider.Shape = "Cylinder"
  1238.                 limbcollider.Transparency = 1
  1239.                 limbcollider:BreakJoints()
  1240.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1241.                 limbcolliderweld.Part0 = limb
  1242.                 limbcolliderweld.Part1 = limbcollider
  1243.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  1244.             end
  1245.             local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  1246.                 local connection = Instance.new('HingeConstraint', limb)
  1247.                 connection.LimitsEnabled = true
  1248.                 connection.Attachment0 = attachementone
  1249.                 connection.Attachment1 = attachmenttwo
  1250.                 connection.LimitsEnabled = true
  1251.                 connection.LowerAngle = lower
  1252.                 connection.UpperAngle = upper
  1253.                 local limbcollider = Instance.new("Part", limb)
  1254.                 limbcollider.Size = Vector3.new(0.1,1,1)
  1255.                 limbcollider.Shape = "Cylinder"
  1256.                 limbcollider.Transparency = 1
  1257.                 limbcollider:BreakJoints()
  1258.                 local limbcolliderweld = Instance.new("Weld", limbcollider)
  1259.                 limbcolliderweld.Part0 = limb
  1260.                 limbcolliderweld.Part1 = limbcollider
  1261.                 limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  1262.             end
  1263.             local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  1264.             HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  1265.             if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
  1266.                 makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  1267.             end
  1268.             makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  1269.             makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  1270.             makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  1271.             makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  1272.             --
  1273.             makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  1274.             makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  1275.             makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  1276.             --
  1277.             makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  1278.             makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  1279.             makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  1280.             --
  1281.             makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  1282.             makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  1283.             makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  1284.             for i,v in pairs(Humanoid.Parent:GetChildren()) do
  1285.                 if v.ClassName == "Accessory" then
  1286.                     local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  1287.                     if attachment1 then
  1288.                         for q,w in pairs(Humanoid.Parent:GetChildren()) do
  1289.                             if w.ClassName == "Part" then
  1290.                                 local attachment2 = w:findFirstChild(attachment1.Name)
  1291.                                 if attachment2 then
  1292.                                     local hinge = Instance.new("HingeConstraint", v.Handle)
  1293.                                     hinge.Attachment0 = attachment1
  1294.                                     hinge.Attachment1 = attachment2
  1295.                                     hinge.LimitsEnabled = true
  1296.                                     hinge.LowerAngle = 0
  1297.                                     hinge.UpperAngle = 0
  1298.                                 end
  1299.                             end
  1300.                         end
  1301.                     end
  1302.                 end
  1303.             end
  1304.             for i,v in pairs(ragdoll:GetChildren()) do
  1305.                 for q,w in pairs(v:GetChildren()) do
  1306.                     if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
  1307.                         w:destroy()
  1308.                     end
  1309.                 end
  1310.             end
  1311.             if ragdoll:findFirstChild("HumanoidRootPart") then
  1312.                 ragdoll.HumanoidRootPart:destroy()
  1313.             end
  1314.             if ragdoll:findFirstChildOfClass("Humanoid") then
  1315.                 ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  1316.             end
  1317.             local function waitfordatmoment()
  1318.                 wait(0.2)
  1319.                 local function searchforvelocity(wot)
  1320.                     for i,v in pairs(wot:GetChildren()) do
  1321.                         searchforvelocity(v)
  1322.                         if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  1323.                             v:destroy()
  1324.                         end
  1325.                     end
  1326.                 end
  1327.                 searchforvelocity(ragdoll)
  1328.             end
  1329.             spawn(waitfordatmoment)
  1330.             game.Debris:AddItem(ragdoll, 30)
  1331.         end
  1332.     end
  1333. end
  1334. end)()
  1335. RemoteEvent13.Name = "knifeevent"
  1336. RemoteEvent13.Parent = Tool0
  1337. NLS([[
  1338. --By Rufus14
  1339. owner = game:GetService("Players").LocalPlayer
  1340. character = owner.Character
  1341. tool = script.Parent
  1342. event = tool:WaitForChild("knifeevent")
  1343. mouse = owner:GetMouse()
  1344. equipped = false
  1345. tool.Equipped:connect(function()
  1346.     owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  1347.     character = owner.Character
  1348.     equipped = true
  1349. end)
  1350. tool.Unequipped:connect(function()
  1351.     equipped = false
  1352. end)
  1353. mouse.KeyDown:connect(function(key)
  1354.     key = key:lower()
  1355.     if key == "e" and equipped then
  1356.         event:FireServer("skin")
  1357.     end
  1358. end)
  1359. mouse.Button1Up:connect(function()
  1360.     event:FireServer("throw", mouse.Hit)
  1361. end)
  1362. ]], Tool0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement