Advertisement
beginner0929

knife test

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