View difference between Paste ID: 0MF2wqZJ and CtpS2Ziv
SHOW: | | - or go back to the newest paste.
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://3755636638"
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://4306991691"
59
Sound9.Name = "Hit2"
60
Sound9.Parent = Part2
61
Sound9.SoundId = "rbxassetid://3932505023"
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://4459572527"
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
                        head:destroy()
466
						for i = 1,math.random(25,30) do
467
							local hedd = Instance.new("Part", workspace)
468
							hedd.Size = Vector3.new(0.25,0.25,0.25)
469
							hedd.CFrame = head.CFrame * CFrame.new(math.random(-10,10)/20,math.random(-10,10)/20,math.random(-10,10)/20)
470
							game.Debris:AddItem(hedd, 7)
471
							if math.random(1,3) == 1 then
472
								hedd.BrickColor = head.BrickColor
473
								hedd.Material = head.Material
474
							else
475
								hedd.BrickColor = BrickColor.new("Maroon")
476
								hedd.Material = "Granite"
477
							end
478
						end
479
						for q,w in pairs(v:GetChildren()) do
480
							if w.ClassName == "Accessory" or w.ClassName == "Hat" then
481
								
482
							end
483
						end
484
						for q,w in pairs(head:GetChildren()) do
485
							if w.ClassName == "Weld" then
486
								if w.Part1 ~= nil then
487
									if w.Part1 ~= head then
488
										w.Part1:destroy()
489
									end
490
								end
491
							end
492
							if w.ClassName == "Decal"then
493
								w:destroy()
494
							end
495
						end
496
						humanoid.Health = 0
497
						humanoid.Parent:BreakJoints()
498
						ragdollkill(v)
499
					end
500
					local ragdolledknife = Instance.new("BoolValue", v)
501
					ragdolledknife.Name = "ragdolledbat"
502
					humanoid.PlatformStand = true
503
					coroutine.wrap(function()
504
						wait(t)
505
						humanoid.PlatformStand = false
506
					end)()
507
					game.Debris:AddItem(ragdolledknife, t)
508
					game.Debris:AddItem(velocity, 0.2)
509
					if torso then
510
						coroutine.wrap(function()
511
							humanoid = v:WaitForChild("Humanoid")
512
							local ragdoll = v
513
							if ragdoll:findFirstChild("Right Arm") then
514
								local glue = Instance.new("Glue", ragdoll.Torso)
515
								glue.Part0 = ragdoll.Torso
516
								glue.Part1 = ragdoll:findFirstChild("Right Arm")
517
								glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
518
								glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
519
								local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm"))
520
								limbcollider.Size = Vector3.new(1.4,1,1)
521
								limbcollider.Shape = "Cylinder"
522
								limbcollider.Transparency = 1
523
								limbcollider.Name = "LimbCollider"
524
								local limbcolliderweld = Instance.new("Weld", limbcollider)
525
								limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm")
526
								limbcolliderweld.Part1 = limbcollider
527
								limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
528
								coroutine.wrap(function()
529
									if ragdoll.Torso:findFirstChild("Right Shoulder") then
530
										local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone()
531
										ragdoll.Torso:findFirstChild("Right Shoulder"):destroy()
532
										coroutine.wrap(function()
533
											wait(t)
534
											limbclone.Parent = ragdoll.Torso
535
											limbclone.Part0 = ragdoll.Torso
536
											limbclone.Part1 = ragdoll["Right Arm"]
537
										end)()
538
									end
539
									wait(t)
540
									glue:destroy()
541
									limbcollider:destroy()
542
									limbcolliderweld:destroy()
543
								end)()
544
							end
545
							if ragdoll:findFirstChild("Left Arm") then
546
								local glue = Instance.new("Glue", ragdoll.Torso)
547
								glue.Part0 = ragdoll.Torso
548
								glue.Part1 = ragdoll:findFirstChild("Left Arm")
549
								glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
550
								glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
551
								local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm"))
552
								limbcollider.Size = Vector3.new(1.4,1,1)
553
								limbcollider.Shape = "Cylinder"
554
								limbcollider.Name = "LimbCollider"
555
								limbcollider.Transparency = 1
556
								local limbcolliderweld = Instance.new("Weld", limbcollider)
557
								limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm")			
558
								limbcolliderweld.Part1 = limbcollider
559
								limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
560
								coroutine.wrap(function()
561
									if ragdoll.Torso:findFirstChild("Left Shoulder") then
562
										local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone()
563
										ragdoll.Torso:findFirstChild("Left Shoulder"):destroy()
564
										coroutine.wrap(function()
565
											wait(t)
566
											limbclone.Parent = ragdoll.Torso
567
											limbclone.Part0 = ragdoll.Torso
568
											limbclone.Part1 = ragdoll["Left Arm"]
569
										end)()
570
									end
571
									wait(t)
572
									glue:destroy()
573
									limbcollider:destroy()
574
									limbcolliderweld:destroy()
575
								end)()
576
							end
577
							if ragdoll:findFirstChild("Left Leg") then
578
								local glue = Instance.new("Glue", ragdoll.Torso)
579
								glue.Part0 = ragdoll.Torso
580
								glue.Part1 = ragdoll:findFirstChild("Left Leg")
581
								glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
582
								glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
583
								local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg"))
584
								limbcollider.Size = Vector3.new(1.5,1,1)
585
								limbcollider.Shape = "Cylinder"
586
								limbcollider.Name = "LimbCollider"
587
								limbcollider.Transparency = 1
588
								local limbcolliderweld = Instance.new("Weld", limbcollider)
589
								limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg")
590
								limbcolliderweld.Part1 = limbcollider
591
								limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
592
								coroutine.wrap(function()
593
									if ragdoll.Torso:findFirstChild("Left Hip") then
594
										local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone()
595
										ragdoll.Torso:findFirstChild("Left Hip"):destroy()
596
										coroutine.wrap(function()
597
											wait(t)
598
											limbclone.Parent = ragdoll.Torso
599
											limbclone.Part0 = ragdoll.Torso
600
											limbclone.Part1 = ragdoll["Left Leg"]
601
										end)()
602
									end
603
									wait(t)
604
									glue:destroy()
605
									limbcollider:destroy()
606
									limbcolliderweld:destroy()
607
								end)()
608
							end
609
							if ragdoll:findFirstChild("Right Leg") then
610
								local glue = Instance.new("Glue", ragdoll.Torso)
611
								glue.Part0 = ragdoll.Torso
612
								glue.Part1 = ragdoll:findFirstChild("Right Leg")
613
								glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
614
								glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
615
								local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg"))
616
								limbcollider.Size = Vector3.new(1.5,1,1)
617
								limbcollider.Shape = "Cylinder"
618
								limbcollider.Name = "LimbCollider"
619
								limbcollider.Transparency = 1
620
								local limbcolliderweld = Instance.new("Weld", limbcollider)
621
								limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg")
622
								limbcolliderweld.Part1 = limbcollider
623
								limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0)
624
								coroutine.wrap(function()
625
									if ragdoll.Torso:findFirstChild("Right Hip") then
626
										local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone()
627
										ragdoll.Torso:findFirstChild("Right Hip"):destroy()
628
										coroutine.wrap(function()
629
											wait(t)
630
											limbclone.Parent = ragdoll.Torso
631
											limbclone.Part0 = ragdoll.Torso
632
											limbclone.Part1 = ragdoll["Right Leg"]
633
										end)()
634
									end
635
									wait(t)
636
									glue:destroy()
637
									limbcollider:destroy()
638
									limbcolliderweld:destroy()
639
								end)()
640
							end
641
						end)()
642
					end
643
				end
644
			end
645
		end
646
	end
647
end
648
tool.Deactivated:connect(function()
649
	if mouseclick and not cananimate then
650
		if count < 30 then
651
			cananimate = true
652
			canattack = true
653
			return
654
		end
655
		local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat")
656
		local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat")
657
		local headweld = character.Torso:findFirstChild("HeadWeldbat")
658
		local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat")
659
		if attacknumber == 1 then
660
			trail.Enabled = true
661
			swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
662
			swishsound:Play()
663
			for i = 0,1 , 0.1 do
664
				if attacktype == 0 then
665
					damage("normal", 10,20, 2)
666
				elseif attacktype == 1 then
667
					damage("critical", 20,30, 2.5)
668
				elseif attacktype == 2 then
669
					damage("vibe check", 30,40, 1)
670
				end
671
				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)
672
				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)
673
				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)
674
				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)
675
				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)
676
				runservice.Stepped:wait()
677
			end
678
			trail.Enabled = false
679
			attacknumber = 2
680
		elseif attacknumber == 2 then
681
			trail.Enabled = true
682
			swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20)
683
			swishsound:Play()
684
			for i = 0,1 , 0.1 do
685
				if attacktype == 0 then
686
					damage("normal", 10,20, 2)
687
				elseif attacktype == 1 then
688
					damage("critical", 20,30, 2.5)
689
				elseif attacktype == 2 then
690
					damage("vibe check", 30,40, 1)
691
				end
692
				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)
693
				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)
694
				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)
695
				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)
696
				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)
697
				runservice.Stepped:wait()
698
			end
699
			trail.Enabled = false
700
			attacknumber = 1
701
		end
702
		cananimate = true
703
		canattack = true
704
	end
705
end)
706
tool.Activated:connect(function()
707
	if owner ~= nil and character ~= nil and canattack then
708
		cananimate = false
709
		canattack = false
710
		attacktype = 0
711
		count = 0
712
		local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat")
713
		local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat")
714
		local headweld = character.Torso:findFirstChild("HeadWeldbat")
715
		local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat")
716
		if handle:findFirstChild("AIDS") then
717
			handle.AIDS:destroy()
718
			local grip = character["Right Arm"]:WaitForChild("RightGrip")
719
			grip.Part1 = handle
720
		end
721
		for i,v in pairs(workspace:GetDescendants()) do
722
			if v.ClassName == "Model" and v ~= character then
723
				local humanoid = v:findFirstChildOfClass("Humanoid")
724
				local headepic = v:findFirstChild("Head")
725
				if humanoid and headepic then
726
					if (headepic.Position - character.HumanoidRootPart.Position).magnitude < 6 and humanoid.PlatformStand and humanoid.Health > 0 then
727
						local rightlegweld = Instance.new("Weld", character.Torso)
728
						rightlegweld.Part0 = character.Torso
729
						rightlegweld.Part1 = character["Right Leg"]
730
						rightlegweld.C0 = CFrame.new(0.5,-2,0)
731
						rightlegweld.Name = "RightLegWeldbat"
732
						local leftlegweld = Instance.new("Weld", character.Torso)
733
						leftlegweld.Part0 = character.Torso
734
						leftlegweld.Part1 = character["Left Leg"]
735
						leftlegweld.C0 = CFrame.new(-0.5,-2,0)
736
						leftlegweld.Name = "LeftLegWeldbat"
737
						character:findFirstChildOfClass("Humanoid").WalkSpeed = 0
738
						for i = 0,1 , 0.05 do
739
							cananimate = false
740
							canattack = false
741
							character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, Vector3.new(headepic.Position.x,character.HumanoidRootPart.Position.y,headepic.Position.z))
742
							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)
743
							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)
744
							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)
745
							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)
746
							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)
747
							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)
748
							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)
749
							runservice.Stepped:wait()
750
						end
751
						trail.Enabled = true
752
						for i = 0,1 , 0.12 do
753
							damage("vibe check", 0, 0, 1)
754
							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)
755
							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)
756
							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)
757
							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)
758
							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)
759
							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)
760
							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)
761
							runservice.Stepped:wait()
762
						end
763
						coroutine.wrap(function()
764
							for i = 0,1 ,0.07 do
765
								leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i)
766
								rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i)
767
								runservice.Stepped:wait()
768
							end
769
							leftlegweld:destroy()
770
							rightlegweld:destroy()
771
							character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
772
						end)()
773
						trail.Enabled = false
774
						cananimate = true
775
						canattack = true
776
						return
777
					end
778
				end
779
			end
780
		end
781
		if attacknumber == 1 then
782
			coroutine.wrap(function()
783
				while runservice.Stepped:wait() and mouseclick do
784
					count = count + 1
785
					if count == 50 then
786
						attacktype = 1
787
						local effect = Instance.new("Part", workspace)
788
						effect.Material = "ForceField"
789
						effect.BrickColor = BrickColor.new("Institutional white")
790
						effect.Anchored = true
791
						effect.CanCollide = false
792
						effect.CFrame = handle.CFrame
793
						effect.Size = handle.Size
794
						coroutine.wrap(function()
795
							for i = 1,40 do
796
								effect.Transparency = effect.Transparency + 0.025
797
								effect.Size = effect.Size + Vector3.new(0.06,0.06,0.06)
798
								runservice.Stepped:wait()
799
							end
800
							effect:destroy()
801
						end)()
802
					end
803
					if count == 90 then
804
						attacktype = 2
805
						local effect = Instance.new("Part", workspace)
806
						effect.Material = "ForceField"
807
						effect.BrickColor = BrickColor.new("Really red")
808
						effect.Anchored = true
809
						effect.CanCollide = false
810
						effect.CFrame = handle.CFrame
811
						effect.Size = handle.Size
812
						coroutine.wrap(function()
813
							for i = 1,40 do
814
								effect.Transparency = effect.Transparency + 0.025
815
								effect.Size = effect.Size + Vector3.new(0.06,0.06,0.06)
816
								runservice.Stepped:wait()
817
							end
818
							effect:destroy()
819
						end)()
820
					end
821
					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)
822
					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)
823
					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)
824
					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)
825
					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)
826
				end
827
			end)()
828
		elseif attacknumber == 2 then
829
			coroutine.wrap(function()
830
				while runservice.Stepped:wait() and mouseclick do
831
					count = count + 1
832
					if count == 50 then
833
						attacktype = 1
834
						local effect = Instance.new("Part", workspace)
835
						effect.Material = "ForceField"
836
						effect.BrickColor = BrickColor.new("Institutional white")
837
						effect.Anchored = true
838
						effect.CanCollide = false
839
						effect.CFrame = handle.CFrame
840
						effect.Size = handle.Size
841
						coroutine.wrap(function()
842
							for i = 1,40 do
843
								effect.Transparency = effect.Transparency + 0.025
844
								effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
845
								runservice.Stepped:wait()
846
							end
847
							effect:destroy()
848
						end)()
849
					end
850
					if count == 90 then
851
						attacktype = 2
852
						local effect = Instance.new("Part", workspace)
853
						effect.Material = "ForceField"
854
						effect.BrickColor = BrickColor.new("Really red")
855
						effect.Anchored = true
856
						effect.CanCollide = false
857
						effect.CFrame = handle.CFrame
858
						effect.Size = handle.Size
859
						coroutine.wrap(function()
860
							for i = 1,40 do
861
								effect.Transparency = effect.Transparency + 0.025
862
								effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02)
863
								runservice.Stepped:wait()
864
							end
865
							effect:destroy()
866
						end)()
867
					end
868
					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)
869
					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)
870
					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)
871
					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)
872
					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)
873
				end
874
			end)()
875
		end
876
	end
877
end)
878
--
879
tool.Equipped:connect(function()
880
	equipped = true
881
	trail.Enabled = false
882
	cananimate = true
883
	canattack = false
884
	handle.Transparency = 1
885
	owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
886
	character = owner.Character
887
	local rightarm = Instance.new("Weld", character.Torso)
888
	rightarm.Part0 = character.Torso
889
	rightarm.Part1 = character["Right Arm"]
890
	rightarm.C0 = CFrame.new(1.5,0,0)
891
	rightarm.Name = "RightArmWeldbat"
892
	local leftarm = Instance.new("Weld", character.Torso)
893
	leftarm.Part0 = character.Torso
894
	leftarm.Part1 = character["Left Arm"]
895
	leftarm.C0 = CFrame.new(-1.5,0,0)
896
	leftarm.Name = "LeftArmWeldbat"
897
	local head = Instance.new("Weld", character.Torso)
898
	head.Part0 = character.Torso
899
	head.Part1 = character.Head
900
	head.C0 = CFrame.new(0,1.5,0)
901
	head.Name = "HeadWeldbat"
902
	local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
903
	humanoidrootpart.Part0 = character.HumanoidRootPart
904
	humanoidrootpart.Part1 = character.Torso
905
	humanoidrootpart.Name = "HumanoidRootPartWeldbat"
906
	for i = 0,1 , 0.05 do
907
		humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(25),0),i)
908
		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)
909
		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)
910
		runservice.Stepped:wait()
911
	end
912
	local grip = character["Right Arm"]:WaitForChild("RightGrip")
913
	grip.Part1 = nil
914
	local weldd = Instance.new("Weld", handle)
915
	weldd.Part0 = character["Left Arm"]
916
	weldd.Part1 = handle
917
	weldd.Name = "AIDS"
918
	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)
919
	cananimate = true
920
	if character:findFirstChild("BatBack") then
921
		character:findFirstChild("BatBack").Transparency = 1
922
	end
923
	handle.Transparency = 0
924
	equipsound:Play()
925
	local WHEN = 0
926
	coroutine.wrap(function()
927
		while runservice.Stepped:wait() and equipped do
928
			if cananimate then
929
				if WHEN < 40 then
930
					WHEN = WHEN + 1
931
				elseif WHEN == 40 then
932
					WHEN = 41
933
					grip.Part1 = handle
934
					canattack = true
935
					weldd:destroy()
936
				end
937
				tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),0.1)
938
				head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1)
939
				humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1)
940
				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)
941
				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)
942
			end
943
		end
944
	end)()
945
end)
946
tool.Unequipped:connect(function()
947
	equipped = false
948
	mouseclick = false
949
	cananimate = false
950
	if character.Torso:findFirstChild("LeftArmWeldbat") then
951
		character.Torso:findFirstChild("LeftArmWeldbat"):destroy()
952
	end
953
	if character.Torso:findFirstChild("RightArmWeldbat") then
954
		character.Torso:findFirstChild("RightArmWeldbat"):destroy()
955
	end
956
	if character.Torso:findFirstChild("HeadWeldbat") then
957
		character.Torso:findFirstChild("HeadWeldbat"):destroy()
958
	end
959
	if character:findFirstChild("HumanoidRootPart") then
960
		if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") then
961
			character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat"):destroy()
962
		end
963
	end
964
	if not character:findFirstChild("BatBack") then
965
		local clone = handle:Clone()
966
		clone:BreakJoints()
967
		for i,v in pairs(clone:GetDescendants()) do
968
			if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then
969
				v:destroy()
970
			end
971
		end
972
		local weld = Instance.new("Weld", clone)
973
		weld.Part0 = character.Torso
974
		weld.Part1 = clone
975
		weld.C0 = CFrame.new(0,0,0.55)
976
		weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,math.pi/2)
977
		weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi,math.rad(60)+math.pi,0)
978
		clone.Parent = character
979
		clone.Name = "BatBack"
980
	else
981
		character:findFirstChild("BatBack").Transparency = 0
982
	end
983
	handle.Transparency = 1
984
	character.BatBack:findFirstChildOfClass("SpecialMesh").TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId
985
end)
986
end)()