Advertisement
num6456

Untitled

Apr 20th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.58 KB | None | 0 0
  1. -- by Theamazingnater
  2. plr = game.Players.LocalPlayer
  3. char = plr.Character
  4.  
  5. -- Sword
  6. local human2 = Instance.new("Weld",char.HumanoidRootPart)
  7. human2.Part0 = char["HumanoidRootPart"]
  8. human2.Part1 = char.Torso
  9. local sword = Instance.new("Part",char)
  10. sword.Size = Vector3.new(1, 0.8, 4)
  11. sword.CanCollide = false
  12. local mesh = Instance.new("FileMesh",sword)
  13. mesh.MeshId = "rbxasset://fonts/10470609"
  14. mesh.TextureId = "rbxasset://textures/10470609"
  15. local weld = Instance.new("Weld",sword)
  16. weld.Part0 = sword
  17. weld.Part1 = char["Right Arm"]
  18. weld.C0 = CFrame.new(1, 0, -1.5, 0, 0.999999762, 0, 1, 0, 0, 0, 0, -1)
  19. local weld2 = Instance.new("Weld",char)
  20. weld2.Part0 = char.Torso
  21. weld2.Part1 = char["Right Arm"]
  22. weld2.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  23. for i = 0,1 ,0.03 do
  24. weld2.C0 = weld2.C0:lerp(CFrame.new(1.5, 0.515185118, -0.503331184, 1, 0, 0, 0, 0.00918695424, -0.999952853, 0, 0.99995786, 0.00918699894),i)
  25. game:GetService("RunService").RenderStepped:wait()
  26. end
  27. using = false
  28. local slash = Instance.new("Sound",sword)
  29. slash.SoundId = "rbxasset://sounds/1542642349/"
  30. slash.Volume = 4
  31. mouse = plr:GetMouse()
  32. function Ragdoll(dude)
  33. local humanoid = dude:FindFirstChildOfClass("Humanoid")
  34. dude:BreakJoints()
  35. local isr15 = dude:findFirstChild("UpperTorso")
  36. if isr15 then
  37. if humanoid.Parent:findFirstChild("HumanoidRootPart") then
  38. humanoid.Parent.HumanoidRootPart.CanCollide = false
  39. end
  40. local function makeballlimb(attachone, attachtwo, upperang, lowang, twist)
  41. local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
  42. constraint.Attachment0 = attachone
  43. constraint.Attachment1 = attachtwo
  44. constraint.LimitsEnabled = true
  45. constraint.TwistLimitsEnabled = true
  46. constraint.TwistLowerAngle = lowang
  47. constraint.TwistUpperAngle = upperang
  48. constraint.UpperAngle = twist
  49. end
  50. local function makehingelimb(attachone, attachtwo, upperang, lowang)
  51. local constraint = Instance.new("HingeConstraint", humanoid.Parent)
  52. constraint.Attachment0 = attachone
  53. constraint.Attachment1 = attachtwo
  54. constraint.LimitsEnabled = true
  55. constraint.LowerAngle = lowang
  56. constraint.UpperAngle = upperang
  57. end
  58. for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player
  59. if v.ClassName == "Accessory" then
  60. local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
  61. if findhandle then
  62. local attach = findhandle:findFirstChildOfClass("Attachment")
  63. for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player
  64. if w.Name == "UpperTorso" or w.Name == "Head" then
  65. attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
  66. end
  67. end
  68. if attach and attach1 then
  69. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  70. constraint.Attachment0 = attach
  71. constraint.Attachment1 = attach1
  72. constraint.LimitsEnabled = true
  73. constraint.LowerAngle = 0
  74. constraint.UpperAngle = 0
  75. end
  76. end
  77. end
  78. end
  79. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
  80. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  81. attachment.Position = Vector3.new(0, -0.5, 0)
  82. attachment.Name = "lol"
  83. attachment.Visible = false
  84. humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
  85. humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
  86. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  87. ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
  88. ball.Attachment1 = attachment
  89. ball.LimitsEnabled = true
  90. ball.TwistLimitsEnabled = true
  91. ball.UpperAngle = 40
  92. ball.Restitution = 0.5
  93. ball.TwistUpperAngle = 40
  94. ball.TwistLowerAngle = -40
  95. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
  96. collidepartofleftleg.Name = "Bone"
  97. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  98. collidepartofleftleg.Transparency = 1
  99. collidepartofleftleg:BreakJoints()
  100. local weeld = Instance.new("Weld", collidepartofleftleg)
  101. weeld.Part0 = collidepartofleftleg
  102. weeld.Part1 = humanoid.Parent["Head"]
  103. if humanoid.Parent.Head:findFirstChild("Neck") then
  104. humanoid.Parent.Head.Neck:destroy()
  105. end
  106. if humanoid.Parent.Head:findFirstChild("face") then
  107. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=459924806"
  108. end
  109. end
  110. local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
  111. local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
  112. --
  113. local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
  114. local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
  115. --
  116. local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
  117. local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
  118. --
  119. local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
  120. local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
  121. --Foot & Hands--
  122.  
  123. local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
  124. local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
  125. --
  126. local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
  127. local RightHand = humanoid.Parent:findFirstChild("RightHand")
  128.  
  129. --END--
  130. --TORSOS--
  131.  
  132. local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
  133. local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
  134.  
  135. --END--
  136. if LowerTorso then
  137. if LeftUpperLeg then
  138. makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
  139. end
  140. if RightUpperLeg then
  141. makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
  142. end
  143. if LeftLowerLeg then
  144. makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
  145. end
  146. if RightLowerLeg then
  147. makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
  148. end
  149. if LeftFoot then
  150. makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
  151. end
  152. if RightFoot then
  153. makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
  154. end
  155. if UpperTorso then
  156. makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
  157. end
  158. end
  159. if UpperTorso then
  160. local hitsound = Instance.new("Sound", UpperTorso)
  161. hitsound.SoundId = "http://www.roblox.com/asset/?id=93706376"
  162. hitsound:Play()
  163. hitsound.Volume = math.random(5,10)
  164. local canhit = true
  165. local hitval = 15
  166. local uptor = humanoid.Parent.UpperTorso
  167. if RightUpperArm then
  168. makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
  169. end
  170. if RightLowerArm then
  171. makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
  172. end
  173. if RightHand then
  174. makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
  175. end
  176. if LeftUpperArm then
  177. makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
  178. end
  179. if LeftLowerArm then
  180. makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
  181. end
  182. if LeftHand then
  183. makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
  184. end
  185. end
  186. elseif dude:findFirstChild("Torso") then
  187. canspin = false
  188. if humanoid.Parent:findFirstChild("Health") then
  189. humanoid.Parent.Health:Remove()
  190. end
  191. humanoid.WalkSpeed = 0
  192. humanoid.JumpPower = 0
  193. humanoid.PlatformStand = true
  194. for z,x in pairs(humanoid.Parent:GetChildren()) do
  195. if x.ClassName == "Accessory" then
  196. local handle = x:findFirstChild("Handle")
  197. if handle then
  198. local attachment = handle:findFirstChildOfClass("Attachment")
  199. if attachment then
  200. for q,w in pairs(humanoid.Parent:GetChildren()) do
  201. if w.Name == "Torso" or w.Name == "Head" then
  202. local anotherone = w:findFirstChild(attachment.Name)
  203. if attachment and anotherone then
  204. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  205. constraint.Attachment0 = attachment
  206. constraint.Attachment1 = anotherone
  207. constraint.LimitsEnabled = true
  208. constraint.LowerAngle = 0
  209. constraint.UpperAngle = 0
  210. end
  211. end
  212. end
  213. end
  214. end
  215. end
  216. end
  217. if humanoid.Parent:findFirstChild("Right Arm") and humanoid.Parent:findFirstChild("Torso") then
  218. local attachment = Instance.new("Attachment", humanoid.Parent.Torso)
  219. attachment.Position = Vector3.new(1, 1, 0)
  220. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  221. ball.Attachment0 = humanoid.Parent["Right Arm"].RightShoulderAttachment
  222. ball.Attachment1 = attachment
  223. collidepartofleftleg = Instance.new("Part", humanoid.Parent.Torso)
  224. collidepartofleftleg.Name = "Bone"
  225. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  226. collidepartofleftleg.Transparency = 1
  227. collidepartofleftleg:BreakJoints()
  228. local weeld = Instance.new("Weld", collidepartofleftleg)
  229. weeld.Part0 = humanoid.Parent["Right Arm"]
  230. weeld.Part1 = collidepartofleftleg
  231. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  232. end
  233. if humanoid.Parent:findFirstChild("Left Arm") and humanoid.Parent:findFirstChild("Torso") then
  234. local attachment = Instance.new("Attachment", humanoid.Parent.Torso)
  235. attachment.Position = Vector3.new(-1, 1, 0)
  236. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  237. ball.Attachment0 = attachment
  238. ball.Attachment1 = humanoid.Parent["Left Arm"].LeftShoulderAttachment
  239. collidepartofleftleg = Instance.new("Part", humanoid.Parent.Torso)
  240. collidepartofleftleg.Name = "Bone"
  241. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  242. collidepartofleftleg.Transparency = 1
  243. collidepartofleftleg:BreakJoints()
  244. local weeld = Instance.new("Weld", collidepartofleftleg)
  245. weeld.Part0 = humanoid.Parent["Left Arm"]
  246. weeld.Part1 = collidepartofleftleg
  247. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  248. end
  249. if humanoid.Parent:findFirstChild("Right Leg") and humanoid.Parent:findFirstChild("Torso") then
  250. local attachment = Instance.new("Attachment", humanoid.Parent.Torso)
  251. attachment.Position = Vector3.new(0.5, -1, 0)
  252. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  253. ball.Attachment0 = humanoid.Parent["Right Leg"].RightFootAttachment
  254. ball.Attachment1 = attachment
  255. humanoid.Parent["Right Leg"].RightFootAttachment.Position = Vector3.new(0, 1, 0)
  256. collidepartofleftleg = Instance.new("Part", humanoid.Parent.Torso)
  257. collidepartofleftleg.Name = "Bone"
  258. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  259. collidepartofleftleg.Transparency = 1
  260. collidepartofleftleg:BreakJoints()
  261. local weeld = Instance.new("Weld", collidepartofleftleg)
  262. weeld.Part0 = humanoid.Parent["Right Leg"]
  263. weeld.Part1 = collidepartofleftleg
  264. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  265. end
  266. if humanoid.Parent:findFirstChild("Left Leg") and humanoid.Parent:findFirstChild("Torso") then
  267. local attachment = Instance.new("Attachment", humanoid.Parent.Torso)
  268. attachment.Position = Vector3.new(-0.5, -1, 0)
  269. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  270. ball.Attachment0 = humanoid.Parent["Left Leg"].LeftFootAttachment
  271. ball.Attachment1 = attachment
  272. humanoid.Parent["Left Leg"].LeftFootAttachment.Position = Vector3.new(0, 1, 0)
  273. collidepartofleftleg = Instance.new("Part", humanoid.Parent.Torso)
  274. collidepartofleftleg.Name = "Bone"
  275. collidepartofleftleg.Size = Vector3.new(0.8,1.4,0.8)
  276. collidepartofleftleg.Transparency = 1
  277. collidepartofleftleg:BreakJoints()
  278. local weeld = Instance.new("Weld", collidepartofleftleg)
  279. weeld.Part0 = humanoid.Parent["Left Leg"]
  280. weeld.Part1 = collidepartofleftleg
  281. weeld.C0 = weeld.C0 * CFrame.new(0,-0.3,0)
  282. end
  283. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("Torso") then
  284. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  285. attachment.Position = Vector3.new(0, -0.5, 0)
  286. attachment.Name = "lol"
  287. attachment.Visible = false
  288. humanoid.Parent.Torso.NeckAttachment.Visible = false
  289. humanoid.Parent.Torso.NeckAttachment.Position = humanoid.Parent.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  290. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  291. ball.Attachment0 = humanoid.Parent.Torso.NeckAttachment
  292. ball.Attachment1 = attachment
  293. ball.LimitsEnabled = true
  294. ball.TwistLimitsEnabled = true
  295. ball.UpperAngle = 90
  296. ball.Restitution = 0.5
  297. ball.TwistUpperAngle = 90
  298. ball.TwistLowerAngle = -90
  299. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.Torso)
  300. collidepartofleftleg.Name = "Bone"
  301. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  302. collidepartofleftleg.Transparency = 1
  303. collidepartofleftleg:BreakJoints()
  304. local weeld = Instance.new("Weld", collidepartofleftleg)
  305. weeld.Part0 = collidepartofleftleg
  306. weeld.Part1 = humanoid.Parent["Head"]
  307. if humanoid.Parent.Torso:findFirstChild("Neck") then
  308. humanoid.Parent.Torso.Neck:destroy()
  309. end
  310. if humanoid.Parent.Head:findFirstChild("face") then
  311. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  312. end
  313. local hitsound = Instance.new("Sound", humanoid.Parent.Head)
  314. hitsound.SoundId = "http://www.roblox.com/asset/?id=93706376"
  315. hitsound:Play()
  316. hitsound.Volume = math.random(5,10)
  317. end
  318. if humanoid.Parent:findFirstChild("Head") then
  319. local aah = Instance.new("Sound", humanoid.Parent.Head)
  320. if aah then
  321. aah.Volume = 8
  322. local aahmath = math.random(2,8)
  323. if aahmath == 2 then
  324. aah.SoundId = "rbxassetid://884348443"
  325. aah:Play()
  326. end
  327. if aahmath == 3 then
  328. aah.SoundId = "rbxassetid://681582832"
  329. aah.Volume = 10
  330. aah:Play()
  331. end
  332. if aahmath == 4 then
  333. aah.SoundId = "rbxassetid://1080363252"
  334. aah:Play()
  335. end
  336. if aahmath == 5 then
  337. aah.SoundId = "rbxassetid://150245085"
  338. aah:Play()
  339. end
  340. if aahmath == 6 then
  341. aah.SoundId = "rbxassetid://345287845"
  342. aah.TimePosition = 2.5
  343. aah:Play()
  344. end
  345. if aahmath == 7 then
  346. aah.SoundId = "rbxassetid://147758746"
  347. aah.TimePosition = 1.3
  348. aah:Play()
  349. end
  350. if aahmath == 8 then
  351. aah.SoundId = "rbxassetid://131314452"
  352. aah:Play()
  353. end
  354. end
  355. end
  356. end
  357. end
  358. function Slash()
  359. if not using then
  360. using = true
  361. for i = 0,1 ,0.05 do
  362. weld2.C0 = weld2.C0:lerp(CFrame.new(1.11415493, 0.306964874, -0.55814743, 0.726371348, 0.0421499684, 0.686008811, 0.682991326, 0.0673519522, -0.727314591, -0.0768603459, 0.996838272, 0.0201344695),i)
  363. human2.C0 = human2.C0:lerp(CFrame.new(0, 2.38418579e-07, 0, 0.685707927, 0, 0.727876961, 0, 1, 0, -0.727876961, 0, 0.685707927),i)
  364. game:GetService("RunService").RenderStepped:wait()
  365. end
  366. wait(1)
  367. slash:Play()
  368. local hit = Instance.new("Part",sword)
  369. hit.Size = Vector3.new(0.46, 0.8, 2.02)
  370. hit.Transparency = 1
  371. local weld3 = Instance.new("Weld",hit)
  372. weld3.Part0 = hit
  373. weld3.Part1 = sword
  374. weld3.C0 = CFrame.new(-0.0100011826, 9.53674316e-07, -1.24000645, 0.999999106, 0, 0, 0, 1, 0, 0, 0, 1.00000012)
  375. hit.Touched:connect(function(part)
  376. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  377. if human then
  378. Ragdoll(human.Parent)
  379. human.Health = 0
  380. end
  381. end)
  382. for i = 0,1 ,0.05 do
  383. weld2.C0 = weld2.C0:lerp(CFrame.new(1.41310668, -0.12503624, 0.230521202, 0.644262314, -0.558189869, -0.522828877, 0.287161112, 0.810144842, -0.511080801, 0.708847344, 0.179133952, 0.682236373),i)
  384. human2.C0 = human2.C0:lerp(CFrame.new(0, 2.38418579e-07, 0, 0.685707927, 0, 0.727876961, 0, 1, 0, -0.727876961, 0, 0.685707927):inverse(),i)
  385. game:GetService("RunService").RenderStepped:wait()
  386. end
  387. hit:Destroy()
  388. using = false
  389. for i = 0,1 ,0.03 do
  390. weld2.C0 = weld2.C0:lerp(CFrame.new(1.5, 0.515185118, -0.503331184, 1, 0, 0, 0, 0.00918695424, -0.999952853, 0, 0.99995786, 0.00918699894),i)
  391. human2.C0 = human2.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  392. game:GetService("RunService").RenderStepped:wait()
  393. end
  394. end
  395. end
  396. mouse.Button1Down:connect(Slash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement