Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.54 KB | None | 0 0
  1. --By Rufus14
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. Tool0 = Instance.new("Tool")
  4. Part2 = Instance.new("Part")
  5. Sound3 = Instance.new("Sound")
  6. Sound4 = Instance.new("Sound")
  7. Sound5 = Instance.new("Sound")
  8. Trail6 = Instance.new("Trail")
  9. SpecialMesh7 = Instance.new("SpecialMesh")
  10. Sound8 = Instance.new("Sound")
  11. Sound9 = Instance.new("Sound")
  12. Weld10 = Instance.new("Weld")
  13. Sound11 = Instance.new("Sound")
  14. Tool0.Name = "Baseball Bat"
  15. Tool0.Grip = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  16. Tool0.GripForward = Vector3.new(-1, -0, -0)
  17. Tool0.GripPos = Vector3.new(0, 0, -1.70000005)
  18. Tool0.GripRight = Vector3.new(0, 1, 0)
  19. Tool0.GripUp = Vector3.new(0, 0, 1)
  20. Part2.Name = "Handle"
  21. Part2.Parent = Tool0
  22. Part2.CFrame = CFrame.new(17.4002209, 0.400134265, -10.5, 0.999999762, 0.000669842586, 5.96046235e-08, -0.000669842644, 0.99999994, -5.45696752e-11, 2.98023224e-08, -5.0977722e-11, 1)
  23. Part2.Orientation = Vector3.new(0, 0, -0.0399999991)
  24. Part2.Position = Vector3.new(17.4002209, 0.400134265, -10.5)
  25. Part2.Rotation = Vector3.new(0, 0, -0.0399999991)
  26. Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  27. Part2.Size = Vector3.new(0.400000036, 0.400000036, 4.20000076)
  28. Part2.BottomSurface = Enum.SurfaceType.Smooth
  29. Part2.BrickColor = BrickColor.new("Dark stone grey")
  30. Part2.Reflectance = 0.40000000596046
  31. Part2.TopSurface = Enum.SurfaceType.Smooth
  32. Part2.brickColor = BrickColor.new("Dark stone grey")
  33. Sound3.Name = "Swoosh"
  34. Sound3.Parent = Part2
  35. Sound3.SoundId = "rbxassetid://2695931696"
  36. Sound3.Volume = 0.69999998807907
  37. Sound4.Name = "Equip"
  38. Sound4.Parent = Part2
  39. Sound4.SoundId = "rbxassetid://769464514"
  40. Sound4.Volume = 1
  41. Sound5.Name = "Hit"
  42. Sound5.Parent = Part2
  43. Sound5.SoundId = "rbxassetid://175024455"
  44. Sound5.Volume = 1
  45. Trail6.Parent = Part2
  46. Trail6.Attachment0 = nil
  47. Trail6.Attachment1 = nil
  48. Trail6.LightInfluence = 1
  49. Trail6.Transparency = NumberSequence.new(0.80000001192093,0.80000001192093)
  50. Trail6.Lifetime = 0.10000000149012
  51. SpecialMesh7.Parent = Part2
  52. SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=54983181 "
  53. SpecialMesh7.Scale = Vector3.new(3, 3, 1.5)
  54. SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=54983107"
  55. SpecialMesh7.MeshType = Enum.MeshType.FileMesh
  56. Sound8.Name = "Ouch"
  57. Sound8.Parent = Part2
  58. Sound8.SoundId = "rbxassetid://2695931696"
  59. Sound9.Name = "Hit2"
  60. Sound9.Parent = Part2
  61. Sound9.SoundId = "rbxassetid://2695931696"
  62. Weld10.Parent = Part2
  63. Weld10.C0 = CFrame.new(-0.168119431, 0.0499998927, 1.00468445, 0.999048233, -2.04658136e-07, -0.0436189696, 2.05005165e-07, 1.00000012, 6.81211798e-09, 0.043619059, -1.5812061e-08, 0.999048233)
  64. Weld10.Part0 = Part2
  65. Sound11.Name = "Ouch2"
  66. Sound11.Parent = Part2
  67. Sound11.SoundId = "rbxassetid://2695931696"
  68. Tool0.Parent = owner.Character
  69. coroutine.wrap(function()
  70. --By Rufus14
  71. canattack = true
  72. cananimate = false
  73. equipped = false
  74. tool = Tool0
  75. handle = tool.Handle
  76. equipsound = handle.Equip
  77. swishsound = handle.Swoosh
  78. hitsound = handle.Hit
  79. goresound = handle.Ouch
  80. hitsound2 = handle.Hit2
  81. goresound2 = handle.Ouch2
  82. owner = nil
  83. character = nil
  84. mouseclick = false
  85. attacknumber = 1
  86. attacktype = 0
  87. count = 0
  88. trail = handle.Trail
  89. runservice = game:GetService("RunService")
  90. --
  91. tool.Activated:connect(function()
  92. mouseclick = true
  93. end)
  94. tool.Deactivated:connect(function()
  95. mouseclick = false
  96. end)
  97. --
  98. function ragdollkill(character)
  99. local victimshumanoid = character:findFirstChildOfClass("Humanoid")
  100. local checkragd = character:findFirstChild("ragded")
  101. if not checkragd then
  102. local boolvalue = Instance.new("BoolValue", character)
  103. boolvalue.Name = "ragded"
  104. if not character:findFirstChild("UpperTorso") then
  105. character.Archivable = true
  106. for i,v in pairs(character:GetChildren()) do
  107. if v.ClassName == "Sound" then
  108. v:remove()
  109. end
  110. for q,w in pairs(v:GetChildren()) do
  111. if w.ClassName == "Sound" then
  112. w:remove()
  113. end
  114. end
  115. end
  116. local ragdoll = character:Clone()
  117. for i,v in pairs(ragdoll:GetDescendants()) do
  118. if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  119. v:destroy()
  120. end
  121. end
  122. ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  123. ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  124. if ragdoll:findFirstChild("Health") then
  125. if ragdoll:findFirstChild("Health").ClassName == "Script" then
  126. ragdoll:findFirstChild("Health").Disabled = true
  127. end
  128. end
  129. for i,v in pairs(character:GetChildren()) do
  130. if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" then
  131. v:destroy()
  132. end
  133. end
  134. for i,v in pairs(character:GetChildren()) do
  135. if v.ClassName == "Accessory" then
  136. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  137. if attachment1 then
  138. for q,w in pairs(character:GetChildren()) do
  139. if w.ClassName == "Part" then
  140. local attachment2 = w:findFirstChild(attachment1.Name)
  141. if attachment2 then
  142. local hinge = Instance.new("HingeConstraint", v.Handle)
  143. hinge.Attachment0 = attachment1
  144. hinge.Attachment1 = attachment2
  145. hinge.LimitsEnabled = true
  146. hinge.LowerAngle = 0
  147. hinge.UpperAngle = 0
  148. end
  149. end
  150. end
  151. end
  152. end
  153. end
  154. ragdoll.Parent = workspace
  155. if ragdoll:findFirstChild("Right Arm") then
  156. local glue = Instance.new("Glue", ragdoll.Torso)
  157. glue.Part0 = ragdoll.Torso
  158. glue.Part1 = ragdoll:findFirstChild("Right Arm")
  159. glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  160. glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  161. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
  162. limbcollider.Size = Vector3.new(1.4,1,1)
  163. limbcollider.Shape = "Cylinder"
  164. limbcollider.Transparency = 1
  165. limbcollider.Name = "LimbCollider"
  166. local limbcolliderweld = Instance.new("Weld", limbcollider)
  167. limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
  168. limbcolliderweld.Part1 = limbcollider
  169. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  170. end
  171. if ragdoll:findFirstChild("Left Arm") then
  172. local glue = Instance.new("Glue", ragdoll.Torso)
  173. glue.Part0 = ragdoll.Torso
  174. glue.Part1 = ragdoll:findFirstChild("Left Arm")
  175. glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  176. glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  177. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  178. limbcollider.Size = Vector3.new(1.4,1,1)
  179. limbcollider.Shape = "Cylinder"
  180. limbcollider.Name = "LimbCollider"
  181. limbcollider.Transparency = 1
  182. local limbcolliderweld = Instance.new("Weld", limbcollider)
  183. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  184. limbcolliderweld.Part1 = limbcollider
  185. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  186. end
  187. if ragdoll:findFirstChild("Left Leg") then
  188. local glue = Instance.new("Glue", ragdoll.Torso)
  189. glue.Part0 = ragdoll.Torso
  190. glue.Part1 = ragdoll:findFirstChild("Left Leg")
  191. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  192. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  193. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  194. limbcollider.Size = Vector3.new(1.4,1,1)
  195. limbcollider.Shape = "Cylinder"
  196. limbcollider.Name = "LimbCollider"
  197. limbcollider.Transparency = 1
  198. local limbcolliderweld = Instance.new("Weld", limbcollider)
  199. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  200. limbcolliderweld.Part1 = limbcollider
  201. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  202. end
  203. if ragdoll:findFirstChild("Right Leg") then
  204. local glue = Instance.new("Glue", ragdoll.Torso)
  205. glue.Part0 = ragdoll.Torso
  206. glue.Part1 = ragdoll:findFirstChild("Right Leg")
  207. glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  208. glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  209. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  210. limbcollider.Size = Vector3.new(1.4,1,1)
  211. limbcollider.Shape = "Cylinder"
  212. limbcollider.Name = "LimbCollider"
  213. limbcollider.Transparency = 1
  214. local limbcolliderweld = Instance.new("Weld", limbcollider)
  215. limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  216. limbcolliderweld.Part1 = limbcollider
  217. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  218. end
  219. if ragdoll:findFirstChild("Head") and ragdoll.Torso:findFirstChild("NeckAttachment") then
  220. local HeadAttachment = Instance.new("Attachment", ragdoll["Head"])
  221. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  222. local connection = Instance.new('HingeConstraint', ragdoll["Head"])
  223. connection.LimitsEnabled = true
  224. connection.Attachment0 = ragdoll.Torso.NeckAttachment
  225. connection.Attachment1 = HeadAttachment
  226. connection.UpperAngle = 60
  227. connection.LowerAngle = -60
  228. elseif ragdoll:findFirstChild("Head") and not ragdoll.Torso:findFirstChild("NeckAttachment") then
  229. local hedweld = Instance.new("Weld", ragdoll.Torso)
  230. hedweld.Part0 = ragdoll.Torso
  231. hedweld.Part1 = ragdoll.Head
  232. hedweld.C0 = CFrame.new(0,1.5,0)
  233. end
  234. game.Debris:AddItem(ragdoll, 30)
  235. local function aaaalol()
  236. wait(0.2)
  237. local function searchforvelocity(wot)
  238. for i,v in pairs(wot:GetChildren()) do
  239. searchforvelocity(v)
  240. if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  241. v:destroy()
  242. end
  243. end
  244. end
  245. searchforvelocity(ragdoll)
  246. wait(0.5)
  247. if ragdoll:findFirstChildOfClass("Humanoid") then
  248. ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  249. end
  250. if ragdoll:findFirstChild("HumanoidRootPart") then
  251. ragdoll:findFirstChild("HumanoidRootPart"):destroy()
  252. end
  253. end
  254. spawn(aaaalol)
  255. elseif character:findFirstChild("UpperTorso") then
  256. character.Archivable = true
  257. for i,v in pairs(character:GetChildren()) do
  258. if v.ClassName == "Sound" then
  259. v:remove()
  260. end
  261. for q,w in pairs(v:GetChildren()) do
  262. if w.ClassName == "Sound" then
  263. w:remove()
  264. end
  265. end
  266. end
  267. local ragdoll = character:Clone()
  268. ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  269. for i,v in pairs(ragdoll:GetDescendants()) do
  270. if v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  271. v:destroy()
  272. end
  273. end
  274. ragdoll:BreakJoints()
  275. ragdoll:findFirstChildOfClass("Humanoid").Health = 0
  276. if ragdoll:findFirstChild("Health") then
  277. if ragdoll:findFirstChild("Health").ClassName == "Script" then
  278. ragdoll:findFirstChild("Health").Disabled = true
  279. end
  280. end
  281. for i,v in pairs(character:GetChildren()) do
  282. if v.ClassName == "Part" or v.ClassName == "ForceField" or v.ClassName == "Accessory" or v.ClassName == "Hat" or v.ClassName == "MeshPart" then
  283. v:destroy()
  284. end
  285. end
  286. for i,v in pairs(character:GetChildren()) do
  287. if v.ClassName == "Accessory" then
  288. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  289. if attachment1 then
  290. for q,w in pairs(character:GetChildren()) do
  291. if w.ClassName == "Part" or w.ClassName == "MeshPart" then
  292. local attachment2 = w:findFirstChild(attachment1.Name)
  293. if attachment2 then
  294. local hinge = Instance.new("HingeConstraint", v.Handle)
  295. hinge.Attachment0 = attachment1
  296. hinge.Attachment1 = attachment2
  297. hinge.LimitsEnabled = true
  298. hinge.LowerAngle = 0
  299. hinge.UpperAngle = 0
  300. end
  301. end
  302. end
  303. end
  304. end
  305. end
  306. ragdoll.Parent = workspace
  307. local Humanoid = ragdoll:findFirstChildOfClass("Humanoid")
  308. Humanoid.PlatformStand = true
  309. local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
  310. local connection = Instance.new('BallSocketConstraint', limb)
  311. connection.LimitsEnabled = true
  312. connection.Attachment0 = attachementone
  313. connection.Attachment1 = attachmenttwo
  314. connection.TwistLimitsEnabled = true
  315. connection.TwistLowerAngle = twistlower
  316. connection.TwistUpperAngle = twistupper
  317. local limbcollider = Instance.new("Part", limb)
  318. limbcollider.Size = Vector3.new(0.1,1,1)
  319. limbcollider.Shape = "Cylinder"
  320. limbcollider.Transparency = 1
  321. limbcollider:BreakJoints()
  322. local limbcolliderweld = Instance.new("Weld", limbcollider)
  323. limbcolliderweld.Part0 = limb
  324. limbcolliderweld.Part1 = limbcollider
  325. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  326. end
  327. local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
  328. local connection = Instance.new('HingeConstraint', limb)
  329. connection.LimitsEnabled = true
  330. connection.Attachment0 = attachementone
  331. connection.Attachment1 = attachmenttwo
  332. connection.LimitsEnabled = true
  333. connection.LowerAngle = lower
  334. connection.UpperAngle = upper
  335. local limbcollider = Instance.new("Part", limb)
  336. limbcollider.Size = Vector3.new(0.1,1,1)
  337. limbcollider.Shape = "Cylinder"
  338. limbcollider.Transparency = 1
  339. limbcollider:BreakJoints()
  340. local limbcolliderweld = Instance.new("Weld", limbcollider)
  341. limbcolliderweld.Part0 = limb
  342. limbcolliderweld.Part1 = limbcollider
  343. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
  344. end
  345. local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
  346. HeadAttachment.Position = Vector3.new(0, -0.5, 0)
  347. if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
  348. makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
  349. end
  350. makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
  351. makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
  352. makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
  353. makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
  354. --
  355. makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
  356. makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
  357. makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
  358. --
  359. makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
  360. makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
  361. makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
  362. --
  363. makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
  364. makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
  365. makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
  366. for i,v in pairs(Humanoid.Parent:GetChildren()) do
  367. if v.ClassName == "Accessory" then
  368. local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
  369. if attachment1 then
  370. for q,w in pairs(Humanoid.Parent:GetChildren()) do
  371. if w.ClassName == "Part" then
  372. local attachment2 = w:findFirstChild(attachment1.Name)
  373. if attachment2 then
  374. local hinge = Instance.new("HingeConstraint", v.Handle)
  375. hinge.Attachment0 = attachment1
  376. hinge.Attachment1 = attachment2
  377. hinge.LimitsEnabled = true
  378. hinge.LowerAngle = 0
  379. hinge.UpperAngle = 0
  380. end
  381. end
  382. end
  383. end
  384. end
  385. end
  386. for i,v in pairs(ragdoll:GetChildren()) do
  387. for q,w in pairs(v:GetChildren()) do
  388. if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
  389. w:destroy()
  390. end
  391. end
  392. end
  393. if ragdoll:findFirstChild("HumanoidRootPart") then
  394. ragdoll.HumanoidRootPart:destroy()
  395. end
  396. if ragdoll:findFirstChildOfClass("Humanoid") then
  397. ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
  398. end
  399. local function waitfordatmoment()
  400. wait(0.2)
  401. local function searchforvelocity(wot)
  402. for i,v in pairs(wot:GetChildren()) do
  403. searchforvelocity(v)
  404. if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then
  405. v:destroy()
  406. end
  407. end
  408. end
  409. searchforvelocity(ragdoll)
  410. end
  411. spawn(waitfordatmoment)
  412. game.Debris:AddItem(ragdoll, 30)
  413. end
  414. end
  415. end
  416. function damage(action, force, maxforce, t)
  417. for i,v in pairs(workspace:GetDescendants()) do
  418. if v.ClassName == "Model" then
  419. local head = v:findFirstChild("Head")
  420. local humanoid = v:findFirstChildOfClass("Humanoid")
  421. local torso = v:findFirstChild("Torso")
  422. local ragdolled = v:findFirstChild("ragdolledbat")
  423. if humanoid and head then
  424. if (head.Position - handle.Position).magnitude < 3 and v ~= character and humanoid.Health > 0 then
  425. if action ~= "vibe check" then
  426. if ragdolled then
  427. return
  428. end
  429. end
  430. local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat")
  431. local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat")
  432. local headweld = character.Torso:findFirstChild("HeadWeldbat")
  433. local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat")
  434. hitsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
  435. hitsound:Play()
  436. hitsound2.PlaybackSpeed = 1+(math.random(-4,4)/20)
  437. hitsound2:Play()
  438. local velocity = Instance.new("BodyVelocity", head)
  439. velocity.MaxForce = Vector3.new(math.huge,0,math.huge)
  440. velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(force,maxforce)
  441. if action == "normal" then
  442. local dmg = math.random(30,80)
  443. if humanoid.Health <= dmg then
  444. humanoid.Health = 0
  445. humanoid.Parent:BreakJoints()
  446. ragdollkill(v)
  447. else
  448. humanoid.Health = humanoid.Health - dmg
  449. end
  450. elseif action == "critical" then
  451. local dmg = math.random(70,90)
  452. if humanoid.Health <= dmg then
  453. humanoid.Health = 0
  454. humanoid.Parent:BreakJoints()
  455. ragdollkill(v)
  456. else
  457. humanoid.Health = humanoid.Health - dmg
  458. end
  459. elseif action == "vibe check" then
  460. goresound.PlaybackSpeed = 1+(math.random(-4,4)/20)
  461. goresound:Play()
  462. goresound2.PlaybackSpeed = 1+(math.random(-4,4)/20)
  463. goresound2:Play()
  464. head.Transparency = 1
  465. for i = 1,math.random(25,30) do
  466. local hedd = Instance.new("Part", workspace)
  467. hedd.Size = Vector3.new(0.25,0.25,0.25)
  468. hedd.CFrame = head.CFrame * CFrame.new(math.random(-10,10)/20,math.random(-10,10)/20,math.random(-10,10)/20)
  469. game.Debris:AddItem(hedd, 7)
  470. if math.random(1,3) == 1 then
  471. hedd.BrickColor = head.BrickColor
  472. hedd.Material = head.Material
  473. else
  474. hedd.BrickColor = BrickColor.new("Maroon")
  475. hedd.Material = "Granite"
  476. end
  477. end
  478. for q,w in pairs(v:GetChildren()) do
  479. if w.ClassName == "Accessory" or w.ClassName == "Hat" then
  480. w:destroy()
  481. end
  482. end
  483. for q,w in pairs(head:GetChildren()) do
  484. if w.ClassName == "Weld" then
  485. if w.Part1 ~= nil then
  486. if w.Part1 ~= head then
  487. w.Part1:destroy()
  488. end
  489. end
  490. end
  491. if w.ClassName == "Decal"then
  492. w:destroy()
  493. end
  494. end
  495. humanoid.Health = 0
  496. humanoid.Parent:BreakJoints()
  497. ragdollkill(v)
  498. end
  499. local ragdolledknife = Instance.new("BoolValue", v)
  500. ragdolledknife.Name = "ragdolledbat"
  501. humanoid.PlatformStand = true
  502. coroutine.wrap(function()
  503. wait(t)
  504. humanoid.PlatformStand = false
  505. end)()
  506. game.Debris:AddItem(ragdolledknife, t)
  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(t)
  533. limbclone.Parent = ragdoll.Torso
  534. limbclone.Part0 = ragdoll.Torso
  535. limbclone.Part1 = ragdoll["Right Arm"]
  536. end)()
  537. end
  538. wait(t)
  539. glue:destroy()
  540. limbcollider:destroy()
  541. limbcolliderweld:destroy()
  542. end)()
  543. end
  544. if ragdoll:findFirstChild("Left Arm") then
  545. local glue = Instance.new("Glue", ragdoll.Torso)
  546. glue.Part0 = ragdoll.Torso
  547. glue.Part1 = ragdoll:findFirstChild("Left Arm")
  548. glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  549. glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  550. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
  551. limbcollider.Size = Vector3.new(1.4,1,1)
  552. limbcollider.Shape = "Cylinder"
  553. limbcollider.Name = "LimbCollider"
  554. limbcollider.Transparency = 1
  555. local limbcolliderweld = Instance.new("Weld", limbcollider)
  556. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")
  557. limbcolliderweld.Part1 = limbcollider
  558. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  559. coroutine.wrap(function()
  560. if ragdoll.Torso:findFirstChild("Left Shoulder") then
  561. local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
  562. ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
  563. coroutine.wrap(function()
  564. wait(t)
  565. limbclone.Parent = ragdoll.Torso
  566. limbclone.Part0 = ragdoll.Torso
  567. limbclone.Part1 = ragdoll["Left Arm"]
  568. end)()
  569. end
  570. wait(t)
  571. glue:destroy()
  572. limbcollider:destroy()
  573. limbcolliderweld:destroy()
  574. end)()
  575. end
  576. if ragdoll:findFirstChild("Left Leg") then
  577. local glue = Instance.new("Glue", ragdoll.Torso)
  578. glue.Part0 = ragdoll.Torso
  579. glue.Part1 = ragdoll:findFirstChild("Left Leg")
  580. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  581. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  582. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
  583. limbcollider.Size = Vector3.new(1.5,1,1)
  584. limbcollider.Shape = "Cylinder"
  585. limbcollider.Name = "LimbCollider"
  586. limbcollider.Transparency = 1
  587. local limbcolliderweld = Instance.new("Weld", limbcollider)
  588. limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
  589. limbcolliderweld.Part1 = limbcollider
  590. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  591. coroutine.wrap(function()
  592. if ragdoll.Torso:findFirstChild("Left Hip") then
  593. local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
  594. ragdoll.Torso:findFirstChild("Left Hip"):destroy()
  595. coroutine.wrap(function()
  596. wait(t)
  597. limbclone.Parent = ragdoll.Torso
  598. limbclone.Part0 = ragdoll.Torso
  599. limbclone.Part1 = ragdoll["Left Leg"]
  600. end)()
  601. end
  602. wait(t)
  603. glue:destroy()
  604. limbcollider:destroy()
  605. limbcolliderweld:destroy()
  606. end)()
  607. end
  608. if ragdoll:findFirstChild("Right Leg") then
  609. local glue = Instance.new("Glue", ragdoll.Torso)
  610. glue.Part0 = ragdoll.Torso
  611. glue.Part1 = ragdoll:findFirstChild("Right Leg")
  612. glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  613. glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  614. local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
  615. limbcollider.Size = Vector3.new(1.5,1,1)
  616. limbcollider.Shape = "Cylinder"
  617. limbcollider.Name = "LimbCollider"
  618. limbcollider.Transparency = 1
  619. local limbcolliderweld = Instance.new("Weld", limbcollider)
  620. limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
  621. limbcolliderweld.Part1 = limbcollider
  622. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
  623. coroutine.wrap(function()
  624. if ragdoll.Torso:findFirstChild("Right Hip") then
  625. local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
  626. ragdoll.Torso:findFirstChild("Right Hip"):destroy()
  627. coroutine.wrap(function()
  628. wait(t)
  629. limbclone.Parent = ragdoll.Torso
  630. limbclone.Part0 = ragdoll.Torso
  631. limbclone.Part1 = ragdoll["Right Leg"]
  632. end)()
  633. end
  634. wait(t)
  635. glue:destroy()
  636. limbcollider:destroy()
  637. limbcolliderweld:destroy()
  638. end)()
  639. end
  640. end)()
  641. end
  642. end
  643. end
  644. end
  645. end
  646. end
  647. tool.Deactivated:connect(function()
  648. if mouseclick and not cananimate then
  649. if count < 30 then
  650. cananimate = true
  651. canattack = true
  652. return
  653. end
  654. local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat")
  655. local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat")
  656. local headweld = character.Torso:findFirstChild("HeadWeldbat")
  657. local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat")
  658. if attacknumber == 1 then
  659. trail.Enabled = true
  660. swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
  661. swishsound:Play()
  662. for i = 0,1 , 0.1 do
  663. if attacktype == 0 then
  664. damage("normal", 10,20, 2)
  665. elseif attacktype == 1 then
  666. damage("critical", 20,30, 2.5)
  667. elseif attacktype == 2 then
  668. damage("vibe check", 30,40, 1)
  669. end
  670. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,-(math.pi/3),0),0.1)
  671. headweld.C0 = headweld.C0:lerp(CFrame.new(9.53674316e-07, 1.49999952, 9.53674316e-07, 0.499999791, -1.49011612e-08, -0.866025269, -3.14321369e-09, 0.999999881, -1.49011612e-08, 0.866025388, -7.4505806e-09, 0.499999821),i)
  672. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(0.27244854, 0.123777866, -0.741029739, 0.642787457, 0.719846129, 0.262002736, 1.49011612e-08, 0.342020303, -0.939692438, -0.766044378, 0.604022741, 0.219846398),i)
  673. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-0.993065834, 0.0928759575, -0.543260574, 0.981225848, -0.183488816, 0.0593911558, 0.116977744, 0.321393728, -0.939692438, 0.153335154, 0.928998232, 0.336824),i)
  674. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.492403746, 0.0868240669, 0.866025448, -0.173648179, 0.98480773, 0, -0.852868557, -0.150383741, 0.499999881),i)
  675. runservice.Stepped:wait()
  676. end
  677. trail.Enabled = false
  678. attacknumber = 2
  679. elseif attacknumber == 2 then
  680. trail.Enabled = true
  681. swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
  682. swishsound:Play()
  683. for i = 0,1 , 0.1 do
  684. if attacktype == 0 then
  685. damage("normal", 10,20, 2)
  686. elseif attacktype == 1 then
  687. damage("critical", 20,30, 2.5)
  688. elseif attacktype == 2 then
  689. damage("vibe check", 30,40, 1)
  690. end
  691. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2),0),0.1)
  692. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 1.90734863e-06, 0.642787576, 7.4505806e-09, 0.766044378, -1.0477379e-09, 0.99999994, 1.49011612e-08, -0.766044378, 0, 0.642787576),i)
  693. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.50000191, 0.328989983, -0.469844818, 0.99999994, 2.98023224e-08, -2.98023224e-08, 7.4505806e-09, 0.342020035, -0.939692438, 0, 0.939692378, 0.342020065),i)
  694. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(0.314659119, 0.191040754, -1.2273407, 0.344304681, -0.926735461, -0.150383726, 0.0301536545, 0.171010002, -0.984807611, 0.938373566, 0.334539324, 0.0868240297),i)
  695. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.633022368, -0.111618921, -0.766044259, 0.173648179, 0.98480773, 0, 0.754406333, -0.133022189, 0.642787755) * CFrame.fromEulerAnglesXYZ(0,math.rad(20),0),i)
  696. runservice.Stepped:wait()
  697. end
  698. trail.Enabled = false
  699. attacknumber = 1
  700. end
  701. cananimate = true
  702. canattack = true
  703. end
  704. end)
  705. tool.Activated:connect(function()
  706. if owner ~= nil and character ~= nil and canattack then
  707. cananimate = false
  708. canattack = false
  709. attacktype = 0
  710. count = 0
  711. local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat")
  712. local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat")
  713. local headweld = character.Torso:findFirstChild("HeadWeldbat")
  714. local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat")
  715. if handle:findFirstChild("AIDS") then
  716. handle.AIDS:destroy()
  717. local grip = character["Right Arm"]:WaitForChild("RightGrip")
  718. grip.Part1 = handle
  719. end
  720. for i,v in pairs(workspace:GetDescendants()) do
  721. if v.ClassName == "Model" and v ~= character then
  722. local humanoid = v:findFirstChildOfClass("Humanoid")
  723. local headepic = v:findFirstChild("Head")
  724. if humanoid and headepic then
  725. if (headepic.Position - character.HumanoidRootPart.Position).magnitude < 6 and humanoid.PlatformStand and humanoid.Health > 0 then
  726. local rightlegweld = Instance.new("Weld", character.Torso)
  727. rightlegweld.Part0 = character.Torso
  728. rightlegweld.Part1 = character["Right Leg"]
  729. rightlegweld.C0 = CFrame.new(0.5,-2,0)
  730. rightlegweld.Name = "RightLegWeldbat"
  731. local leftlegweld = Instance.new("Weld", character.Torso)
  732. leftlegweld.Part0 = character.Torso
  733. leftlegweld.Part1 = character["Left Leg"]
  734. leftlegweld.C0 = CFrame.new(-0.5,-2,0)
  735. leftlegweld.Name = "LeftLegWeldbat"
  736. character:findFirstChildOfClass("Humanoid").WalkSpeed = 0
  737. for i = 0,1 , 0.05 do
  738. cananimate = false
  739. canattack = false
  740. character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, Vector3.new(headepic.Position.x,character.HumanoidRootPart.Position.y,headepic.Position.z))
  741. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2)+math.rad(25),0),i)
  742. rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.681245327, -2.07163143, 0, 0.98480773, -0.173648179, -2.98023224e-08, 0.173648164, 0.984807611, 7.4505806e-09, -2.98023224e-08, 1.14149561e-08, 1),i)
  743. leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.499999046, -1.39999986, -0.399999619, 0.99999994, -7.4505806e-09, -2.98023224e-08, 1.49011612e-08, 0.999999881, 7.4505806e-09, -2.98023224e-08, 0, 1),i)
  744. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.57790804, 0.75, 0.321748734, 0.342020154, -0.813797712, 0.469846278, -1.49011612e-08, -0.49999994, -0.866025209, 0.939692616, 0.29619813, -0.171010107),i)
  745. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(1.41171503, 0.67853117, -0.785638809, -0.468489617, -0.76629442, 0.439670324, -0.134425014, -0.430039823, -0.892745972, 0.873182297, -0.47734493, 0.0984600335),i)
  746. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.633021891, 0.111618839, -0.766044736, -0.173648179, 0.98480773, 0, 0.75440675, 0.133022279, 0.642787278),i)
  747. headweld.C0 = headweld.C0:lerp(CFrame.new(-0.131000042, 1.46984625, -0.109922409, 0.642787337, -0.262002826, 0.719846427, -6.98491931e-10, 0.939692497, 0.342020392, -0.766044617, -0.219846383, 0.604022503),i)
  748. runservice.Stepped:wait()
  749. end
  750. trail.Enabled = true
  751. for i = 0,1 , 0.12 do
  752. damage("vibe check", 0, 0, 1)
  753. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0),i)
  754. rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.499998093, -1.49999964, 0.866025925, 0.99999994, -2.98023224e-08, -3.7252903e-09, -7.4505806e-09, 0.499999911, 0.866025269, 0, -0.866025448, 0.49999994),i)
  755. leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.500001907, -0.739692211, -0.657979965, 0.99999994, 0, 2.98023224e-08, -7.4505806e-09, 0.939692378, 0.342020035, 0, -0.342020184, 0.939692616),i)
  756. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(0.569936752, 0.318357229, -1.03014803, 0.939692497, 0.342020154, 1.49011612e-08, -0.0593912005, 0.163175836, -0.984807611, -0.336824059, 0.92541647, 0.173648238),i)
  757. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-0.429023743, 0.324180841, -0.997120857, 0.98480767, -0.173648149, 1.49011612e-08, 0.0301536694, 0.171010017, -0.984807611, 0.171010062, 0.969846368, 0.173648238),i)
  758. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, -1.19999969, 0, 0.950535476, -0.055632934, 0.305593252, -0.0479752049, 0.945729434, 0.321393996, -0.30688861, -0.320157319, 0.896280468),i)
  759. headweld.C0 = headweld.C0:lerp(CFrame.new(-1.90734863e-06, 1.5, 0, 0.98480773, -7.4505806e-09, -0.173648179, -1.49011612e-08, 0.999999881, 0, 0.173648253, -2.98023224e-08, 0.98480773),i)
  760. runservice.Stepped:wait()
  761. end
  762. coroutine.wrap(function()
  763. for i = 0,1 ,0.07 do
  764. leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
  765. rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
  766. runservice.Stepped:wait()
  767. end
  768. leftlegweld:destroy()
  769. rightlegweld:destroy()
  770. character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
  771. end)()
  772. trail.Enabled = false
  773. cananimate = true
  774. canattack = true
  775. return
  776. end
  777. end
  778. end
  779. end
  780. if attacknumber == 1 then
  781. coroutine.wrap(function()
  782. while runservice.Stepped:wait() and mouseclick do
  783. count = count + 1
  784. if count == 50 then
  785. attacktype = 1
  786. local effect = Instance.new("Part", workspace)
  787. effect.Material = "ForceField"
  788. effect.BrickColor = BrickColor.new("Institutional white")
  789. effect.Anchored = true
  790. effect.CanCollide = false
  791. effect.CFrame = handle.CFrame
  792. effect.Size = handle.Size
  793. coroutine.wrap(function()
  794. for i = 1,40 do
  795. effect.Transparency = effect.Transparency + 0.025
  796. effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
  797. runservice.Stepped:wait()
  798. end
  799. effect:destroy()
  800. end)()
  801. end
  802. if count == 90 then
  803. attacktype = 2
  804. local effect = Instance.new("Part", workspace)
  805. effect.Material = "ForceField"
  806. effect.BrickColor = BrickColor.new("Really red")
  807. effect.Anchored = true
  808. effect.CanCollide = false
  809. effect.CFrame = handle.CFrame
  810. effect.Size = handle.Size
  811. coroutine.wrap(function()
  812. for i = 1,40 do
  813. effect.Transparency = effect.Transparency + 0.025
  814. effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
  815. runservice.Stepped:wait()
  816. end
  817. effect:destroy()
  818. end)()
  819. end
  820. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2)+math.rad(25),0),0.1)
  821. headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0815873146, 1.49240327, -0.0296955109, 0.342020094, -0.163175672, 0.925416231, 1.00699253e-08, 0.984807491, 0.173647955, -0.939692616, -0.0593911149, 0.336824059),0.1)
  822. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.336824089, 0.0593911782, -0.939692616, -0.173648149, 0.984807611, 0, 0.92541641, 0.163175896, 0.342020154) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/20,0,0),0.1)
  823. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(1.3505621, 0.950000048, -0.634313583, -0.342020035, -0.813797235, 0.469846278, -4.87780198e-08, -0.49999997, -0.866025031, 0.939692616, -0.29619804, 0.171010047) * CFrame.new(0,math.cos(tick())/20,0),0.1)
  824. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.58705735, 0.872320414, 0.129386902, 0.607604206, -0.566511154, 0.556670189, 0.111618847, -0.633021832, -0.766044259, 0.786357343, 0.527587116, -0.321393698) * CFrame.new(0,math.cos(tick())/20,0),0.1)
  825. end
  826. end)()
  827. elseif attacknumber == 2 then
  828. coroutine.wrap(function()
  829. while runservice.Stepped:wait() and mouseclick do
  830. count = count + 1
  831. if count == 50 then
  832. attacktype = 1
  833. local effect = Instance.new("Part", workspace)
  834. effect.Material = "ForceField"
  835. effect.BrickColor = BrickColor.new("Institutional white")
  836. effect.Anchored = true
  837. effect.CanCollide = false
  838. effect.CFrame = handle.CFrame
  839. effect.Size = handle.Size
  840. coroutine.wrap(function()
  841. for i = 1,40 do
  842. effect.Transparency = effect.Transparency + 0.025
  843. effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
  844. runservice.Stepped:wait()
  845. end
  846. effect:destroy()
  847. end)()
  848. end
  849. if count == 90 then
  850. attacktype = 2
  851. local effect = Instance.new("Part", workspace)
  852. effect.Material = "ForceField"
  853. effect.BrickColor = BrickColor.new("Really red")
  854. effect.Anchored = true
  855. effect.CanCollide = false
  856. effect.CFrame = handle.CFrame
  857. effect.Size = handle.Size
  858. coroutine.wrap(function()
  859. for i = 1,40 do
  860. effect.Transparency = effect.Transparency + 0.025
  861. effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
  862. runservice.Stepped:wait()
  863. end
  864. effect:destroy()
  865. end)()
  866. end
  867. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(-math.pi/2)+math.rad(25),0),0.1)
  868. headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.342020035, 0, -0.939692378, -1.64301071e-07, 1, -5.98006906e-08, 0.939692378, 1.74845525e-07, 0.342020035),0.1)
  869. rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.173648119, 0, 0.98480767, 0, 1, 0, -0.98480767, 0, 0.173648119) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/20,0,0.1),0.1)
  870. leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.69218636, 0.638716698, -0.0404472351, 0.771280289, 0.613091826, -0.171010137, 0.0593912005, -0.336824268, -0.939692497, -0.633718252, 0.714609921, -0.296198249) * CFrame.new(0,math.cos(tick())/20,0),0.1)
  871. rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(-1.2802496, 0.725742579, -0.5, -4.47034836e-08, 0.984807432, -0.173648149, 4.37113847e-08, -0.173648149, -0.984807551, -0.999999762, -2.98023224e-08, -3.35276127e-08) * CFrame.new(0,math.cos(tick())/20,0),0.1)
  872. end
  873. end)()
  874. end
  875. end
  876. end)
  877. --
  878. tool.Equipped:connect(function()
  879. equipped = true
  880. trail.Enabled = false
  881. cananimate = true
  882. canattack = false
  883. handle.Transparency = 1
  884. owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  885. character = owner.Character
  886. local rightarm = Instance.new("Weld", character.Torso)
  887. rightarm.Part0 = character.Torso
  888. rightarm.Part1 = character["Right Arm"]
  889. rightarm.C0 = CFrame.new(1.5,0,0)
  890. rightarm.Name = "RightArmWeldbat"
  891. local leftarm = Instance.new("Weld", character.Torso)
  892. leftarm.Part0 = character.Torso
  893. leftarm.Part1 = character["Left Arm"]
  894. leftarm.C0 = CFrame.new(-1.5,0,0)
  895. leftarm.Name = "LeftArmWeldbat"
  896. local head = Instance.new("Weld", character.Torso)
  897. head.Part0 = character.Torso
  898. head.Part1 = character.Head
  899. head.C0 = CFrame.new(0,1.5,0)
  900. head.Name = "HeadWeldbat"
  901. local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
  902. humanoidrootpart.Part0 = character.HumanoidRootPart
  903. humanoidrootpart.Part1 = character.Torso
  904. humanoidrootpart.Name = "HumanoidRootPartWeldbat"
  905. for i = 0,1 , 0.05 do
  906. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(25),0),i)
  907. leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi+math.rad(10),math.rad(75),math.rad(-10)) * CFrame.new(0,-0.5,0),i)
  908. rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(10)) * CFrame.new(0,-0.5,0),i)
  909. runservice.Stepped:wait()
  910. end
  911. local grip = character["Right Arm"]:WaitForChild("RightGrip")
  912. grip.Part1 = nil
  913. local weldd = Instance.new("Weld", handle)
  914. weldd.Part0 = character["Left Arm"]
  915. weldd.Part1 = handle
  916. weldd.Name = "AIDS"
  917. weldd.C0 = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ((math.pi/2),math.rad(15),0) * CFrame.new(-0.7,0,-0.1)
  918. cananimate = true
  919. if character:findFirstChild("BatBack") then
  920. character:findFirstChild("BatBack").Transparency = 1
  921. end
  922. handle.Transparency = 0
  923. equipsound:Play()
  924. local WHEN = 0
  925. coroutine.wrap(function()
  926. while runservice.Stepped:wait() and equipped do
  927. if cananimate then
  928. if WHEN < 40 then
  929. WHEN = WHEN + 1
  930. elseif WHEN == 40 then
  931. WHEN = 41
  932. grip.Part1 = handle
  933. canattack = true
  934. weldd:destroy()
  935. end
  936. tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),0.1)
  937. head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1)
  938. humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1)
  939. leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.4,0.5,0) * CFrame.fromEulerAnglesXYZ((math.pi/2)-math.rad(50)+math.sin(tick())/15,0,math.rad(50)) * CFrame.new(0,-0.8,0),0.1)
  940. rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ((math.pi/2)-math.rad(35)+math.sin(tick())/15,math.rad(20),math.rad(-40)) * CFrame.new(0,-0.8,0),0.1)
  941. end
  942. end
  943. end)()
  944. end)
  945. tool.Unequipped:connect(function()
  946. equipped = false
  947. mouseclick = false
  948. cananimate = false
  949. if character.Torso:findFirstChild("LeftArmWeldbat") then
  950. character.Torso:findFirstChild("LeftArmWeldbat"):destroy()
  951. end
  952. if character.Torso:findFirstChild("RightArmWeldbat") then
  953. character.Torso:findFirstChild("RightArmWeldbat"):destroy()
  954. end
  955. if character.Torso:findFirstChild("HeadWeldbat") then
  956. character.Torso:findFirstChild("HeadWeldbat"):destroy()
  957. end
  958. if character:findFirstChild("HumanoidRootPart") then
  959. if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") then
  960. character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat"):destroy()
  961. end
  962. end
  963. if not character:findFirstChild("BatBack") then
  964. local clone = handle:Clone()
  965. clone:BreakJoints()
  966. for i,v in pairs(clone:GetDescendants()) do
  967. if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then
  968. v:destroy()
  969. end
  970. end
  971. local weld = Instance.new("Weld", clone)
  972. weld.Part0 = character.Torso
  973. weld.Part1 = clone
  974. weld.C0 = CFrame.new(0,0,0.55)
  975. weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,math.pi/2)
  976. weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi,math.rad(60)+math.pi,0)
  977. clone.Parent = character
  978. clone.Name = "BatBack"
  979. else
  980. character:findFirstChild("BatBack").Transparency = 0
  981. end
  982. handle.Transparency = 1
  983. character.BatBack:findFirstChildOfClass("SpecialMesh").TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId
  984. end)
  985. end)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement