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 | 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) |
670 | + | tool.Grip = tool.Grip:l |
671 | erp(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 | elseif attacktype == 2 then | |
693 | damage("u die lol", 80,500, 0.5) | |
694 | end | |
695 | 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) | |
696 | 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) | |
697 | 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) | |
698 | 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) | |
699 | 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) | |
700 | runservice.Stepped:wait() | |
701 | end | |
702 | trail.Enabled = false | |
703 | attacknumber = 1 | |
704 | end | |
705 | cananimate = true | |
706 | canattack = true | |
707 | end | |
708 | end) | |
709 | tool.Activated:connect(function() | |
710 | if owner ~= nil and character ~= nil and canattack then | |
711 | cananimate = false | |
712 | canattack = false | |
713 | attacktype = 0 | |
714 | count = 0 | |
715 | local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat") | |
716 | local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat") | |
717 | local headweld = character.Torso:findFirstChild("HeadWeldbat") | |
718 | local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") | |
719 | if handle:findFirstChild("AIDS") then | |
720 | handle.AIDS:destroy() | |
721 | local grip = character["Right Arm"]:WaitForChild("RightGrip") | |
722 | grip.Part1 = handle | |
723 | end | |
724 | for i,v in pairs(workspace:GetDescendants()) do | |
725 | if v.ClassName == "Model" and v ~= character then | |
726 | local humanoid = v:findFirstChildOfClass("Humanoid") | |
727 | local headepic = v:findFirstChild("Head") | |
728 | if humanoid and headepic then | |
729 | if (headepic.Position - character.HumanoidRootPart.Position).magnitude < 6 and humanoid.PlatformStand and humanoid.Health > 0 then | |
730 | local rightlegweld = Instance.new("Weld", character.Torso) | |
731 | rightlegweld.Part0 = character.Torso | |
732 | rightlegweld.Part1 = character["Right Leg"] | |
733 | rightlegweld.C0 = CFrame.new(0.5,-2,0) | |
734 | rightlegweld.Name = "RightLegWeldbat" | |
735 | local leftlegweld = Instance.new("Weld", character.Torso) | |
736 | leftlegweld.Part0 = character.Torso | |
737 | leftlegweld.Part1 = character["Left Leg"] | |
738 | leftlegweld.C0 = CFrame.new(-0.5,-2,0) | |
739 | leftlegweld.Name = "LeftLegWeldbat" | |
740 | character:findFirstChildOfClass("Humanoid").WalkSpeed = 0 | |
741 | for i = 0,1 , 0.05 do | |
742 | cananimate = false | |
743 | canattack = false | |
744 | character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, Vector3.new(headepic.Position.x,character.HumanoidRootPart.Position.y,headepic.Position.z)) | |
745 | 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) | |
746 | 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) | |
747 | 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) | |
748 | 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) | |
749 | 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) | |
750 | 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) | |
751 | 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) | |
752 | runservice.Stepped:wait() | |
753 | end | |
754 | trail.Enabled = true | |
755 | for i = 0,1 , 0.12 do | |
756 | damage("vibe check", 0, 0, 1) | |
757 | 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) | |
758 | 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) | |
759 | 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) | |
760 | 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) | |
761 | 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) | |
762 | 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) | |
763 | 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) | |
764 | runservice.Stepped:wait() | |
765 | end | |
766 | coroutine.wrap(function() | |
767 | for i = 0,1 ,0.07 do | |
768 | leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i) | |
769 | rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i) | |
770 | runservice.Stepped:wait() | |
771 | end | |
772 | leftlegweld:destroy() | |
773 | rightlegweld:destroy() | |
774 | character:findFirstChildOfClass("Humanoid").WalkSpeed = 16 | |
775 | end)() | |
776 | trail.Enabled = false | |
777 | cananimate = true | |
778 | canattack = true | |
779 | return | |
780 | end | |
781 | end | |
782 | end | |
783 | end | |
784 | if attacknumber == 1 then | |
785 | coroutine.wrap(function() | |
786 | while runservice.Stepped:wait() and mouseclick do | |
787 | count = count + 1 | |
788 | if count == 50 then | |
789 | attacktype = 1 | |
790 | local effect = Instance.new("Part", workspace) | |
791 | effect.Material = "ForceField" | |
792 | effect.BrickColor = BrickColor.new("Institutional white") | |
793 | effect.Anchored = true | |
794 | effect.CanCollide = false | |
795 | effect.CFrame = handle.CFrame | |
796 | effect.Size = handle.Size | |
797 | coroutine.wrap(function() | |
798 | for i = 1,40 do | |
799 | effect.Transparency = effect.Transparency + 0.025 | |
800 | effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) | |
801 | runservice.Stepped:wait() | |
802 | end | |
803 | effect:destroy() | |
804 | end)() | |
805 | end | |
806 | if count == 90 then | |
807 | attacktype = 2 | |
808 | local effect = Instance.new("Part", workspace) | |
809 | effect.Material = "ForceField" | |
810 | effect.BrickColor = BrickColor.new("Really red") | |
811 | effect.Anchored = true | |
812 | effect.CanCollide = false | |
813 | effect.CFrame = handle.CFrame | |
814 | effect.Size = handle.Size | |
815 | coroutine.wrap(function() | |
816 | for i = 1,40 do | |
817 | effect.Transparency = effect.Transparency + 0.025 | |
818 | effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) | |
819 | runservice.Stepped:wait() | |
820 | end | |
821 | effect:destroy() | |
822 | end)() | |
823 | end | |
824 | 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) | |
825 | 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) | |
826 | 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) | |
827 | 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) | |
828 | 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) | |
829 | end | |
830 | end)() | |
831 | elseif attacknumber == 2 then | |
832 | coroutine.wrap(function() | |
833 | while runservice.Stepped:wait() and mouseclick do | |
834 | count = count + 1 | |
835 | if count == 50 then | |
836 | attacktype = 1 | |
837 | local effect = Instance.new("Part", workspace) | |
838 | effect.Material = "ForceField" | |
839 | effect.BrickColor = BrickColor.new("Institutional white") | |
840 | effect.Anchored = true | |
841 | effect.CanCollide = false | |
842 | effect.CFrame = handle.CFrame | |
843 | effect.Size = handle.Size | |
844 | coroutine.wrap(function() | |
845 | for i = 1,40 do | |
846 | effect.Transparency = effect.Transparency + 0.025 | |
847 | effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) | |
848 | runservice.Stepped:wait() | |
849 | end | |
850 | effect:destroy() | |
851 | end)() | |
852 | end | |
853 | if count == 90 then | |
854 | attacktype = 2 | |
855 | local effect = Instance.new("Part", workspace) | |
856 | effect.Material = "ForceField" | |
857 | effect.BrickColor = BrickColor.new("Really red") | |
858 | effect.Anchored = true | |
859 | effect.CanCollide = false | |
860 | effect.CFrame = handle.CFrame | |
861 | effect.Size = handle.Size | |
862 | coroutine.wrap(function() | |
863 | for i = 1,40 do | |
864 | effect.Transparency = effect.Transparency + 0.025 | |
865 | effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) | |
866 | runservice.Stepped:wait() | |
867 | end | |
868 | effect:destroy() | |
869 | end)() | |
870 | end | |
871 | 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) | |
872 | 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) | |
873 | 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) | |
874 | 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) | |
875 | 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) | |
876 | end | |
877 | end)() | |
878 | end | |
879 | end | |
880 | end) | |
881 | -- | |
882 | tool.Equipped:connect(function() | |
883 | equipped = true | |
884 | trail.Enabled = false | |
885 | cananimate = true | |
886 | canattack = false | |
887 | handle.Transparency = 1 | |
888 | owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent) | |
889 | character = owner.Character | |
890 | local rightarm = Instance.new("Weld", character.Torso) | |
891 | rightarm.Part0 = character.Torso | |
892 | rightarm.Part1 = character["Right Arm"] | |
893 | rightarm.C0 = CFrame.new(1.5,0,0) | |
894 | rightarm.Name = "RightArmWeldbat" | |
895 | local leftarm = Instance.new("Weld", character.Torso) | |
896 | leftarm.Part0 = character.Torso | |
897 | leftarm.Part1 = character["Left Arm"] | |
898 | leftarm.C0 = CFrame.new(-1.5,0,0) | |
899 | leftarm.Name = "LeftArmWeldbat" | |
900 | local head = Instance.new("Weld", character.Torso) | |
901 | head.Part0 = character.Torso | |
902 | head.Part1 = character.Head | |
903 | head.C0 = CFrame.new(0,1.5,0) | |
904 | head.Name = "HeadWeldbat" | |
905 | local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart) | |
906 | humanoidrootpart.Part0 = character.HumanoidRootPart | |
907 | humanoidrootpart.Part1 = character.Torso | |
908 | humanoidrootpart.Name = "HumanoidRootPartWeldbat" | |
909 | for i = 0,1 , 0.05 do | |
910 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(25),0),i) | |
911 | 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) | |
912 | 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) | |
913 | runservice.Stepped:wait() | |
914 | end | |
915 | local grip = character["Right Arm"]:WaitForChild("RightGrip") | |
916 | grip.Part1 = nil | |
917 | local weldd = Instance.new("Weld", handle) | |
918 | weldd.Part0 = character["Left Arm"] | |
919 | weldd.Part1 = handle | |
920 | weldd.Name = "AIDS" | |
921 | 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) | |
922 | cananimate = true | |
923 | if character:findFirstChild("BatBack") then | |
924 | character:findFirstChild("BatBack").Transparency = 1 | |
925 | end | |
926 | handle.Transparency = 0 | |
927 | equipsound:Play() | |
928 | local WHEN = 0 | |
929 | coroutine.wrap(function() | |
930 | while runservice.Stepped:wait() and equipped do | |
931 | if cananimate then | |
932 | if WHEN < 40 then | |
933 | WHEN = WHEN + 1 | |
934 | elseif WHEN == 40 then | |
935 | WHEN = 41 | |
936 | grip.Part1 = handle | |
937 | canattack = true | |
938 | weldd:destroy() | |
939 | end | |
940 | tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),0.1) | |
941 | head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1) | |
942 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1) | |
943 | 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) | |
944 | 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) | |
945 | end | |
946 | end | |
947 | end)() | |
948 | end) | |
949 | tool.Unequipped:connect(function() | |
950 | equipped = false | |
951 | mouseclick = false | |
952 | cananimate = false | |
953 | if character.Torso:findFirstChild("LeftArmWeldbat") then | |
954 | character.Torso:findFirstChild("LeftArmWeldbat"):destroy() | |
955 | end | |
956 | if character.Torso:findFirstChild("RightArmWeldbat") then | |
957 | character.Torso:findFirstChild("RightArmWeldbat"):destroy() | |
958 | end | |
959 | if character.Torso:findFirstChild("HeadWeldbat") then | |
960 | character.Torso:findFirstChild("HeadWeldbat"):destroy() | |
961 | end | |
962 | if character:findFirstChild("HumanoidRootPart") then | |
963 | if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") then | |
964 | character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat"):destroy() | |
965 | end | |
966 | end | |
967 | if not character:findFirstChild("BatBack") then | |
968 | local clone = handle:Clone() | |
969 | clone:BreakJoints() | |
970 | for i,v in pairs(clone:GetDescendants()) do | |
971 | if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then | |
972 | v:destroy() | |
973 | end | |
974 | end | |
975 | local weld = Instance.new("Weld", clone) | |
976 | weld.Part0 = character.Torso | |
977 | weld.Part1 = clone | |
978 | weld.C0 = CFrame.new(0,0,0.55) | |
979 | weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,math.pi/2) | |
980 | weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi,math.rad(60)+math.pi,0) | |
981 | clone.Parent = character | |
982 | clone.Name = "BatBack" | |
983 | else | |
984 | character:findFirstChild("BatBack").Transparency = 0 | |
985 | end | |
986 | handle.Transparency = 1 | |
987 | character.BatBack:findFirstChildOfClass("SpecialMesh").TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId | |
988 | end) | |
989 | end)() |