SHOW:
|
|
- or go back to the newest paste.
1 | wait(0.016666666666667) | |
2 | Anim = nil | |
3 | cf = CFrame.new | |
4 | function c3(cz, cx, cc) | |
5 | return Color3.new(cz / 255, cx / 255, cc / 255) | |
6 | end | |
7 | angles = CFrame.Angles | |
8 | Player = game.Players.LocalPlayer | |
9 | Character = Player.Character | |
10 | Humanoid = Character.Humanoid | |
11 | mouse = Player:GetMouse() | |
12 | local LeftArm = Character["Left Arm"] | |
13 | RightArm = Character["Right Arm"] | |
14 | LeftLeg = Character["Left Leg"] | |
15 | RightLeg = Character["Right Leg"] | |
16 | Head = Character.Head | |
17 | Torso = Character.Torso | |
18 | RootPart = Character.HumanoidRootPart | |
19 | RootJoint = RootPart.RootJoint | |
20 | Humanoid.Animator:Destroy() | |
21 | Character:WaitForChild("Animate"):Destroy() | |
22 | NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
23 | RootCF = angles(-1.57, 0, 3.14) | |
24 | LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
25 | LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
26 | RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
27 | RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
28 | RW = Instance.new("Weld") | |
29 | LW = Instance.new("Weld") | |
30 | RH = Torso["Right Hip"] | |
31 | LH = Torso["Left Hip"] | |
32 | Neck = Torso.Neck | |
33 | RSH = Torso["Right Shoulder"] | |
34 | LSH = Torso["Left Shoulder"] | |
35 | RSH.Parent = nil | |
36 | LSH.Parent = nil | |
37 | RW.Name = "Right Shoulder" | |
38 | RW.Part0 = Torso | |
39 | RW.C0 = cf(1.5, 0.5, 0) | |
40 | RW.C1 = cf(0, 0.5, 0) | |
41 | RW.Part1 = RightArm | |
42 | RW.Parent = Torso | |
43 | LW.Name = "Left Shoulder" | |
44 | LW.Part0 = Torso | |
45 | LW.C0 = cf(-1.5, 0.5, 0) | |
46 | LW.C1 = cf(0, 0.5, 0) | |
47 | LW.Part1 = LeftArm | |
48 | LW.Parent = Torso | |
49 | sound = Instance.new("Sound", head) | |
50 | sound.SoundId = "rbxassetid://" | |
51 | sound.Volume = 1 | |
52 | sound:Play() | |
53 | sound.Looped = true | |
54 | Effects = Instance.new("Folder", Character) | |
55 | Effects.Name = "Effects" | |
56 | Humanoid.WalkSpeed = 16 | |
57 | partEffects, AttackHas, AttackNeeded, AttackCan = {}, {}, {}, {} | |
58 | AttackHas[1], AttackHas[2], AttackHas[3], AttackHas[4] = 1, 1, 1, 1 | |
59 | AttackNeeded[1], AttackNeeded[2], AttackNeeded[3], AttackNeeded[4] = 1, 1, 1, 1 | |
60 | AttackCan[1], AttackCan[2], AttackCan[3], AttackCan[4] = true, true, true, true | |
61 | sine = 0 | |
62 | attackcounter = 1 | |
63 | energyslashcounter = 1 | |
64 | torvel = nil | |
65 | attacking = false | |
66 | hitfloor, posfloor = nil, nil | |
67 | tool = nil | |
68 | if script.Parent.ClassName == "HopperBin" then | |
69 | tool = script.Parent | |
70 | tool.Parent = Player.Backpack | |
71 | else | |
72 | tool = Instance.new("HopperBin", Player.Backpack) | |
73 | tool.Name = "Toy Knife" | |
74 | end | |
75 | Player.Chatted:connect(function(message) | |
76 | if message:sub(1,4) == "Play" then | |
77 | sound:Stop() | |
78 | sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6) | |
79 | sound:Play() | |
80 | end | |
81 | end) | |
82 | hitbox = Instance.new("Part") | |
83 | hitbox.BrickColor = BrickColor.Black() | |
84 | hitbox.Transparency = 1 | |
85 | hitbox.CanCollide = false | |
86 | hitbox.Anchored = false | |
87 | hitbox.Size = Vector3.new(3, 3, 4) | |
88 | meshes = { | |
89 | 3270017, | |
90 | 20329976, | |
91 | 448386996, | |
92 | 1095708, | |
93 | 1033714, | |
94 | 9756362 | |
95 | } | |
96 | sounds = { | |
97 | { | |
98 | 320557413, | |
99 | 320557453, | |
100 | 320557487, | |
101 | 320557518, | |
102 | 320557537, | |
103 | 320557563, | |
104 | 233856146, | |
105 | 233856140 | |
106 | }, | |
107 | { | |
108 | 234365549, | |
109 | 234365573, | |
110 | 231917961, | |
111 | 231917950, | |
112 | 231917856, | |
113 | 231917863, | |
114 | 231917871 | |
115 | }, | |
116 | { | |
117 | 262562442, | |
118 | 231917806, | |
119 | 231917784 | |
120 | }, | |
121 | { | |
122 | 262562442, | |
123 | 233856048, | |
124 | 306247739 | |
125 | } | |
126 | } | |
127 | local LSounds = { | |
128 | MegaloStrikesBack = Instance.new("Sound") | |
129 | } | |
130 | ||
131 | LSounds.MegaloStrikesBack.SoundId = "http://www.roblox.com/asset?id=971019793" | |
132 | ArtificialHB = Instance.new("BindableEvent", script) | |
133 | ArtificialHB.Name = "Heartbeat" | |
134 | script:WaitForChild("Heartbeat") | |
135 | frame = 0.025 | |
136 | tf = 0 | |
137 | allowframeloss = true | |
138 | tossremainder = false | |
139 | lastframe = tick() | |
140 | script.Heartbeat:Fire() | |
141 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
142 | tf = tf + s | |
143 | if tf >= frame then | |
144 | if allowframeloss then | |
145 | script.Heartbeat:Fire() | |
146 | lastframe = tick() | |
147 | else | |
148 | for i = 1, math.floor(tf / frame) do | |
149 | script.Heartbeat:Fire() | |
150 | end | |
151 | lastframe = tick() | |
152 | end | |
153 | if tossremainder then | |
154 | tf = 0 | |
155 | else | |
156 | tf = tf - frame * math.floor(tf / frame) | |
157 | end | |
158 | end | |
159 | end) | |
160 | function swait(num) | |
161 | if num == 0 or num == nil then | |
162 | ArtificialHB.Event:wait() | |
163 | else | |
164 | for i = 0, num do | |
165 | ArtificialHB.Event:wait() | |
166 | end | |
167 | end | |
168 | end | |
169 | function thread(f) | |
170 | coroutine.resume(coroutine.create(f)) | |
171 | end | |
172 | function clerp(a, b, t) | |
173 | local qa = { | |
174 | QuaternionFromCFrame(a) | |
175 | } | |
176 | local qb = { | |
177 | QuaternionFromCFrame(b) | |
178 | } | |
179 | local ax, ay, az = a.x, a.y, a.z | |
180 | local bx, by, bz = b.x, b.y, b.z | |
181 | local _t = 1 - t | |
182 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
183 | end | |
184 | function QuaternionFromCFrame(cf) | |
185 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
186 | local trace = m00 + m11 + m22 | |
187 | if trace > 0 then | |
188 | local s = math.sqrt(1 + trace) | |
189 | local recip = 0.5 / s | |
190 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
191 | else | |
192 | local i = 0 | |
193 | if m00 < m11 then | |
194 | i = 1 | |
195 | end | |
196 | if m22 > (i == 0 and m00 or m11) then | |
197 | i = 2 | |
198 | end | |
199 | if i == 0 then | |
200 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
201 | local recip = 0.5 / s | |
202 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
203 | elseif i == 1 then | |
204 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
205 | local recip = 0.5 / s | |
206 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
207 | elseif i == 2 then | |
208 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
209 | local recip = 0.5 / s | |
210 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
211 | end | |
212 | end | |
213 | end | |
214 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
215 | local xs, ys, zs = x + x, y + y, z + z | |
216 | local wx, wy, wz = w * xs, w * ys, w * zs | |
217 | local xx = x * xs | |
218 | local xy = x * ys | |
219 | local xz = x * zs | |
220 | local yy = y * ys | |
221 | local yz = y * zs | |
222 | local zz = z * zs | |
223 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
224 | end | |
225 | function QuaternionSlerp(a, b, t) | |
226 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
227 | local startInterp, finishInterp | |
228 | if cosTheta >= 1.0E-4 then | |
229 | if 1 - cosTheta > 1.0E-4 then | |
230 | local theta = math.acos(cosTheta) | |
231 | local invSinTheta = 1 / math.sin(theta) | |
232 | startInterp = math.sin((1 - t) * theta) * invSinTheta | |
233 | finishInterp = math.sin(t * theta) * invSinTheta | |
234 | else | |
235 | startInterp = 1 - t | |
236 | finishInterp = t | |
237 | end | |
238 | elseif 1 + cosTheta > 1.0E-4 then | |
239 | local theta = math.acos(-cosTheta) | |
240 | local invSinTheta = 1 / math.sin(theta) | |
241 | startInterp = math.sin((t - 1) * theta) * invSinTheta | |
242 | finishInterp = math.sin(t * theta) * invSinTheta | |
243 | else | |
244 | startInterp = t - 1 | |
245 | finishInterp = t | |
246 | end | |
247 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
248 | end | |
249 | function rayCast(Pos, Dir, Max, Ignore) | |
250 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
251 | end | |
252 | function newPart(par, brick, transp, anch, canc, size, name, mat, ref) | |
253 | local p = Instance.new("Part") | |
254 | p.BrickColor = brick | |
255 | p.Transparency = transp | |
256 | p.Material = mat and mat or "SmoothPlastic" | |
257 | p.Reflectance = ref and ref or 0 | |
258 | p.Anchored = anch | |
259 | p.CanCollide = canc | |
260 | p.Size = size | |
261 | p.TopSurface, p.BottomSurface, p.LeftSurface, p.RightSurface, p.FrontSurface, p.BackSurface = 10, 10, 10, 10, 10, 10 | |
262 | p.Name = name | |
263 | p.CFrame = RootPart.CFrame | |
264 | p.Parent = par | |
265 | return p | |
266 | end | |
267 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
268 | local mesh = Instance.new(Mesh) | |
269 | mesh.Parent = part | |
270 | if Mesh == "SpecialMesh" then | |
271 | mesh.MeshType = meshtype | |
272 | if meshid then | |
273 | mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid | |
274 | end | |
275 | end | |
276 | if offset then | |
277 | mesh.Offset = offset | |
278 | end | |
279 | mesh.Scale = scale | |
280 | return mesh | |
281 | end | |
282 | function weld(parent, part0, part1, c0, c1) | |
283 | local weld = Instance.new("Weld") | |
284 | weld.Parent = parent | |
285 | weld.Part0 = part0 | |
286 | weld.Part1 = part1 | |
287 | weld.C0 = c0 | |
288 | if c1 then | |
289 | weld.C1 = c1 | |
290 | end | |
291 | return weld | |
292 | end | |
293 | function randomangles(r) | |
294 | local random = math.rad((math.random() - 0.5) * 180) | |
295 | local randomangles = CFrame.Angles(random, random, random) | |
296 | if r and r == 0 then | |
297 | return angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
298 | elseif r and r == 1 then | |
299 | return math.rad((math.random() - 0.5) * 180) | |
300 | elseif r and r == 2 then | |
301 | return math.random(-50, 50) | |
302 | else | |
303 | return randomangles | |
304 | end | |
305 | end | |
306 | function round(num) | |
307 | local a, b = math.modf(num) | |
308 | if num % 1 ~= 0 then | |
309 | return math.floor(num) + math.floor(b * 10 + 0.5) / 10 | |
310 | else | |
311 | return math.floor(num) | |
312 | end | |
313 | end | |
314 | function sound(id, par, vol, dur, pit) | |
315 | coroutine.resume(coroutine.create(function() | |
316 | local sou = Instance.new("Sound", par or workspace) | |
317 | sou.Volume = vol | |
318 | sou.Pitch = pit or 1 | |
319 | sou.SoundId = "http://www.roblox.com/asset/?id=" .. id | |
320 | swait() | |
321 | sou:play() | |
322 | wait(dur) | |
323 | sou:Destroy() | |
324 | end)) | |
325 | end | |
326 | function findCloseHumanoid(centre, distance) | |
327 | local tab = {} | |
328 | for _, child in pairs(game.Workspace:GetChildren()) do | |
329 | if child:findFirstChild("Humanoid") and child:findFirstChild("Humanoid") ~= Humanoid and child:findFirstChild("Torso") then | |
330 | local vtors = child.Torso | |
331 | local mag = math.abs((vtors.Position - centre).magnitude) | |
332 | if distance >= mag then | |
333 | table.insert(tab, child.Humanoid) | |
334 | end | |
335 | end | |
336 | end | |
337 | return tab | |
338 | end | |
339 | function basicDamage(vhum, damage, colour) | |
340 | if not vhum or not vhum.Parent:findFirstChild("Humanoid") or vhum.Health <= 0 then | |
341 | return | |
342 | end | |
343 | vhum.Health = vhum.Health - damage | |
344 | local damagepart = Instance.new("Part", Effects) | |
345 | damagepart.Transparency = 1 | |
346 | damagepart.Anchored = true | |
347 | damagepart.CanCollide = false | |
348 | damagepart.Size = Vector3.new(1, 1, 1) | |
349 | damagepart.Name = "DamagePart" | |
350 | damagepart.CFrame = vhum.Parent.Head.CFrame * CFrame.new(0, 1, 0) | |
351 | local g = Instance.new("BillboardGui", damagepart) | |
352 | g.Enabled = true | |
353 | g.Adornee = damagepart | |
354 | g.Size = UDim2.new(5, 0, 5, 0) | |
355 | g.ExtentsOffset = Vector3.new(0, 0, 0) | |
356 | g.StudsOffset = Vector3.new(0, 0, 0) | |
357 | local t = Instance.new("TextLabel", g) | |
358 | t.BackgroundTransparency = 1 | |
359 | t.Font = "ArialBold" | |
360 | t.TextSize = 24 | |
361 | t.Text = "-" .. round(damage) | |
362 | if round(damage) % 1 == 0 then | |
363 | t.Text = "-" .. round(damage) .. ".0" | |
364 | end | |
365 | t.Size = UDim2.new(1, 0, 1, 0) | |
366 | t.TextStrokeTransparency = 0 | |
367 | t.TextTransparency = 0 | |
368 | t.TextScaled = true | |
369 | t.TextWrapped = true | |
370 | t.TextXAlignment = "Center" | |
371 | t.TextYAlignment = "Center" | |
372 | t.TextColor3 = colour | |
373 | coroutine.resume(coroutine.create(function() | |
374 | for i = 1, 50 do | |
375 | game:GetService("RunService").Heartbeat:wait() | |
376 | local sinewave = math.sin(i / 500) * 4 | |
377 | damagepart.CFrame = damagepart.CFrame * CFrame.new(Vector3.new(0, 0.3 - sinewave, 0)) | |
378 | t.TextTransparency = t.TextTransparency + 0.02 | |
379 | t.TextStrokeTransparency = t.TextTransparency + 0.02 | |
380 | end | |
381 | damagepart:Destroy() | |
382 | end), t) | |
383 | end | |
384 | function magic(type, thing) | |
385 | local magicBlock = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay, t) | |
386 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
387 | prt.CFrame = cframe | |
388 | local msh = mesh("BlockMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
389 | game:GetService("Debris"):AddItem(prt, 8) | |
390 | if t == 1 or t == nil then | |
391 | table.insert(partEffects, { | |
392 | prt, | |
393 | "Block1", | |
394 | delay, | |
395 | x3, | |
396 | y3, | |
397 | z3, | |
398 | msh | |
399 | }) | |
400 | elseif t == 2 then | |
401 | table.insert(partEffects, { | |
402 | prt, | |
403 | "Block2", | |
404 | delay, | |
405 | x3, | |
406 | y3, | |
407 | z3, | |
408 | msh | |
409 | }) | |
410 | end | |
411 | end | |
412 | local magicCylinder = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
413 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
414 | local msh = mesh("CylinderMesh", prt, nil, nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
415 | game:GetService("Debris"):AddItem(prt, 8) | |
416 | table.insert(partEffects, { | |
417 | prt, | |
418 | "Cylinder", | |
419 | delay, | |
420 | x3, | |
421 | y3, | |
422 | z3, | |
423 | msh | |
424 | }) | |
425 | end | |
426 | local magicSphere = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
427 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
428 | local msh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
429 | game:GetService("Debris"):AddItem(prt, 8) | |
430 | table.insert(partEffects, { | |
431 | prt, | |
432 | "Cylinder", | |
433 | delay, | |
434 | x3, | |
435 | y3, | |
436 | z3, | |
437 | msh | |
438 | }) | |
439 | end | |
440 | local magicRing = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
441 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", "SmoothPlastic", cframe) | |
442 | prt.Anchored = true | |
443 | prt.CFrame = cframe | |
444 | local msh = mesh("SpecialMesh", prt, "FileMesh", 3270017, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
445 | game:GetService("Debris"):AddItem(prt, 2) | |
446 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
447 | for i = 0, 1, delay do | |
448 | swait() | |
449 | Part.Transparency = i | |
450 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
451 | end | |
452 | Part:Destroy() | |
453 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
454 | end | |
455 | local magicSlash = function(par, brick, cframe, x1, y1, z1, x3, y3, z3, delay) | |
456 | local prt = newPart(par, brick, 0, true, false, Vector3.new(), "Part", cframe) | |
457 | prt.Anchored = true | |
458 | prt.CFrame = cframe | |
459 | local msh = mesh("SpecialMesh", prt, "FileMesh", 20329976, Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
460 | game:GetService("Debris"):AddItem(prt, 2) | |
461 | coroutine.resume(coroutine.create(function(Part, Mesh, num) | |
462 | for i = 0, 1, delay do | |
463 | swait() | |
464 | Part.Transparency = i | |
465 | Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3) | |
466 | end | |
467 | Part:Destroy() | |
468 | end), prt, msh, (math.random(0, 1) + math.random()) / 5) | |
469 | end | |
470 | local par = thing[1] | |
471 | local brick = thing[2] | |
472 | local cframe = thing[3] | |
473 | local x1 = thing[4] | |
474 | local y1 = thing[5] | |
475 | local z1 = thing[6] | |
476 | local x3 = thing[7] | |
477 | local y3 = thing[8] | |
478 | local z3 = thing[9] | |
479 | local delay = thing[10] | |
480 | local t = thing[11] | |
481 | if type == "Block" or type == 1 then | |
482 | magicBlock(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
483 | elseif type == "Cylinder" or type == 2 then | |
484 | magicCylinder(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
485 | elseif type == "Sphere" or type == 3 then | |
486 | magicSphere(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
487 | elseif type == "Ring" or type == 4 then | |
488 | magicRing(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
489 | elseif type == "Slash" or type == 5 then | |
490 | magicSlash(thing[1], thing[2], thing[3], thing[4], thing[5], thing[6], thing[7], thing[8], thing[9], thing[10], thing[11]) | |
491 | end | |
492 | end | |
493 | function newFrame(par, bg, transp, size, pos, name) | |
494 | local f = Instance.new("Frame", nil) | |
495 | f.BackgroundColor3 = bg | |
496 | f.BackgroundTransparency = transp | |
497 | f.BorderSizePixel = 0 | |
498 | f.Position = pos | |
499 | f.Size = size | |
500 | f.Name = name | |
501 | f.Parent = par | |
502 | return f | |
503 | end | |
504 | function newLabel(par, size, pos, text, textsize, text3, textstroke3, scaled, name) | |
505 | local l = Instance.new("TextLabel", nil) | |
506 | l.BackgroundTransparency = 1 | |
507 | l.Size = size | |
508 | l.Position = pos | |
509 | l.Text = text | |
510 | l.TextSize = textsize | |
511 | l.TextColor3 = text3 | |
512 | l.TextStrokeColor3 = textstroke3 | |
513 | if scaled then | |
514 | l.TextScaled = scaled | |
515 | else | |
516 | l.TextScaled = true | |
517 | end | |
518 | l.TextStrokeTransparency = 0 | |
519 | l.Name = name | |
520 | l.Parent = par | |
521 | return l | |
522 | end | |
523 | a1t = "Anger" | |
524 | a2t = "Power" | |
525 | a3t = "Hate" | |
526 | a4t = "Determination" | |
527 | backc3 = c3(107, 107, 107) | |
528 | reloc3 = c3(62, 62, 62) | |
529 | g = Instance.new("ScreenGui") | |
530 | f1 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.85, 0), "") | |
531 | f2 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.76, 0), "") | |
532 | f3 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.67, 0), "") | |
533 | f4 = newFrame(g, backc3, 0.5, UDim2.new(0.18, 0, 0.08, 0), UDim2.new(0.8, 0, 0.58, 0), "") | |
534 | newFrame(f1, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
535 | newFrame(f2, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
536 | newFrame(f3, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
537 | newFrame(f4, reloc3, 0, UDim2.new(1.002, 0, 1.002, 0), UDim2.new(0, 0, 0, 0), "Reload") | |
538 | newLabel(f1, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(Z)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
539 | newLabel(f2, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(X)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
540 | newLabel(f3, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(C)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
541 | newLabel(f4, UDim2.new(1, 0, 0.4, 0), UDim2.new(0, 0, 0, 0), "(V)", 18, c3(243, 242, 242), c3(0, 0, 0), true, "Key") | |
542 | newLabel(f1, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a1t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
543 | newLabel(f2, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a2t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
544 | newLabel(f3, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a3t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
545 | newLabel(f4, UDim2.new(1, 0, 0.6, 0), UDim2.new(0, 0, 0.4, 0), a4t, 18, c3(243, 242, 242), c3(0, 0, 0), true, "Label") | |
546 | g.Parent = Player.PlayerGui | |
547 | Reload = {} | |
548 | Reload[1] = f1.Reload | |
549 | Reload[2] = f2.Reload | |
550 | Reload[3] = f3.Reload | |
551 | Reload[4] = f4.Reload | |
552 | weapon = Instance.new("Model", Character) | |
553 | weapon.Name = "Toy Knife" | |
554 | p0 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
555 | mesh("BlockMesh", p0, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 2.39999986, 6.57500076)) | |
556 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
557 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005)) | |
558 | p1 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p1") | |
559 | mesh("SpecialMesh", p1, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.425000012, 1.70000005)) | |
560 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
561 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105)) | |
562 | p2 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p2") | |
563 | mesh("BlockMesh", p2, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.999999881, 3.02500105)) | |
564 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
565 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064)) | |
566 | p3 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p3") | |
567 | mesh("BlockMesh", p3, nil, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.974999905, 1.70000064)) | |
568 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
569 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005)) | |
570 | p4 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p4") | |
571 | mesh("SpecialMesh", p4, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 1.32500005)) | |
572 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Part") | |
573 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083)) | |
574 | p5 = newPart(weapon, BrickColor.new("Institutional white"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p5") | |
575 | mesh("SpecialMesh", p5, Enum.MeshType.Wedge, nil, Vector3.new(0, 0, 0), Vector3.new(0.774999976, 0.975000024, 0.350000083)) | |
576 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "Handle") | |
577 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012)) | |
578 | p6 = newPart(weapon, BrickColor.new("Really black"), 0, false, false, Vector3.new(0.220000014, 0.220000014, 0.220000014), "p6") | |
579 | mesh("SpecialMesh", p6, Enum.MeshType.Cylinder, nil, Vector3.new(0, 0, 0), Vector3.new(5, 0.75, 0.800000012)) | |
580 | weld(p0, p0, p1, CFrame.new(-0.400014997, -2.90028477, 2.71900272, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
581 | weld(p1, p1, p2, CFrame.new(0.400014997, 2.68303514, 3.62925434, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
582 | weld(p2, p2, p3, CFrame.new(-0.400014997, -3.05428457, 3.77500391, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
583 | weld(p3, p3, p4, CFrame.new(-0.400014997, -2.83703494, 3.62925434, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
584 | weld(p4, p4, p5, CFrame.new(0.400014997, 2.83703494, 3.96200418, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1)) | |
585 | weld(p5, p5, p6, CFrame.new(0.400014997, 3.05703473, 4.14625359, -1, 0, 0, 0, -1, 0, 0, 0, 1), CFrame.new(1.48875475, 2.98278475, -0.400014997, 0, 4.37113883E-8, 1, 0, -1, 4.37113883E-8, 1, 0, 0)) | |
586 | handleweld = Instance.new("Weld", RightArm) | |
587 | handleweld.Part1 = RightArm | |
588 | handleweld.Part0 = p6 | |
589 | handlec0 = CFrame.new(0, -0.95, 0) * angles(0, math.pi / 2, math.pi) | |
590 | handleweld.C0 = handlec0 | |
591 | function attackone() | |
592 | attacking = true | |
593 | for i = 0, 1, 0.1 do | |
594 | swait() | |
595 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.4) | |
596 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.4) | |
597 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.4) | |
598 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
599 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
600 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
601 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
602 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
603 | end | |
604 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
605 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
606 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(120), math.rad(0)) | |
607 | delay(0.1, function() | |
608 | table.insert(partEffects, { | |
609 | smp, | |
610 | "Disappear", | |
611 | 0.05 | |
612 | }) | |
613 | end) | |
614 | sound(sounds[1][1], Character.Head, 1, 4, 1.5) | |
615 | local hitb = hitbox.Touched:connect(function(hit) | |
616 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
617 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
618 | return | |
619 | end | |
620 | local str = Instance.new("StringValue", hit.Parent) | |
621 | str.Name = "Hit" .. Player.Name | |
622 | game.Debris:AddItem(str, 0.3) | |
623 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
624 | end | |
625 | end) | |
626 | for i = 0, 1, 0.1 do | |
627 | swait() | |
628 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.4) | |
629 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.4) | |
630 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.4) | |
631 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
632 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
633 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
634 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
635 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
636 | hitbox.Parent = weapon | |
637 | hitbox.Size = Vector3.new(2, 5, 8) | |
638 | if smp then | |
639 | hitbox.CFrame = smp.CFrame | |
640 | else | |
641 | hitbox.Parent = nil | |
642 | end | |
643 | end | |
644 | hitb:disconnect() | |
645 | hitbox.Parent = nil | |
646 | attacking = false | |
647 | end | |
648 | function attacktwo() | |
649 | attacking = true | |
650 | for i = 0, 1, 0.1 do | |
651 | swait() | |
652 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
653 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
654 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
655 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
656 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
657 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
658 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
659 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
660 | end | |
661 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
662 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
663 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(80), math.rad(0)) | |
664 | delay(0.1, function() | |
665 | table.insert(partEffects, { | |
666 | smp, | |
667 | "Disappear", | |
668 | 0.05 | |
669 | }) | |
670 | end) | |
671 | sound(sounds[1][2], Character.Head, 1, 4, 1.5) | |
672 | local hitb = hitbox.Touched:connect(function(hit) | |
673 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
674 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
675 | return | |
676 | end | |
677 | local str = Instance.new("StringValue", hit.Parent) | |
678 | str.Name = "Hit" .. Player.Name | |
679 | game.Debris:AddItem(str, 0.3) | |
680 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
681 | end | |
682 | end) | |
683 | for i = 0, 1, 0.1 do | |
684 | swait() | |
685 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
686 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
687 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
688 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
689 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
690 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
691 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
692 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
693 | hitbox.Parent = weapon | |
694 | hitbox.Size = Vector3.new(2, 5, 8) | |
695 | if smp then | |
696 | hitbox.CFrame = smp.CFrame | |
697 | else | |
698 | hitbox.Parent = nil | |
699 | end | |
700 | end | |
701 | hitb:disconnect() | |
702 | hitbox.Parent = nil | |
703 | attacking = false | |
704 | end | |
705 | function attackthree() | |
706 | attacking = true | |
707 | for i = 0, 1, 0.1 do | |
708 | swait() | |
709 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
710 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.4) | |
711 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 0.4) | |
712 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
713 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
714 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
715 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
716 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
717 | end | |
718 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
719 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
720 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(-70), math.rad(0)) | |
721 | delay(0.1, function() | |
722 | table.insert(partEffects, { | |
723 | smp, | |
724 | "Disappear", | |
725 | 0.05 | |
726 | }) | |
727 | end) | |
728 | sound(sounds[1][3], Character.Head, 1, 4, 1.5) | |
729 | local hitb = hitbox.Touched:connect(function(hit) | |
730 | if hit.Parent ~= Character and hit.Parent:findFirstChild("Humanoid") then | |
731 | if hit.Parent:findFirstChild("Hit" .. Player.Name) then | |
732 | return | |
733 | end | |
734 | local str = Instance.new("StringValue", hit.Parent) | |
735 | str.Name = "Hit" .. Player.Name | |
736 | game.Debris:AddItem(str, 0.3) | |
737 | basicDamage(hit.Parent.Humanoid, math.random(9, 13), Color3.fromRGB(243, 242, 242)) | |
738 | end | |
739 | end) | |
740 | for i = 0, 1, 0.1 do | |
741 | swait() | |
742 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
743 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
744 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.8, 0.4) * angles(math.rad(0), math.rad(-40), math.rad(120)), 0.4) | |
745 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
746 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
747 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
748 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
749 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
750 | hitbox.Parent = weapon | |
751 | hitbox.Size = Vector3.new(2, 5, 8) | |
752 | if smp then | |
753 | hitbox.CFrame = smp.CFrame | |
754 | else | |
755 | hitbox.Parent = nil | |
756 | end | |
757 | end | |
758 | hitb:disconnect() | |
759 | hitbox.Parent = nil | |
760 | attacking = false | |
761 | end | |
762 | function rapidslash() | |
763 | attacking = true | |
764 | AttackHas[1] = 0 | |
765 | AttackCan[1] = false | |
766 | for i = 1, 3 do | |
767 | swait() | |
768 | for i = 0, 1, 0.2 do | |
769 | swait() | |
770 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(60)), 0.6) | |
771 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, math.rad(-60)), 0.6) | |
772 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.9, 0) * CFrame.Angles(math.rad(180), 0, math.rad(10)), 0.6) | |
773 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
774 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
775 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
776 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
777 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
778 | end | |
779 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
780 | do | |
781 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
782 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
783 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
784 | delay(0.1, function() | |
785 | table.insert(partEffects, { | |
786 | smp, | |
787 | "Disappear", | |
788 | 0.05 | |
789 | }) | |
790 | end) | |
791 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
792 | basicDamage(v, 6, c3(243, 242, 242)) | |
793 | end | |
794 | for i = 0, 1, 0.2 do | |
795 | swait() | |
796 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(80)), 0.6) | |
797 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-70)), 0.6) | |
798 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(45), math.rad(-65), math.rad(5)), 0.6) | |
799 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
800 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
801 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
802 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
803 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
804 | end | |
805 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
806 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
807 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
808 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
809 | delay(0.1, function() | |
810 | table.insert(partEffects, { | |
811 | smp, | |
812 | "Disappear", | |
813 | 0.05 | |
814 | }) | |
815 | end) | |
816 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
817 | basicDamage(v, 6, c3(243, 242, 242)) | |
818 | end | |
819 | for i = 0, 1, 0.2 do | |
820 | swait() | |
821 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
822 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(20), 0, math.rad(80)), 0.6) | |
823 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(-45)) * CFrame.Angles(math.rad(-25), 0, 0), 1) | |
824 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
825 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
826 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
827 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
828 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
829 | end | |
830 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
831 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
832 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
833 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
834 | delay(0.1, function() | |
835 | table.insert(partEffects, { | |
836 | smp, | |
837 | "Disappear", | |
838 | 0.05 | |
839 | }) | |
840 | end) | |
841 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
842 | basicDamage(v, 6, c3(243, 242, 242)) | |
843 | end | |
844 | for i = 0, 1, 0.2 do | |
845 | swait() | |
846 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.6) | |
847 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.6) | |
848 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.6) | |
849 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.6) | |
850 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
851 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.6) | |
852 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.6) | |
853 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.6) | |
854 | end | |
855 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
856 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
857 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
858 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
859 | delay(0.1, function() | |
860 | table.insert(partEffects, { | |
861 | smp, | |
862 | "Disappear", | |
863 | 0.05 | |
864 | }) | |
865 | end) | |
866 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
867 | basicDamage(v, 6, c3(243, 242, 242)) | |
868 | end | |
869 | for i = 0, 1, 0.2 do | |
870 | swait() | |
871 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.6) | |
872 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.6) | |
873 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.6) | |
874 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.6) | |
875 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
876 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 1) | |
877 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.6) | |
878 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.6) | |
879 | end | |
880 | sound(sounds[1][1], Character.Head, 1, 7, 1.5) | |
881 | local smp = newPart(Effects, BrickColor.new("Lily white"), 0, true, false, Vector3.new(), "Slash") | |
882 | mesh("SpecialMesh", smp, "FileMesh", meshes[3], Vector3.new(0, 0, 0), Vector3.new(0.002, 0.06, 0.06)) | |
883 | smp.CFrame = RootPart.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.rad(90), math.rad(math.random(-360, 360)), math.rad(0)) | |
884 | delay(0.1, function() | |
885 | table.insert(partEffects, { | |
886 | smp, | |
887 | "Disappear", | |
888 | 0.05 | |
889 | }) | |
890 | end) | |
891 | for i, v in pairs(findCloseHumanoid(smp.Position, 5)) do | |
892 | basicDamage(v, 6, c3(243, 242, 242)) | |
893 | end | |
894 | end | |
895 | end | |
896 | AttackCan[1] = true | |
897 | attacking = false | |
898 | end | |
899 | function powerslash() | |
900 | attacking = true | |
901 | AttackCan[2] = false | |
902 | AttackHas[2] = AttackHas[2] - 0.2 | |
903 | local orbs = {} | |
904 | if energyslashcounter == 1 then | |
905 | energyslashcounter = 2 | |
906 | sound(367453005, Character.Head, 1, 4, 1) | |
907 | do | |
908 | local now = RootPart.CFrame * CFrame.new(0, 0, -10) | |
909 | local bo = { | |
910 | BrickColor.new("Bright orange"), | |
911 | BrickColor.new("Toothpaste") | |
912 | } | |
913 | local bon = bo[math.random(1, 2)] | |
914 | for i = 1, 5 do | |
915 | local orb = newPart(Effects, bon, 0, true, false, Vector3.new(), "Orange", "SmoothPlastic", RootPart.CFrame * CFrame.new(0, 0, -15)) | |
916 | local omesh = mesh("SpecialMesh", orb, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5)) | |
917 | orb.CFrame = now * CFrame.new((math.random() - 0.5) * 20, 0, (math.random() - 0.5) * 20) | |
918 | table.insert(orbs, orb) | |
919 | end | |
920 | for i = 0, 1, 0.05 do | |
921 | swait() | |
922 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.15) | |
923 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(80)), 0.15) | |
924 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
925 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
926 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
927 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
928 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
929 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
930 | end | |
931 | for i = 1, #orbs do | |
932 | do | |
933 | local orb = orbs[i] | |
934 | table.insert(partEffects, { | |
935 | orb, | |
936 | "Block2", | |
937 | 0.05, | |
938 | 10, | |
939 | 10, | |
940 | 10, | |
941 | orb.Mesh | |
942 | }) | |
943 | thread(function() | |
944 | for i = 1, 3 do | |
945 | swait(5) | |
946 | for i, v in pairs(findCloseHumanoid(orb.Position, 10)) do | |
947 | if bon == BrickColor.new("Bright orange") then | |
948 | if (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude < 2 then | |
949 | basicDamage(v, 6, BrickColor.new("Bright orange").Color) | |
950 | end | |
951 | elseif bon == BrickColor.new("Toothpaste") and (v.Parent.Torso.Velocity * Vector3.new(1, 1, 1)).magnitude > 2 then | |
952 | basicDamage(v, 6, BrickColor.new("Toothpaste").Color) | |
953 | end | |
954 | end | |
955 | end | |
956 | end) | |
957 | end | |
958 | end | |
959 | sound(sounds[1][2], Character.Head, 1, 4, 0.8) | |
960 | for i = 0, 1, 0.1 do | |
961 | swait() | |
962 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
963 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(-5)), 0.4) | |
964 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
965 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
966 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
967 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
968 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
969 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
970 | end | |
971 | end | |
972 | elseif energyslashcounter == 2 then | |
973 | energyslashcounter = 3 | |
974 | sound(306247749, Character.Head, 1, 4, 1) | |
975 | local gparts = {} | |
976 | for i = 1, 9 do | |
977 | local gpart = newPart(Effects, BrickColor.new("Really red"), 0, true, false, Vector3.new(), "Violet", "SmoothPlastic") | |
978 | local gmesh = mesh("CylinderMesh", gpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(50, 10, 50)) | |
979 | gpart.CFrame = RootPart.CFrame * CFrame.new(math.random(-20, 20), -3, -15 + math.random(-20, 20)) | |
980 | table.insert(gparts, gpart) | |
981 | end | |
982 | for i = 0, 1, 0.05 do | |
983 | swait() | |
984 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
985 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
986 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, 0.4) * CFrame.Angles(math.rad(-45), math.rad(0), math.rad(15)) * CFrame.Angles(math.rad(0), 0, 0), 0.2) | |
987 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
988 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
989 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
990 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
991 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
992 | end | |
993 | for i = 1, #gparts do | |
994 | local gpart = gparts[i] | |
995 | table.insert(partEffects, { | |
996 | gpart, | |
997 | "Block2", | |
998 | 0.05, | |
999 | -1, | |
1000 | 50, | |
1001 | -1, | |
1002 | gpart.Mesh | |
1003 | }) | |
1004 | for i, v in pairs(findCloseHumanoid(gpart.Position, 10)) do | |
1005 | basicDamage(v, 15, BrickColor.new("Dark blue").Color) | |
1006 | local bv = Instance.new("BodyVelocity", v.Parent.Torso) | |
1007 | game.Debris:AddItem(bv, 1) | |
1008 | bv.Velocity = Vector3.new(0, 40, 0) | |
1009 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1010 | end | |
1011 | end | |
1012 | sound(sounds[1][3], Character.Head, 1, 4, 0.8) | |
1013 | for i = 0, 1, 0.1 do | |
1014 | swait() | |
1015 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-80)), 0.4) | |
1016 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(15), math.rad(0), math.rad(80)), 0.4) | |
1017 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, -0.4) * angles(math.rad(125), math.rad(-40), math.rad(60)), 0.4) | |
1018 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
1019 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1020 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1021 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
1022 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
1023 | end | |
1024 | elseif energyslashcounter == 3 then | |
1025 | energyslashcounter = 1 | |
1026 | for i = 0, 1, 0.05 do | |
1027 | swait() | |
1028 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(80)), 0.15) | |
1029 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(5), 0, math.rad(-80)), 0.15) | |
1030 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.2) | |
1031 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1032 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1033 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.15) | |
1034 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.15) | |
1035 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.15) | |
1036 | end | |
1037 | sound(sounds[2][5], Character.Head, 1, 4, 0.8) | |
1038 | thread(function() | |
1039 | for i = 1, 6 do | |
1040 | swait() | |
1041 | sound(438149153, Character.Head, 1, 4, 0.8) | |
1042 | do | |
1043 | local prt = newPart(Effects, BrickColor.new("Bright yellow"), 0, false, false, Vector3.new(), "Yellow", "SmoothPlastic", RootPart.CFrame) | |
1044 | local mesh = mesh("SpecialMesh", prt, "Sphere", nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 2.5)) | |
1045 | prt.CFrame = RootPart.CFrame * CFrame.new(math.random(-3, 3), math.random(-1, 1), math.random(-3, 3)) | |
1046 | local bv = Instance.new("BodyVelocity", prt) | |
1047 | bv.Velocity = RootPart.CFrame.lookVector * 150 | |
1048 | bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) | |
1049 | game.Debris:AddItem(bv, 6) | |
1050 | local orlook = RootPart.CFrame.lookVector | |
1051 | thread(function() | |
1052 | while prt do | |
1053 | swait() | |
1054 | local hitpart, pospart = rayCast(prt.Position, orlook, 4, Character) | |
1055 | if hitpart and pospart then | |
1056 | prt:Destroy() | |
1057 | do | |
1058 | local ref = newPart(Effects, BrickColor.Black(), 1, true, false, Vector3.new(), "") | |
1059 | ref.CFrame = CFrame.new(pospart) | |
1060 | sound(142070127, ref, 1, 4, 1) | |
1061 | delay(4, function() | |
1062 | ref:Destroy() | |
1063 | end) | |
1064 | magic("Block", { | |
1065 | Effects, | |
1066 | BrickColor.new("Bright yellow"), | |
1067 | CFrame.new(pospart), | |
1068 | 0.2, | |
1069 | 0.2, | |
1070 | 0.2, | |
1071 | 0.9, | |
1072 | 0.9, | |
1073 | 0.9, | |
1074 | 0.05, | |
1075 | 1 | |
1076 | }) | |
1077 | magic("Block", { | |
1078 | Effects, | |
1079 | BrickColor.new("Bright yellow"), | |
1080 | CFrame.new(pospart), | |
1081 | 0.2, | |
1082 | 0.2, | |
1083 | 0.2, | |
1084 | 0.9, | |
1085 | 0.9, | |
1086 | 0.9, | |
1087 | 0.05, | |
1088 | 1 | |
1089 | }) | |
1090 | if hitpart.Parent:findFirstChild("Humanoid") then | |
1091 | basicDamage(hitpart.Parent.Humanoid, 12, BrickColor.new("Bright yellow").Color) | |
1092 | end | |
1093 | break | |
1094 | end | |
1095 | end | |
1096 | end | |
1097 | end) | |
1098 | end | |
1099 | end | |
1100 | end) | |
1101 | end | |
1102 | attacking = false | |
1103 | AttackCan[2] = true | |
1104 | end | |
1105 | function leftright() | |
1106 | attacking = true | |
1107 | AttackCan[3] = false | |
1108 | for i = 0, 1, 0.1 do | |
1109 | swait() | |
1110 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(0), 0, math.rad(-80)), 0.4) | |
1111 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(math.rad(15), 0, math.rad(80)), 0.4) | |
1112 | RW.C0 = clerp(RW.C0, CFrame.new(1.3, 0.5, -0.4) * CFrame.Angles(math.rad(90), math.rad(90), math.rad(0)) * CFrame.Angles(math.rad(25), 0, 0), 0.4) | |
1113 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(0), 0, math.rad(-50)), 0.4) | |
1114 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1115 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1116 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.4) | |
1117 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.4) | |
1118 | end | |
1119 | thread(function() | |
1120 | local laser = newPart(nil, BrickColor.new("Bright red"), 0.5, true, false, Vector3.new(), "Laser", "SmoothPlastic") | |
1121 | local lmsh = mesh("BlockMesh", nil, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, 5, 5)) | |
1122 | local lasers = {} | |
1123 | local keypoints1, keypoints2, keypoints3, keypoints4, keypoints5, keypoints6 = {}, {}, {}, {}, {}, {} | |
1124 | local radius = 10 | |
1125 | local num = 12 | |
1126 | for i = 1, num do | |
1127 | table.insert(keypoints1, { | |
1128 | RootPart.CFrame.p, | |
1129 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num) * i), 0, math.sin(math.rad(360 / num) * i)) | |
1130 | }) | |
1131 | table.insert(keypoints2, { | |
1132 | RootPart.CFrame.p, | |
1133 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 45 * i) * i), 0, math.sin(math.rad(360 / num + 45 * i) * i)) | |
1134 | }) | |
1135 | table.insert(keypoints3, { | |
1136 | RootPart.CFrame.p, | |
1137 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 90 * i) * i), 0, math.sin(math.rad(360 / num + 90 * i) * i)) | |
1138 | }) | |
1139 | table.insert(keypoints4, { | |
1140 | RootPart.CFrame.p, | |
1141 | RootPart.CFrame.lookVector + Vector3.new(math.cos(math.rad(360 / num + 135 * i) * i), 0, math.sin(math.rad(360 / num + 135 * i) * i)) | |
1142 | }) | |
1143 | end | |
1144 | local keypointstotal = { | |
1145 | keypoints1, | |
1146 | keypoints2, | |
1147 | keypoints3, | |
1148 | keypoints4 | |
1149 | } | |
1150 | for ii = 1, #keypointstotal do | |
1151 | swait(5) | |
1152 | do | |
1153 | local currpoint = keypointstotal[ii] | |
1154 | for i = 1, #currpoint do | |
1155 | do | |
1156 | local start = currpoint[i][1] | |
1157 | local look = currpoint[i][2] | |
1158 | local laserc = laser:Clone() | |
1159 | local lmshc = lmsh:Clone() | |
1160 | local hit, pos = rayCast(start, look, 100000, Character) | |
1161 | laserc.CFrame = CFrame.new((start + pos) / 2, pos) * angles(math.rad(90), 0, 0) | |
1162 | local mag = (laserc.Position - pos).magnitude * 2 | |
1163 | lmshc.Scale = Vector3.new(2, mag * 5, 2) | |
1164 | laserc.Parent = Effects | |
1165 | lmshc.Parent = laserc | |
1166 | thread(function() | |
1167 | table.insert(partEffects, { | |
1168 | laserc, | |
1169 | "Block2", | |
1170 | 0.025, | |
1171 | -0.1, | |
1172 | 0, | |
1173 | -0.1, | |
1174 | lmshc | |
1175 | }) | |
1176 | local start = currpoint[i][1] | |
1177 | local look = currpoint[i][2] | |
1178 | look = CFrame.new(start, start + look).lookVector | |
1179 | local hit, pos = rayCast(start, look, 100000, Character) | |
1180 | repeat | |
1181 | swait() | |
1182 | until laserc.Parent == nil | |
1183 | local lpart = newPart(Effects, BrickColor.new("Black"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic") | |
1184 | sound(406913243, Head, 0.6, 4, 1) | |
1185 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(5, mag * 5, 5)) | |
1186 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
1187 | table.insert(partEffects, { | |
1188 | lpart, | |
1189 | "Block2", | |
1190 | 0.05, | |
1191 | 1, | |
1192 | 0, | |
1193 | 1, | |
1194 | lpartm | |
1195 | }) | |
1196 | local lpart = newPart(Effects, BrickColor.new("Lily white"), 0.5, true, false, Vector3.new(), "Cut", "SmoothPlastic") | |
1197 | local lpartm = mesh("BlockMesh", lpart, nil, nil, Vector3.new(0, 0, 0), Vector3.new(8, mag * 5, 8)) | |
1198 | lpart.CFrame = laserc.CFrame * CFrame.new(0, 0, 0) | |
1199 | table.insert(partEffects, { | |
1200 | lpart, | |
1201 | "Block2", | |
1202 | 0.05, | |
1203 | 1, | |
1204 | 0, | |
1205 | 1, | |
1206 | lpartm | |
1207 | }) | |
1208 | local hit, pos = rayCast(start, look, 100000, Character) | |
1209 | if hit ~= nil then | |
1210 | if hit.Parent.ClassName == "Accessory" or hit.Parent.ClassName == "Hat" then | |
1211 | if hit.Parent.Parent:findFirstChild("Humanoid") then | |
1212 | basicDamage(hit.Parent.Parent.Humanoid, 20, BrickColor.new("Bright red").Color) | |
1213 | end | |
1214 | elseif hit.Parent:findFirstChild("Humanoid") then | |
1215 | basicDamage(hit.Parent.Humanoid, 20, BrickColor.new("Bright red").Color) | |
1216 | end | |
1217 | end | |
1218 | end) | |
1219 | end | |
1220 | end | |
1221 | end | |
1222 | end | |
1223 | end) | |
1224 | for i = 0, 1, 0.1 do | |
1225 | swait() | |
1226 | Neck.C0 = clerp(Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
1227 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), 0.4) | |
1228 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(0), math.rad(-40), math.rad(60)), 0.4) | |
1229 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(math.rad(45), 0, math.rad(-25)), 0.4) | |
1230 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1231 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.4) | |
1232 | RH.C0 = clerp(RH.C0, cf(1, -1, 0) * angles(math.rad(0), math.rad(90), math.rad(0)), 0.4) | |
1233 | LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * angles(math.rad(0), math.rad(-90), math.rad(0)), 0.4) | |
1234 | end | |
1235 | AttackCan[3] = true | |
1236 | attacking = false | |
1237 | end | |
1238 | function mouse1d() | |
1239 | if tool.Active == false then | |
1240 | return | |
1241 | end | |
1242 | if attacking == false and attackcounter == 1 then | |
1243 | attackcounter = 2 | |
1244 | attackone() | |
1245 | elseif attacking == false and attackcounter == 2 then | |
1246 | attackcounter = 3 | |
1247 | attacktwo() | |
1248 | elseif attacking == false and attackcounter == 3 then | |
1249 | attackcounter = 1 | |
1250 | attackthree() | |
1251 | end | |
1252 | end | |
1253 | function key(k) | |
1254 | if tool.Active == false then | |
1255 | return | |
1256 | end | |
1257 | k = k:lower() | |
1258 | if attacking == false and k == "z" and AttackHas[1] >= AttackNeeded[1] then | |
1259 | rapidslash() | |
1260 | elseif attacking == false and k == "x" and AttackHas[2] >= 0.2 then | |
1261 | powerslash() | |
1262 | elseif attacking == false and k == "c" and AttackHas[3] >= AttackNeeded[3] then | |
1263 | leftright() | |
1264 | elseif attacking ~= false or k ~= "v" or AttackHas[4] >= AttackNeeded[4] then | |
1265 | end | |
1266 | end | |
1267 | asdasd = mouse.Button1Down:connect(mouse1d) | |
1268 | asdasdf = mouse.KeyDown:connect(key) | |
1269 | Humanoid.Died:connect(function() | |
1270 | asdasd:disconnect() | |
1271 | asdasdf:disconnect() | |
1272 | end) | |
1273 | thread(function() | |
1274 | while true do | |
1275 | swait() | |
1276 | torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1277 | hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) | |
1278 | sine = sine + 1 | |
1279 | if AttackHas[1] < AttackNeeded[1] and AttackCan[1] == true then | |
1280 | AttackHas[1] = AttackHas[1] + 0.005 | |
1281 | end | |
1282 | if AttackHas[2] < AttackNeeded[2] and AttackCan[2] == true then | |
1283 | AttackHas[2] = AttackHas[2] + 0.005 | |
1284 | end | |
1285 | if AttackHas[3] < AttackNeeded[3] and AttackCan[3] == true then | |
1286 | AttackHas[3] = AttackHas[3] + 0.005 | |
1287 | end | |
1288 | if AttackHas[4] < AttackNeeded[4] and AttackCan[4] == true then | |
1289 | AttackHas[4] = AttackHas[4] + 0.005 | |
1290 | end | |
1291 | Reload[1]:TweenSize(UDim2.new(AttackHas[1] / AttackNeeded[1], 0, 1, 0), nil, 1, 0.4) | |
1292 | Reload[2]:TweenSize(UDim2.new(AttackHas[2] / AttackNeeded[2], 0, 1, 0), nil, 1, 0.4) | |
1293 | Reload[3]:TweenSize(UDim2.new(AttackHas[3] / AttackNeeded[3], 0, 1, 0), nil, 1, 0.4) | |
1294 | Reload[4]:TweenSize(UDim2.new(AttackHas[4] / AttackNeeded[4], 0, 1, 0), nil, 1, 0.4) | |
1295 | if 1 < RootPart.Velocity.y and hitfloor == nil then | |
1296 | if attacking == false then | |
1297 | Anim = "Jump" | |
1298 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-15), 0, math.rad(0)), 0.1) | |
1299 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
1300 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1301 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
1302 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1303 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
1304 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(-12), math.rad(90), 0), 0.2) | |
1305 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(12), -math.rad(90), 0), 0.2) | |
1306 | end | |
1307 | elseif RootPart.Velocity.y < -1 and hitfloor == nil then | |
1308 | if attacking == false then | |
1309 | Anim = "Fall" | |
1310 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(23), 0, 0), 0.2) | |
1311 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.Angles(0, 0, 0), 0.2) | |
1312 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, math.rad(12)), 0.2) | |
1313 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1314 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(-math.rad(17), 0, -math.rad(12)), 0.2) | |
1315 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0), 0.2) | |
1316 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(24), math.rad(90), 0), 0.2) | |
1317 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(-12), -math.rad(90), 0), 0.2) | |
1318 | end | |
1319 | elseif torvel < 1 and hitfloor ~= nil then | |
1320 | if attacking == false then | |
1321 | Anim = "Idle" | |
1322 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(15)), 0.1) | |
1323 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(-15)), 0.1) | |
1324 | RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
1325 | LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
1326 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1327 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1328 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1.1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), math.rad(105), math.rad(-5)) * CFrame.Angles(math.rad(-4), 0, math.rad(-5)), 0.2) | |
1329 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1 - 0.2 * math.cos(sine / 25), 0) * CFrame.Angles(math.rad(10), -math.rad(75), math.rad(-2)) * CFrame.Angles(math.rad(-13), 0, 0), 0.2) | |
1330 | end | |
1331 | elseif torvel > 2 and hitfloor ~= nil and attacking == false then | |
1332 | Anim = "Walk" | |
1333 | Neck.C0 = clerp(Neck.C0, NeckCF * CFrame.Angles(math.rad(-5), 0, math.rad(0)), 0.1) | |
1334 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * CFrame.new(0, 0, 0.2 * math.cos(sine / 25)) * CFrame.Angles(math.rad(10), 0, math.rad(0)), 0.1) | |
1335 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(5), math.rad(-15), math.rad(10) + 0.1 * math.cos(sine / 25)), 0.2) | |
1336 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5 - 0.1 * math.cos(sine / 15), 0) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-10) - 0.1 * math.cos(sine / 25)), 0.2) | |
1337 | RW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1338 | LW.C1 = clerp(LW.C1, CFrame.new(0, 0.5, 0), 0.2) | |
1339 | RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * CFrame.Angles(math.cos(sine * 1.2 / 8), math.rad(90), 0), 0.3) | |
1340 | LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * CFrame.Angles(-math.cos(sine * 1.2 / 8), -math.rad(90), 0), 0.3) | |
1341 | end | |
1342 | if 0 < #partEffects then | |
1343 | for e = 1, #partEffects do | |
1344 | if partEffects[e] ~= nil then | |
1345 | local Thing = partEffects[e] | |
1346 | if Thing ~= nil then | |
1347 | local Part = Thing[1] | |
1348 | local Mode = Thing[2] | |
1349 | local Delay = Thing[3] | |
1350 | local IncX = Thing[4] | |
1351 | local IncY = Thing[5] | |
1352 | local IncZ = Thing[6] | |
1353 | if 1 >= Thing[1].Transparency then | |
1354 | if Thing[2] == "Block1" then | |
1355 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1356 | local Mesh = Thing[1].Mesh | |
1357 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1358 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1359 | elseif Thing[2] == "Block2" then | |
1360 | Thing[1].CFrame = Thing[1].CFrame | |
1361 | local Mesh = Thing[7] | |
1362 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1363 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1364 | elseif Thing[2] == "Cylinder" then | |
1365 | local Mesh = Thing[1].Mesh | |
1366 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1367 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1368 | elseif Thing[2] == "Blood" then | |
1369 | local Mesh = Thing[7] | |
1370 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1371 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1372 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1373 | elseif Thing[2] == "Elec" then | |
1374 | local Mesh = Thing[1].Mesh | |
1375 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1376 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1377 | elseif Thing[2] == "Disappear" then | |
1378 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1379 | elseif Thing[2] == "Shatter" then | |
1380 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1381 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1382 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1383 | Thing[6] = Thing[6] + Thing[5] | |
1384 | end | |
1385 | else | |
1386 | Part:Destroy() | |
1387 | table.remove(partEffects, e) | |
1388 | end | |
1389 | end | |
1390 | end | |
1391 | end | |
1392 | end | |
1393 | end | |
1394 | end) |