SHOW:
|
|
- or go back to the newest paste.
1 | local plr = game.Players.LocalPlayer | |
2 | ||
3 | local char = plr.Character | |
4 | ||
5 | animate = char:findFirstChild("Animate") | |
6 | ||
7 | animate:Destroy() | |
8 | ||
9 | ||
10 | ||
11 | local par = script and script.Parent or char | |
12 | ||
13 | pcall(function() | |
14 | ||
15 | par.Pandas:Destroy() | |
16 | ||
17 | end) | |
18 | ||
19 | if script then | |
20 | ||
21 | script.Name = "Pandas" | |
22 | ||
23 | end | |
24 | ||
25 | local m = Instance.new("Model",char) | |
26 | ||
27 | m.Name = "Pandas" | |
28 | ||
29 | ||
30 | ||
31 | function weld(a,b,c,d) | |
32 | ||
33 | local w = Instance.new("Weld",a) | |
34 | ||
35 | w.Part0 = a | |
36 | ||
37 | w.Part1 = b | |
38 | ||
39 | w.C0 = c or CFrame.new() | |
40 | ||
41 | w.C1 = d or CFrame.new() | |
42 | ||
43 | return w | |
44 | ||
45 | end | |
46 | ||
47 | ||
48 | ||
49 | local part = Instance.new("Part") | |
50 | ||
51 | part.Material = "SmoothPlastic" | |
52 | ||
53 | part.TopSurface,part.BottomSurface = 0,0 | |
54 | ||
55 | part.FormFactor = "Custom" | |
56 | ||
57 | part.Size = Vector3.new(.2,.2,.2) | |
58 | ||
59 | part:BreakJoints() | |
60 | ||
61 | part.TopSurface = "SmoothNoOutlines" | |
62 | ||
63 | part.BottomSurface = "SmoothNoOutlines" | |
64 | ||
65 | part.RightSurface = "SmoothNoOutlines" | |
66 | ||
67 | part.LeftSurface = "SmoothNoOutlines" | |
68 | ||
69 | part.CanCollide = false | |
70 | ||
71 | ||
72 | ||
73 | do | |
74 | ||
75 | local function CFrameFromTopBack(at, top, back) | |
76 | ||
77 | local right = top:Cross(back) | |
78 | ||
79 | return CFrame.new(at.x, at.y, at.z, | |
80 | ||
81 | right.x, top.x, back.x, | |
82 | ||
83 | right.y, top.y, back.y, | |
84 | ||
85 | right.z, top.z, back.z) | |
86 | ||
87 | end | |
88 | ||
89 | ||
90 | ||
91 | function Triangle(a, b, c) | |
92 | ||
93 | local edg1 = (c-a):Dot((b-a).unit) | |
94 | ||
95 | local edg2 = (a-b):Dot((c-b).unit) | |
96 | ||
97 | local edg3 = (b-c):Dot((a-c).unit) | |
98 | ||
99 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
100 | ||
101 | a, b, c = a, b, c | |
102 | ||
103 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
104 | ||
105 | a, b, c = b, c, a | |
106 | ||
107 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
108 | ||
109 | a, b, c = c, a, b | |
110 | ||
111 | else | |
112 | ||
113 | assert(false, "unreachable") | |
114 | ||
115 | end | |
116 | ||
117 | ||
118 | ||
119 | local len1 = (c-a):Dot((b-a).unit) | |
120 | ||
121 | local len2 = (b-a).magnitude - len1 | |
122 | ||
123 | local width = (a + (b-a).unit*len1 - c).magnitude | |
124 | ||
125 | ||
126 | ||
127 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
128 | ||
129 | ||
130 | ||
131 | local list = {} | |
132 | ||
133 | ||
134 | ||
135 | if len1 > 0.01 then | |
136 | ||
137 | local w1 = Instance.new('WedgePart', m) | |
138 | ||
139 | w1.Material = "SmoothPlastic" | |
140 | ||
141 | w1.TopSurface = "SmoothNoOutlines" | |
142 | ||
143 | w1.BottomSurface = "SmoothNoOutlines" | |
144 | ||
145 | w1.RightSurface = "SmoothNoOutlines" | |
146 | ||
147 | w1.LeftSurface = "SmoothNoOutlines" | |
148 | ||
149 | w1.TopSurface,w1.BottomSurface = 0,0 | |
150 | ||
151 | w1.FormFactor = 'Custom' | |
152 | ||
153 | w1.BrickColor = part.BrickColor | |
154 | ||
155 | w1.Transparency = part.Transparency | |
156 | ||
157 | w1.Reflectance = part.Reflectance | |
158 | ||
159 | w1.Material = part.Material | |
160 | ||
161 | w1.CanCollide = part.CanCollide | |
162 | ||
163 | local sz = Vector3.new(0.2, width, len1) | |
164 | ||
165 | w1.Size = sz | |
166 | ||
167 | local sp = Instance.new("SpecialMesh",w1) | |
168 | ||
169 | sp.MeshType = "Wedge" | |
170 | ||
171 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
172 | ||
173 | w1:BreakJoints() | |
174 | ||
175 | w1.Anchored = true | |
176 | ||
177 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
178 | ||
179 | table.insert(list,w1) | |
180 | ||
181 | end | |
182 | ||
183 | ||
184 | ||
185 | if len2 > 0.01 then | |
186 | ||
187 | local w2 = Instance.new('WedgePart', m) | |
188 | ||
189 | w2.Material = "SmoothPlastic" | |
190 | ||
191 | ||
192 | ||
193 | w2.TopSurface = "SmoothNoOutlines" | |
194 | ||
195 | w2.BottomSurface = "SmoothNoOutlines" | |
196 | ||
197 | w2.RightSurface = "SmoothNoOutlines" | |
198 | ||
199 | w2.LeftSurface = "SmoothNoOutlines" | |
200 | ||
201 | w2.TopSurface,w2.BottomSurface = 0,0 | |
202 | ||
203 | w2.FormFactor = 'Custom' | |
204 | ||
205 | w2.BrickColor = part.BrickColor | |
206 | ||
207 | w2.Transparency = part.Transparency | |
208 | ||
209 | w2.Reflectance = part.Reflectance | |
210 | ||
211 | w2.Material = part.Material | |
212 | ||
213 | w2.CanCollide = part.CanCollide | |
214 | ||
215 | local sz = Vector3.new(0.2, width, len2) | |
216 | ||
217 | w2.Size = sz | |
218 | ||
219 | local sp = Instance.new("SpecialMesh",w2) | |
220 | ||
221 | sp.MeshType = "Wedge" | |
222 | ||
223 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
224 | ||
225 | w2:BreakJoints() | |
226 | ||
227 | w2.Anchored = true | |
228 | ||
229 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
230 | ||
231 | table.insert(list,w2) | |
232 | ||
233 | end | |
234 | ||
235 | return unpack(list) | |
236 | ||
237 | end | |
238 | ||
239 | ||
240 | ||
241 | function WeldTriangle(p, a, b, c) | |
242 | ||
243 | local edg1 = (c-a):Dot((b-a).unit) | |
244 | ||
245 | local edg2 = (a-b):Dot((c-b).unit) | |
246 | ||
247 | local edg3 = (b-c):Dot((a-c).unit) | |
248 | ||
249 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
250 | ||
251 | a, b, c = a, b, c | |
252 | ||
253 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
254 | ||
255 | a, b, c = b, c, a | |
256 | ||
257 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
258 | ||
259 | a, b, c = c, a, b | |
260 | ||
261 | else | |
262 | ||
263 | assert(false, "unreachable") | |
264 | ||
265 | end | |
266 | ||
267 | ||
268 | ||
269 | local len1 = (c-a):Dot((b-a).unit) | |
270 | ||
271 | local len2 = (b-a).magnitude - len1 | |
272 | ||
273 | local width = (a + (b-a).unit*len1 - c).magnitude | |
274 | ||
275 | ||
276 | ||
277 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
278 | ||
279 | ||
280 | ||
281 | if len1 > 0.01 then | |
282 | ||
283 | local w1 = Instance.new('WedgePart', m) | |
284 | ||
285 | w1.Material = "SmoothPlastic" | |
286 | ||
287 | w1.TopSurface = "SmoothNoOutlines" | |
288 | ||
289 | w1.BottomSurface = "SmoothNoOutlines" | |
290 | ||
291 | w1.RightSurface = "SmoothNoOutlines" | |
292 | ||
293 | w1.LeftSurface = "SmoothNoOutlines" | |
294 | ||
295 | w1.Material = "SmoothPlastic" | |
296 | ||
297 | w1.TopSurface,w1.BottomSurface = 0,0 | |
298 | ||
299 | w1.FormFactor = 'Custom' | |
300 | ||
301 | w1.BrickColor = part.BrickColor | |
302 | ||
303 | w1.Transparency = part.Transparency | |
304 | ||
305 | w1.Reflectance = part.Reflectance | |
306 | ||
307 | w1.Material = part.Material | |
308 | ||
309 | w1.CanCollide = part.CanCollide | |
310 | ||
311 | local sz = Vector3.new(0.2, width, len1) | |
312 | ||
313 | w1.Size = sz | |
314 | ||
315 | local sp = Instance.new("SpecialMesh",w1) | |
316 | ||
317 | sp.MeshType = "Wedge" | |
318 | ||
319 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
320 | ||
321 | w1:BreakJoints() | |
322 | ||
323 | weld(p,w1,maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)) | |
324 | ||
325 | end | |
326 | ||
327 | ||
328 | ||
329 | if len2 > 0.01 then | |
330 | ||
331 | local w2 = Instance.new('WedgePart', m) | |
332 | ||
333 | w2.Material = "SmoothPlastic" | |
334 | ||
335 | w2.TopSurface = "SmoothNoOutlines" | |
336 | ||
337 | w2.BottomSurface = "SmoothNoOutlines" | |
338 | ||
339 | w2.RightSurface = "SmoothNoOutlines" | |
340 | ||
341 | w2.LeftSurface = "SmoothNoOutlines" | |
342 | ||
343 | ||
344 | w2.TopSurface,w2.BottomSurface = 0,0 | |
345 | ||
346 | w2.FormFactor = 'Custom' | |
347 | ||
348 | w2.BrickColor = part.BrickColor | |
349 | ||
350 | w2.Transparency = part.Transparency | |
351 | ||
352 | w2.Reflectance = part.Reflectance | |
353 | ||
354 | w2.Material = part.Material | |
355 | ||
356 | w2.CanCollide = part.CanCollide | |
357 | ||
358 | local sz = Vector3.new(0.2, width, len2) | |
359 | ||
360 | w2.Size = sz | |
361 | ||
362 | local sp = Instance.new("SpecialMesh",w2) | |
363 | ||
364 | sp.MeshType = "Wedge" | |
365 | ||
366 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
367 | ||
368 | w2:BreakJoints() | |
369 | ||
370 | weld(p,w2,maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)) | |
371 | ||
372 | end | |
373 | ||
374 | end | |
375 | ||
376 | end | |
377 | ||
378 | ||
379 | ||
380 | function newpart() | |
381 | ||
382 | local p = part:Clone() | |
383 | ||
384 | p.Parent = m | |
385 | ||
386 | return p | |
387 | ||
388 | end | |
389 | ||
390 | ||
391 | ||
392 | local h = newpart() | |
393 | ||
394 | h.Transparency = 1 | |
395 | ||
396 | local griphand = CFrame.new(0,-.95,0) | |
397 | ||
398 | local grip = weld(char["Right Arm"],h,CFrame.new(0,-.95,0),CFrame.Angles(math.pi/2,0,math.pi/2)) | |
399 | ||
400 | ||
401 | ||
402 | ||
403 | ||
404 | part.BrickColor = BrickColor.new("Really blue") | |
405 | ||
406 | for i=0,1,.1 do | |
407 | ||
408 | local s = math.abs(i-.5)*2 | |
409 | ||
410 | local x = newpart() | |
411 | ||
412 | x.Size = Vector3.new(.35-.1*s,.2,.2) | |
413 | ||
414 | x.Material = "SmoothPlastic" | |
415 | ||
416 | local sp = Instance.new("SpecialMesh",x) | |
417 | ||
418 | sp.MeshType = "Sphere" | |
419 | ||
420 | sp.Scale = Vector3.new(1,1,.85) | |
421 | ||
422 | weld(h,x,CFrame.new(0,-.5+1*i,0) * CFrame.Angles(0,0,.35)) | |
423 | ||
424 | end | |
425 | ||
426 | ||
427 | ||
428 | ||
429 | ||
430 | ||
431 | ||
432 | local n = 3892026 | |
433 | ||
434 | for i in plr.Name:gmatch(".") do | |
435 | ||
436 | n = n + i:byte() | |
437 | ||
438 | end | |
439 | ||
440 | math.randomseed(n) math.random() math.random() math.random() | |
441 | ||
442 | ||
443 | ||
444 | local themeColor = BrickColor.new ("Really blue") | |
445 | ||
446 | local themeRef = .01 | |
447 | ||
448 | ||
449 | ||
450 | math.randomseed(tick()) math.random() math.random() math.random() | |
451 | ||
452 | ||
453 | ||
454 | local metalColor = BrickColor.new("Really black") | |
455 | ||
456 | local metalRef = .5 | |
457 | ||
458 | local bladeColor = BrickColor.new("Really black") | |
459 | ||
460 | local bladeRef = .4 | |
461 | ||
462 | ||
463 | ||
464 | part.BrickColor = metalColor | |
465 | ||
466 | part.Reflectance = metalRef | |
467 | ||
468 | local x = newpart() | |
469 | ||
470 | x.Size = Vector3.new(.2,.2,.2) | |
471 | ||
472 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,7,.6) | |
473 | ||
474 | weld(h,x,CFrame.new(.035,0,0)) | |
475 | ||
476 | local x = newpart() | |
477 | ||
478 | x.Size = Vector3.new(.2,.2,.2) | |
479 | ||
480 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,7,.6) | |
481 | ||
482 | weld(h,x,CFrame.new(-.035,0,0)) | |
483 | ||
484 | local x = newpart() | |
485 | ||
486 | x.Size = Vector3.new(.2,.2,.2) | |
487 | ||
488 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,7,.6) | |
489 | ||
490 | weld(h,x,CFrame.new(0,0,0)) | |
491 | ||
492 | ||
493 | ||
494 | local x = newpart() | |
495 | ||
496 | x.Size = Vector3.new(.34,.2,.34) | |
497 | ||
498 | Instance.new("CylinderMesh",x).Scale = Vector3.new(1,.6,1) | |
499 | ||
500 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
501 | ||
502 | ||
503 | ||
504 | part.BrickColor = BrickColor.new("Really blue") | |
505 | ||
506 | local x = newpart() | |
507 | ||
508 | x.Size = Vector3.new(.28,.2,.28) | |
509 | ||
510 | Instance.new("CylinderMesh",x).Scale = Vector3.new(1,.605,1) | |
511 | ||
512 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
513 | ||
514 | ||
515 | ||
516 | part.BrickColor = metalColor | |
517 | ||
518 | local x = newpart() | |
519 | ||
520 | x.Size = Vector3.new(.27,.2,.27) | |
521 | ||
522 | Instance.new("CylinderMesh",x).Scale = Vector3.new(1,.61,1) | |
523 | ||
524 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
525 | ||
526 | ||
527 | ||
528 | part.BrickColor = BrickColor.new("Really blue") | |
529 | ||
530 | local x = newpart() | |
531 | ||
532 | x.Size = Vector3.new(.2,.2,.2) | |
533 | ||
534 | Instance.new("BlockMesh",x).Scale = Vector3.new(1.2,.615,.2) | |
535 | ||
536 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
537 | ||
538 | local x = newpart() | |
539 | ||
540 | x.Size = Vector3.new(.2,.2,.2) | |
541 | ||
542 | Instance.new("BlockMesh",x).Scale = Vector3.new(.2,.613,1.2) | |
543 | ||
544 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
545 | ||
546 | local x = newpart() | |
547 | ||
548 | x.Size = Vector3.new(.2,.2,.2) | |
549 | ||
550 | Instance.new("BlockMesh",x).Scale = Vector3.new(.1,.612,.72) | |
551 | ||
552 | weld(h,x,CFrame.new(.065,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
553 | ||
554 | local x = newpart() | |
555 | ||
556 | x.Size = Vector3.new(.2,.2,.2) | |
557 | ||
558 | Instance.new("BlockMesh",x).Scale = Vector3.new(.1,.612,.72) | |
559 | ||
560 | weld(h,x,CFrame.new(-.065,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
561 | ||
562 | local x = newpart() | |
563 | ||
564 | x.Size = Vector3.new(.2,.2,.2) | |
565 | ||
566 | Instance.new("BlockMesh",x).Scale = Vector3.new(.72,.611,.1) | |
567 | ||
568 | weld(h,x,CFrame.new(0,-.75+.065,0)*CFrame.Angles(math.pi/2,0,0)) | |
569 | ||
570 | local x = newpart() | |
571 | ||
572 | x.Size = Vector3.new(.2,.2,.2) | |
573 | ||
574 | Instance.new("BlockMesh",x).Scale = Vector3.new(.72,.611,.1) | |
575 | ||
576 | weld(h,x,CFrame.new(0,-.75-.065,0)*CFrame.Angles(math.pi/2,0,0)) | |
577 | ||
578 | ||
579 | ||
580 | ||
581 | ||
582 | part.BrickColor = themeColor | |
583 | ||
584 | part.Reflectance = themeRef | |
585 | ||
586 | local x = newpart() | |
587 | ||
588 | x.Size = Vector3.new(.2,.2,.2) | |
589 | ||
590 | Instance.new("BlockMesh",x).Scale = Vector3.new(1.16,.619,.16) | |
591 | ||
592 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
593 | ||
594 | local x = newpart() | |
595 | ||
596 | x.Size = Vector3.new(.2,.2,.2) | |
597 | ||
598 | Instance.new("BlockMesh",x).Scale = Vector3.new(.16,.618,1.16) | |
599 | ||
600 | weld(h,x,CFrame.new(0,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
601 | ||
602 | local x = newpart() | |
603 | ||
604 | x.Size = Vector3.new(.2,.2,.2) | |
605 | ||
606 | Instance.new("BlockMesh",x).Scale = Vector3.new(.06,.617,.68) | |
607 | ||
608 | weld(h,x,CFrame.new(.065,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
609 | ||
610 | local x = newpart() | |
611 | ||
612 | x.Size = Vector3.new(.2,.2,.2) | |
613 | ||
614 | Instance.new("BlockMesh",x).Scale = Vector3.new(.06,.617,.68) | |
615 | ||
616 | weld(h,x,CFrame.new(-.065,-.75,0)*CFrame.Angles(math.pi/2,0,0)) | |
617 | ||
618 | local x = newpart() | |
619 | ||
620 | x.Size = Vector3.new(.2,.2,.2) | |
621 | ||
622 | Instance.new("BlockMesh",x).Scale = Vector3.new(.68,.616,.06) | |
623 | ||
624 | weld(h,x,CFrame.new(0,-.75+.065,0)*CFrame.Angles(math.pi/2,0,0)) | |
625 | ||
626 | local x = newpart() | |
627 | ||
628 | x.Size = Vector3.new(.2,.2,.2) | |
629 | ||
630 | Instance.new("BlockMesh",x).Scale = Vector3.new(.68,.616,.06) | |
631 | ||
632 | weld(h,x,CFrame.new(0,-.75-.065,0)*CFrame.Angles(math.pi/2,0,0)) | |
633 | ||
634 | local x = newpart() | |
635 | ||
636 | x.Size = Vector3.new(.345,.2,.345) | |
637 | ||
638 | Instance.new("CylinderMesh",x).Scale = Vector3.new(1,.1,1) | |
639 | ||
640 | weld(h,x,CFrame.new(0,-.75,.049)*CFrame.Angles(math.pi/2,0,0)) | |
641 | ||
642 | local x = newpart() | |
643 | ||
644 | x.Size = Vector3.new(.345,.2,.345) | |
645 | ||
646 | Instance.new("CylinderMesh",x).Scale = Vector3.new(1,.1,1) | |
647 | ||
648 | weld(h,x,CFrame.new(0,-.75,-.049)*CFrame.Angles(math.pi/2,0,0)) | |
649 | ||
650 | ||
651 | ||
652 | part.BrickColor = metalColor | |
653 | ||
654 | part.Reflectance = metalRef | |
655 | ||
656 | ||
657 | ||
658 | local c = CFrame.new(0.035,.52,0) | |
659 | ||
660 | for i=0,1,.2 do | |
661 | ||
662 | local s = 1-math.abs(i-.5)*2 | |
663 | ||
664 | local x = newpart() | |
665 | ||
666 | x.Size = Vector3.new(.2,.2,.2) | |
667 | ||
668 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
669 | ||
670 | local c2 = c*CFrame.new(-.06,0,0)*CFrame.Angles(0,0,-s*.65)*CFrame.new(.06,.05,0) | |
671 | ||
672 | weld(h,x,c2) | |
673 | ||
674 | c = c2*CFrame.new(0,0.05,0) | |
675 | ||
676 | end | |
677 | ||
678 | local x = newpart() | |
679 | ||
680 | x.Size = Vector3.new(.2,.2,.2) | |
681 | ||
682 | local sp = Instance.new("SpecialMesh",x) | |
683 | ||
684 | sp.MeshType = "Sphere" | |
685 | ||
686 | sp.Scale = Vector3.new(.6,.6,.6) | |
687 | ||
688 | weld(h,x,c) | |
689 | ||
690 | ||
691 | ||
692 | local c = CFrame.new(-0.035,.52,0) | |
693 | ||
694 | for i=0,1,.2 do | |
695 | ||
696 | local s = 1-math.abs(i-.5)*2 | |
697 | ||
698 | local x = newpart() | |
699 | ||
700 | x.Size = Vector3.new(.2,.2,.2) | |
701 | ||
702 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
703 | ||
704 | local c2 = c*CFrame.new(.06,0,0)*CFrame.Angles(0,0,s*.65)*CFrame.new(-.06,.05,0) | |
705 | ||
706 | weld(h,x,c2) | |
707 | ||
708 | c = c2*CFrame.new(0,0.05,0) | |
709 | ||
710 | end | |
711 | ||
712 | local x = newpart() | |
713 | ||
714 | x.Size = Vector3.new(.2,.2,.2) | |
715 | ||
716 | local sp = Instance.new("SpecialMesh",x) | |
717 | ||
718 | sp.MeshType = "Sphere" | |
719 | ||
720 | sp.Scale = Vector3.new(.6,.6,.6) | |
721 | ||
722 | weld(h,x,c) | |
723 | ||
724 | ||
725 | ||
726 | local c = CFrame.new(0,.555,0) | |
727 | ||
728 | for i=0,1,.2 do | |
729 | ||
730 | local s = 1-math.abs(i-.5)*2 | |
731 | ||
732 | local x = newpart() | |
733 | ||
734 | x.Size = Vector3.new(.2,.2,.2) | |
735 | ||
736 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
737 | ||
738 | local c2 = c*CFrame.new(.06,0,0)*CFrame.Angles(0,0,s*.65)*CFrame.new(-.06,.05,0) | |
739 | ||
740 | weld(h,x,c2) | |
741 | ||
742 | c = c2*CFrame.new(0,0.05,0) | |
743 | ||
744 | end | |
745 | ||
746 | local x = newpart() | |
747 | ||
748 | x.Size = Vector3.new(.2,.2,.2) | |
749 | ||
750 | local sp = Instance.new("SpecialMesh",x) | |
751 | ||
752 | sp.MeshType = "Sphere" | |
753 | ||
754 | sp.Scale = Vector3.new(.6,.6,.6) | |
755 | ||
756 | weld(h,x,c) | |
757 | ||
758 | ||
759 | ||
760 | local c = CFrame.new(0,.555,0) | |
761 | ||
762 | for i=0,1,.2 do | |
763 | ||
764 | local s = 1-math.abs(i-.5)*2 | |
765 | ||
766 | local x = newpart() | |
767 | ||
768 | x.Size = Vector3.new(.2,.2,.2) | |
769 | ||
770 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
771 | ||
772 | local c2 = c*CFrame.new(-.06,0,0)*CFrame.Angles(0,0,-s*.65)*CFrame.new(.06,.05,0) | |
773 | ||
774 | weld(h,x,c2) | |
775 | ||
776 | c = c2*CFrame.new(0,0.05,0) | |
777 | ||
778 | end | |
779 | ||
780 | local x = newpart() | |
781 | ||
782 | x.Size = Vector3.new(.2,.2,.2) | |
783 | ||
784 | local sp = Instance.new("SpecialMesh",x) | |
785 | ||
786 | sp.MeshType = "Sphere" | |
787 | ||
788 | sp.Scale = Vector3.new(.6,.6,.6) | |
789 | ||
790 | weld(h,x,c) | |
791 | ||
792 | ||
793 | ||
794 | local c = CFrame.new(0,1.02825,0) * CFrame.Angles(0,0,math.pi) | |
795 | ||
796 | for i=0,1,.2 do | |
797 | ||
798 | local s = 1-math.abs(i-.5)*2 | |
799 | ||
800 | local x = newpart() | |
801 | ||
802 | x.Size = Vector3.new(.2,.2,.2) | |
803 | ||
804 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
805 | ||
806 | local c2 = c*CFrame.new(.06,0,0)*CFrame.Angles(0,0,s*.65)*CFrame.new(-.06,.05,0) | |
807 | ||
808 | weld(h,x,c2) | |
809 | ||
810 | c = c2*CFrame.new(0,0.05,0) | |
811 | ||
812 | end | |
813 | ||
814 | ||
815 | ||
816 | local c = CFrame.new(0,1.02825,0) * CFrame.Angles(0,0,math.pi) | |
817 | ||
818 | for i=0,1,.2 do | |
819 | ||
820 | local s = 1-math.abs(i-.5)*2 | |
821 | ||
822 | local x = newpart() | |
823 | ||
824 | x.Size = Vector3.new(.2,.2,.2) | |
825 | ||
826 | Instance.new("CylinderMesh",x).Scale = Vector3.new(.6,.5,.6) | |
827 | ||
828 | local c2 = c*CFrame.new(-.06,0,0)*CFrame.Angles(0,0,-s*.65)*CFrame.new(.06,.05,0) | |
829 | ||
830 | weld(h,x,c2) | |
831 | ||
832 | c = c2*CFrame.new(0,0.05,0) | |
833 | ||
834 | end | |
835 | ||
836 | ||
837 | ||
838 | local x = newpart() | |
839 | ||
840 | x.Size = Vector3.new(.2,.2,.2) | |
841 | ||
842 | local sp = Instance.new("SpecialMesh",x) | |
843 | ||
844 | sp.MeshType = "Sphere" | |
845 | ||
846 | sp.Scale = Vector3.new(.6,1.5,.6) | |
847 | ||
848 | weld(h,x,CFrame.new(0,1.02825,0)) | |
849 | ||
850 | ||
851 | ||
852 | part.BrickColor = themeColor | |
853 | ||
854 | part.Reflectance = themeRef | |
855 | ||
856 | local x = newpart() | |
857 | ||
858 | x.Size = Vector3.new(.2,.2,.2) | |
859 | ||
860 | Instance.new("BlockMesh",x).Scale = Vector3.new(.6,.6,.5) | |
861 | ||
862 | weld(h,x,CFrame.new(0,.791625,0)*CFrame.Angles(0,0,math.pi/4)) | |
863 | ||
864 | ||
865 | ||
866 | local x = newpart() | |
867 | ||
868 | x.Size = Vector3.new(.2,4,.2) | |
869 | ||
870 | Instance.new("BlockMesh",x).Scale = Vector3.new(.15,1,.225) | |
871 | ||
872 | weld(h,x,CFrame.new(0,2.9,0)) | |
873 | ||
874 | ||
875 | ||
876 | local x = newpart() | |
877 | ||
878 | x.Size = Vector3.new(.2,.2,.2) | |
879 | ||
880 | local sp = Instance.new("SpecialMesh",x) | |
881 | ||
882 | sp.MeshType = "Cylinder" | |
883 | ||
884 | sp.Scale = Vector3.new(.22,.15,.15) | |
885 | ||
886 | weld(h,x,CFrame.new(0,4.9,0)*CFrame.Angles(0,math.pi/2,0)) | |
887 | ||
888 | ||
889 | ||
890 | part.BrickColor = BrickColor.new("Really blue") | |
891 | ||
892 | ||
893 | ||
894 | local x = newpart() | |
895 | ||
896 | x.Size = Vector3.new(.2,4,.2) | |
897 | ||
898 | Instance.new("BlockMesh",x).Scale = Vector3.new(.175,1,.21) | |
899 | ||
900 | weld(h,x,CFrame.new(0,2.9,0)) | |
901 | ||
902 | ||
903 | ||
904 | local x = newpart() | |
905 | ||
906 | x.Size = Vector3.new(.2,.2,.2) | |
907 | ||
908 | local sp = Instance.new("SpecialMesh",x) | |
909 | ||
910 | sp.MeshType = "Cylinder" | |
911 | ||
912 | sp.Scale = Vector3.new(.215,.175,.175) | |
913 | ||
914 | weld(h,x,CFrame.new(0,4.9,0)*CFrame.Angles(0,math.pi/2,0)) | |
915 | ||
916 | ||
917 | ||
918 | part.BrickColor = bladeColor | |
919 | ||
920 | part.Reflectance = bladeRef | |
921 | ||
922 | local x = newpart() | |
923 | ||
924 | x.Size = Vector3.new(.25,4,.2) | |
925 | ||
926 | Instance.new("BlockMesh",x).Scale = Vector3.new(1,1,.2) | |
927 | ||
928 | weld(h,x,CFrame.new(0,2.85,0)) | |
929 | ||
930 | local blade = x | |
931 | ||
932 | ||
933 | ||
934 | local x = newpart() | |
935 | ||
936 | x.Size = Vector3.new(.2,.25,.25) | |
937 | ||
938 | local sp = Instance.new("SpecialMesh",x) | |
939 | ||
940 | sp.MeshType = "Wedge" | |
941 | ||
942 | sp.Scale = Vector3.new(.2,1,.5) | |
943 | ||
944 | weld(h,x,CFrame.new(-.0625,4.975,0) * CFrame.Angles(0,math.pi/2,0)) | |
945 | ||
946 | ||
947 | ||
948 | local x = newpart() | |
949 | ||
950 | x.Size = Vector3.new(.2,.25,.25) | |
951 | ||
952 | local sp = Instance.new("SpecialMesh",x) | |
953 | ||
954 | sp.MeshType = "Wedge" | |
955 | ||
956 | sp.Scale = Vector3.new(.2,1,.5) | |
957 | ||
958 | weld(h,x,CFrame.new(.0625,4.975,0) * CFrame.Angles(0,-math.pi/2,0)) | |
959 | ||
960 | part.BrickColor = BrickColor.new("Really blue") | |
961 | ||
962 | part.Reflectance = .6 | |
963 | ||
964 | ||
965 | Lite = Instance.new ("PointLight") | |
966 | ||
967 | Lite.Range = 10 | |
968 | ||
969 | Lite.Enabled = true | |
970 | ||
971 | Lite.Brightness = 5 | |
972 | ||
973 | Lite.Color = Color3.new (0,0,255) | |
974 | ||
975 | Lite.Parent = x | |
976 | ||
977 | ||
978 | ||
979 | ||
980 | ||
981 | ||
982 | ||
983 | local x = newpart() | |
984 | ||
985 | x.Size = Vector3.new(4,.2,.2) | |
986 | ||
987 | local sp = Instance.new("SpecialMesh",x) | |
988 | ||
989 | sp.MeshType = "Wedge" | |
990 | ||
991 | sp.Scale = Vector3.new(1,.5,.1) | |
992 | ||
993 | weld(h,x,CFrame.new(.175,2.85,-.01) * CFrame.Angles(0,0,-math.pi/2)) | |
994 | ||
995 | ||
996 | ||
997 | local x = newpart() | |
998 | ||
999 | x.Size = Vector3.new(4,.2,.2) | |
1000 | ||
1001 | local sp = Instance.new("SpecialMesh",x) | |
1002 | ||
1003 | sp.MeshType = "Wedge" | |
1004 | ||
1005 | sp.Scale = Vector3.new(1,.5,.1) | |
1006 | ||
1007 | weld(h,x,CFrame.new(.175,2.85,.01) * CFrame.Angles(math.pi,0,-math.pi/2)) | |
1008 | ||
1009 | ||
1010 | ||
1011 | local x = newpart() | |
1012 | ||
1013 | x.Size = Vector3.new(4,.2,.2) | |
1014 | ||
1015 | local sp = Instance.new("SpecialMesh",x) | |
1016 | ||
1017 | sp.MeshType = "Wedge" | |
1018 | ||
1019 | sp.Scale = Vector3.new(1,.5,.1) | |
1020 | ||
1021 | weld(h,x,CFrame.new(-.175,2.85,-.01) * CFrame.Angles(math.pi,math.pi,-math.pi/2)) | |
1022 | ||
1023 | ||
1024 | ||
1025 | local x = newpart() | |
1026 | ||
1027 | x.Size = Vector3.new(4,.2,.2) | |
1028 | ||
1029 | local sp = Instance.new("SpecialMesh",x) | |
1030 | ||
1031 | sp.MeshType = "Wedge" | |
1032 | ||
1033 | sp.Scale = Vector3.new(1,.5,.1) | |
1034 | ||
1035 | weld(h,x,CFrame.new(-.175,2.85,.01) * CFrame.Angles(0,math.pi,-math.pi/2)) | |
1036 | ||
1037 | ||
1038 | ||
1039 | local tip = Vector3.new(0,5.4,0) | |
1040 | ||
1041 | ||
1042 | ||
1043 | WeldTriangle(h,Vector3.new(.125,4.85,-.02),Vector3.new(0,5.1,-.02),Vector3.new(.225,4.85,0)) | |
1044 | ||
1045 | WeldTriangle(h,tip,Vector3.new(0,5.1,-.02),Vector3.new(.225,4.85,0)) | |
1046 | ||
1047 | ||
1048 | ||
1049 | WeldTriangle(h,Vector3.new(.125,4.85,.02),Vector3.new(0,5.1,.02),Vector3.new(.225,4.85,0)) | |
1050 | ||
1051 | WeldTriangle(h,tip,Vector3.new(0,5.1,.02),Vector3.new(.225,4.85,0)) | |
1052 | ||
1053 | ||
1054 | ||
1055 | WeldTriangle(h,Vector3.new(-.125,4.85,-.02),Vector3.new(0,5.1,-.02),Vector3.new(-.225,4.85,0)) | |
1056 | ||
1057 | WeldTriangle(h,tip,Vector3.new(0,5.1,-.02),Vector3.new(-.225,4.85,0)) | |
1058 | ||
1059 | ||
1060 | ||
1061 | WeldTriangle(h,Vector3.new(-.125,4.85,.02),Vector3.new(0,5.1,.02),Vector3.new(-.225,4.85,0)) | |
1062 | ||
1063 | WeldTriangle(h,tip,Vector3.new(0,5.1,.02),Vector3.new(-.225,4.85,0)) | |
1064 | ||
1065 | ||
1066 | ||
1067 | ||
1068 | ||
1069 | --CFrame.new(.9,1.9,.54) * CFrame.Angles(-math.pi/2,0,math.pi/2) * CFrame.Angles(.58,.04,-.05) * CFrame.Angles(0,0,math.pi) | |
1070 | ||
1071 | ||
1072 | ||
1073 | do | |
1074 | ||
1075 | local function QuaternionFromCFrame(cf) | |
1076 | ||
1077 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
1078 | ||
1079 | local trace = m00 + m11 + m22 | |
1080 | ||
1081 | if trace > 0 then | |
1082 | ||
1083 | local s = math.sqrt(1 + trace) | |
1084 | ||
1085 | local recip = 0.5/s | |
1086 | ||
1087 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
1088 | ||
1089 | else | |
1090 | ||
1091 | local i = 0 | |
1092 | ||
1093 | if m11 > m00 then | |
1094 | ||
1095 | i = 1 | |
1096 | ||
1097 | end | |
1098 | ||
1099 | if m22 > (i == 0 and m00 or m11) then | |
1100 | ||
1101 | i = 2 | |
1102 | ||
1103 | end | |
1104 | ||
1105 | if i == 0 then | |
1106 | ||
1107 | local s = math.sqrt(m00-m11-m22+1) | |
1108 | ||
1109 | local recip = 0.5/s | |
1110 | ||
1111 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
1112 | ||
1113 | elseif i == 1 then | |
1114 | ||
1115 | local s = math.sqrt(m11-m22-m00+1) | |
1116 | ||
1117 | local recip = 0.5/s | |
1118 | ||
1119 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
1120 | ||
1121 | elseif i == 2 then | |
1122 | ||
1123 | local s = math.sqrt(m22-m00-m11+1) | |
1124 | ||
1125 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
1126 | ||
1127 | end | |
1128 | ||
1129 | end | |
1130 | ||
1131 | end | |
1132 | ||
1133 | local function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
1134 | ||
1135 | local xs, ys, zs = x + x, y + y, z + z | |
1136 | ||
1137 | local wx, wy, wz = w*xs, w*ys, w*zs | |
1138 | ||
1139 | local xx = x*xs | |
1140 | ||
1141 | local xy = x*ys | |
1142 | ||
1143 | local xz = x*zs | |
1144 | ||
1145 | local yy = y*ys | |
1146 | ||
1147 | local yz = y*zs | |
1148 | ||
1149 | local zz = z*zs | |
1150 | ||
1151 | 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)) | |
1152 | ||
1153 | end | |
1154 | ||
1155 | local function QuaternionSlerp(a, b, t) | |
1156 | ||
1157 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
1158 | ||
1159 | local startInterp, finishInterp; | |
1160 | ||
1161 | if cosTheta >= 0.0001 then | |
1162 | ||
1163 | if (1 - cosTheta) > 0.0001 then | |
1164 | ||
1165 | local theta = math.acos(cosTheta) | |
1166 | ||
1167 | local invSinTheta = 1/math.sin(theta) | |
1168 | ||
1169 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
1170 | ||
1171 | finishInterp = math.sin(t*theta)*invSinTheta | |
1172 | ||
1173 | else | |
1174 | ||
1175 | startInterp = 1-t | |
1176 | ||
1177 | finishInterp = t | |
1178 | ||
1179 | end | |
1180 | ||
1181 | else | |
1182 | ||
1183 | if (1+cosTheta) > 0.0001 then | |
1184 | ||
1185 | local theta = math.acos(-cosTheta) | |
1186 | ||
1187 | local invSinTheta = 1/math.sin(theta) | |
1188 | ||
1189 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
1190 | ||
1191 | finishInterp = math.sin(t*theta)*invSinTheta | |
1192 | ||
1193 | else | |
1194 | ||
1195 | startInterp = t-1 | |
1196 | ||
1197 | finishInterp = t | |
1198 | ||
1199 | end | |
1200 | ||
1201 | end | |
1202 | ||
1203 | 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 | |
1204 | ||
1205 | end | |
1206 | ||
1207 | function clerp(a,b,t) | |
1208 | ||
1209 | local qa = {QuaternionFromCFrame(a)} | |
1210 | ||
1211 | local qb = {QuaternionFromCFrame(b)} | |
1212 | ||
1213 | local ax, ay, az = a.x, a.y, a.z | |
1214 | ||
1215 | local bx, by, bz = b.x, b.y, b.z | |
1216 | ||
1217 | local _t = 1-t | |
1218 | ||
1219 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
1220 | ||
1221 | end | |
1222 | ||
1223 | end | |
1224 | ||
1225 | ||
1226 | ||
1227 | local run = game:GetService("RunService") | |
1228 | ||
1229 | local doing = {} | |
1230 | ||
1231 | function ctween(weld,prop,cfr,time,skipwait,stopafter) | |
1232 | ||
1233 | local function doit() | |
1234 | ||
1235 | local timeused = 0 | |
1236 | ||
1237 | local bgn = weld[prop] | |
1238 | ||
1239 | doing[weld] = doing[weld] or {} | |
1240 | ||
1241 | local now = tick() | |
1242 | ||
1243 | doing[weld][prop] = now | |
1244 | ||
1245 | stopafter = math.min(stopafter or time,time) | |
1246 | ||
1247 | repeat | |
1248 | ||
1249 | local i = (tick()-now)/time | |
1250 | ||
1251 | weld[prop] = clerp(bgn,cfr,i) | |
1252 | ||
1253 | until ((tick()-now) >= stopafter or doing[weld][prop] ~= now or not run.Stepped:wait()) | |
1254 | ||
1255 | weld[prop] = cfr | |
1256 | ||
1257 | return doing[weld][prop] == now | |
1258 | ||
1259 | end | |
1260 | ||
1261 | if not skipwait then return doit() | |
1262 | ||
1263 | else coroutine.wrap(doit)() end | |
1264 | ||
1265 | end | |
1266 | ||
1267 | ||
1268 | ||
1269 | ||
1270 | function playSound(id,parent,volume,pitch) | |
1271 | local sound = Instance.new("Sound",parent or workspace) | |
1272 | sound.SoundId = "http://www.roblox.com/asset?id="..id | |
1273 | sound.Volume = volume or 1 | |
1274 | sound.Pitch = pitch or 1 | |
1275 | coroutine.wrap(function() | |
1276 | wait() | |
1277 | sound:Play() | |
1278 | wait(10) | |
1279 | sound:Stop() | |
1280 | sound:Destroy() | |
1281 | end)() | |
1282 | return sound | |
1283 | end | |
1284 | ||
1285 | ||
1286 | ||
1287 | ||
1288 | ||
1289 | local mouse = plr:GetMouse() | |
1290 | ||
1291 | local equipped = true | |
1292 | ||
1293 | local enabled = true | |
1294 | ||
1295 | local torso = char:WaitForChild("Torso") | |
1296 | ||
1297 | local ra = char["Right Arm"] | |
1298 | ||
1299 | local la = char["Left Arm"] | |
1300 | ||
1301 | ||
1302 | ||
1303 | local RS = torso:FindFirstChild("aRS") | |
1304 | ||
1305 | local LS = torso:FindFirstChild("aLS") | |
1306 | ||
1307 | function checkShoulders() | |
1308 | ||
1309 | if not RS or not RS.Parent then | |
1310 | ||
1311 | RS = torso["Right Shoulder"]:Clone() | |
1312 | ||
1313 | RS.Name = "aRS" | |
1314 | ||
1315 | RS.Part0,RS.Part1 = nil,nil | |
1316 | ||
1317 | RS.DesiredAngle,RS.MaxVelocity,RS.CurrentAngle = 0,0,0 | |
1318 | ||
1319 | RS.Parent = torso | |
1320 | ||
1321 | end | |
1322 | ||
1323 | if not LS or not LS.Parent then | |
1324 | ||
1325 | LS = torso["Left Shoulder"]:Clone() | |
1326 | ||
1327 | LS.Name = "aLS" | |
1328 | ||
1329 | LS.Part0,LS.Part1 = nil,nil | |
1330 | ||
1331 | LS.DesiredAngle,LS.MaxVelocity,LS.CurrentAngle = 0,0,0 | |
1332 | ||
1333 | LS.Parent = torso | |
1334 | ||
1335 | end | |
1336 | ||
1337 | end | |
1338 | ||
1339 | checkShoulders() | |
1340 | ||
1341 | local rs,ls = torso["Right Shoulder"],torso["Left Shoulder"] | |
1342 | ||
1343 | rs.Part0,rs.Part1,ls.Part0,ls.Part1 = nil,nil,nil,nil | |
1344 | ||
1345 | RS.Part0,RS.Part1,LS.Part0,LS.Part1 = torso,ra,torso,la | |
1346 | ||
1347 | RS.C0,RS.C1,LS.C0,LS.C1 = rs.C0,rs.C1,ls.C0,ls.C1 | |
1348 | ||
1349 | ||
1350 | ||
1351 | ||
1352 | ||
1353 | local gripback = CFrame.new(.1,-.65,-.3) * CFrame.Angles(1.1,.2,-.5) | |
1354 | ||
1355 | local ridle = rs.C0 * CFrame.Angles(-.2,.05,.1) | |
1356 | ||
1357 | local lidle = ls.C0 * CFrame.Angles(-.2,-.05,-.1) | |
1358 | ||
1359 | ||
1360 | ||
1361 | function unEquip() | |
1362 | ||
1363 | if not enabled or not equipped then return end | |
1364 | ||
1365 | enabled = false | |
1366 | ||
1367 | equipped = false | |
1368 | ||
1369 | grip.C0 = griphand | |
1370 | ||
1371 | ctween(RS,"C0",rs.C0*CFrame.Angles(.1,0,3.1)*CFrame.Angles(0,.8,0),.5,true) | |
1372 | ||
1373 | wait(.3) | |
1374 | ||
1375 | ctween(grip,"C0",gripback,.2,true) | |
1376 | ||
1377 | wait(.25) | |
1378 | ||
1379 | ctween(LS,"C0",ls.C0*CFrame.Angles(0,0,.35),.1,true) | |
1380 | ||
1381 | ctween(RS,"C0",rs.C0*CFrame.Angles(.1,0,3.1)*CFrame.Angles(0,1.05,0),.2,true) | |
1382 | ||
1383 | wait(.1) | |
1384 | ||
1385 | ctween(LS,"C0",ls.C0,.3,true) | |
1386 | ||
1387 | grip.C0 = torso.CFrame:toObjectSpace(h.CFrame) * grip.C1 | |
1388 | ||
1389 | grip.Part0 = torso | |
1390 | ||
1391 | ctween(grip,"C0",CFrame.new(1.4,1.6,.52) * CFrame.Angles(-math.pi/2,0,math.pi/2) * CFrame.Angles(.7,.07,-.05) * CFrame.Angles(0,0,math.pi),.2,true) | |
1392 | ||
1393 | wait(.1) | |
1394 | ||
1395 | ctween(RS,"C0",rs.C0,.5) | |
1396 | ||
1397 | wait() | |
1398 | ||
1399 | ||
1400 | enabled = true | |
1401 | ||
1402 | end | |
1403 | ||
1404 | ||
1405 | ||
1406 | function equip() | |
1407 | ||
1408 | if not enabled or equipped then return end | |
1409 | ||
1410 | enabled = false | |
1411 | ||
1412 | equipped = true | |
1413 | ||
1414 | checkShoulders() | |
1415 | ||
1416 | rs.Part0,rs.Part1,ls.Part0,ls.Part1 = nil,nil,nil,nil | |
1417 | ||
1418 | RS.Part0,RS.Part1,LS.Part0,LS.Part1 = torso,ra,torso,la | |
1419 | ||
1420 | RS.C0,RS.C1,LS.C0,LS.C1 = rs.C0,rs.C1,ls.C0,ls.C1 | |
1421 | ||
1422 | ctween(RS,"C0",rs.C0*CFrame.Angles(.1,0,3.1)*CFrame.Angles(0,1.05,0),.5,true) | |
1423 | ||
1424 | wait(.4) | |
1425 | ||
1426 | ctween(LS,"C0",ls.C0*CFrame.Angles(0,0,.3),.15,true) | |
1427 | ||
1428 | wait(.1) | |
1429 | ||
1430 | grip.C0 = ra.CFrame:toObjectSpace(h.CFrame) * grip.C1 | |
1431 | ||
1432 | grip.Part0 = ra | |
1433 | ||
1434 | ctween(grip,"C0",griphand,.4,true) | |
1435 | ||
1436 | wait(.05) | |
1437 | ||
1438 | ctween(LS,"C0",ls.C0,.4,true) | |
1439 | ||
1440 | ctween(RS,"C0",rs.C0*CFrame.Angles(.1,0,3.1)*CFrame.Angles(0,.8,0),.3) | |
1441 | ||
1442 | ctween(RS,"C0",rs.C0,.3) | |
1443 | ||
1444 | wait() | |
1445 | ||
1446 | enabled = true | |
1447 | ||
1448 | end | |
1449 | ||
1450 | ||
1451 | ||
1452 | local walking = false | |
1453 | ||
1454 | if char:FindFirstChild("Humanoid") then | |
1455 | ||
1456 | char.Humanoid.Running:connect(function(s) | |
1457 | ||
1458 | walking = s > 0 | |
1459 | ||
1460 | end) | |
1461 | ||
1462 | end | |
1463 | ||
1464 | ||
1465 | ||
1466 | local noidle = false | |
1467 | ||
1468 | local bg = torso:FindFirstChild("aBG") or Instance.new("BodyGyro",torso) | |
1469 | ||
1470 | bg.maxTorque = Vector3.new() | |
1471 | ||
1472 | bg.cframe = torso.CFrame | |
1473 | ||
1474 | bg.Name = "aBG" | |
1475 | ||
1476 | bg.D =60 | |
1477 | ||
1478 | local bgb = CFrame.new() | |
1479 | ||
1480 | local sline = false | |
1481 | ||
1482 | ||
1483 | ||
1484 | game:GetService("RunService").Stepped:connect((function() | |
1485 | ||
1486 | if equipped then | |
1487 | ||
1488 | bg.maxTorque = Vector3.new(1,1,1)*4e3 | |
1489 | ||
1490 | bg.cframe = clerp(bg.cframe,CFrame.new(torso.Position,torso.Position+workspace.CurrentCamera.CoordinateFrame.lookVector*Vector3.new(1,0,1))*bgb,.6) | |
1491 | ||
1492 | else | |
1493 | ||
1494 | bg.maxTorque = Vector3.new() | |
1495 | ||
1496 | end | |
1497 | ||
1498 | if enabled and not noidle then | |
1499 | ||
1500 | local i1 = math.sin(tick()) | |
1501 | ||
1502 | local i2 = math.sin(tick()*10) | |
1503 | ||
1504 | RS.C0 = clerp(RS.C0,ridle * CFrame.Angles(.03*i1+(walking and .08 or 0),.01*i1+(walking and i2*.2 or 0),.01*i1+(walking and i2*.7-.05 or 0)),.2) | |
1505 | ||
1506 | LS.C0 = clerp(LS.C0,lidle * CFrame.Angles(.03*i1+(walking and .08 or 0),-.01*i1+(walking and i2*.2 or 0),-.01*i1+(walking and i2*.9+.2 or 0)),.2) | |
1507 | ||
1508 | end | |
1509 | ||
1510 | if sline then | |
1511 | ||
1512 | local blcf = blade.CFrame*CFrame.new(-.125,.2,0) | |
1513 | ||
1514 | if scfr and (blade.Position-scfr.p).magnitude > .1 then | |
1515 | ||
1516 | part.Transparency = .8 | |
1517 | ||
1518 | part.BrickColor = BrickColor.new("Really red") | |
1519 | ||
1520 | part.Reflectance = .0 | |
1521 | ||
1522 | local h = 4.7 | |
1523 | ||
1524 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
1525 | ||
1526 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1527 | ||
1528 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
1529 | ||
1530 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1531 | ||
1532 | scfr = blcf | |
1533 | ||
1534 | elseif not scfr then | |
1535 | ||
1536 | scfr = blcf | |
1537 | ||
1538 | end | |
1539 | ||
1540 | else | |
1541 | ||
1542 | scfr = nil | |
1543 | ||
1544 | end | |
1545 | ||
1546 | end)) | |
1547 | ||
1548 | ||
1549 | ||
1550 | local combo = 0 | |
1551 | ||
1552 | local combolast = 0 | |
1553 | ||
1554 | ||
1555 | ||
1556 | ||
1557 | ||
1558 | - | local pushaway = 0 |
1558 | + | local pushaway = 666 |
1559 | ||
1560 | - | local damage = 0 |
1560 | + | local damage = 666 |
1561 | ||
1562 | ||
1563 | ||
1564 | blade.Touched:connect((function(hit) | |
1565 | ||
1566 | if hit:IsDescendantOf(char) then return end | |
1567 | ||
1568 | ||
1569 | ||
1570 | for i,v in pairs(hit.Parent:GetChildren()) do | |
1571 | ||
1572 | if v:IsA("Humanoid") then | |
1573 | ||
1574 | v:TakeDamage(damage) | |
1575 | ||
1576 | elseif v.Name == "Torso" and v:IsA("Part") then | |
1577 | ||
1578 | local d = (v.Position-torso.Position).unit * pushaway / 20 | |
1579 | ||
1580 | if NLS then | |
1581 | ||
1582 | --NLS(("for i=1,20 do wait(1/30) script.Parent.CFrame = script.Parent.CFrame + Vector3.new(%d,%d,%d) end script:Destroy()"):format(d.X,d.Y,d.Z),v) | |
1583 | ||
1584 | end | |
1585 | ||
1586 | end | |
1587 | ||
1588 | end | |
1589 | ||
1590 | ||
1591 | ||
1592 | end)) | |
1593 | ||
1594 | ||
1595 | ||
1596 | ||
1597 | ||
1598 | ||
1599 | ||
1600 | mouse.KeyDown:connect((function(key) | |
1601 | ||
1602 | if not enabled then return end | |
1603 | ||
1604 | if key == "q" then | |
1605 | ||
1606 | (equipped and unEquip or equip)() | |
1607 | ||
1608 | end | |
1609 | ||
1610 | if key == "r" and equipped then | |
1611 | ||
1612 | playSound(154965962,x,1,1) | |
1613 | ||
1614 | enabled = false | |
1615 | ||
1616 | local cf = torso.CFrame | |
1617 | ||
1618 | - | damage = 40 |
1618 | + | damage = 666 |
1619 | ||
1620 | - | pushaway = 20 |
1620 | + | pushaway = 666 |
1621 | ||
1622 | for i=1,2 do | |
1623 | ||
1624 | ctween(RS,"C0",rs.C0*CFrame.Angles(.2,0,1.5) * CFrame.Angles(0,1,0),.05,true) | |
1625 | ||
1626 | ctween(torso,"CFrame",cf*CFrame.new(0,0,-1) * CFrame.Angles(0,-2,0),.05) | |
1627 | ||
1628 | ctween(RS,"C0",rs.C0*CFrame.Angles(.2,0,2)* CFrame.Angles(0,1,0),.05,true) | |
1629 | ||
1630 | ctween(torso,"CFrame",cf*CFrame.new(0,0,-2) * CFrame.Angles(0,-3.5,0),.05) | |
1631 | ||
1632 | ctween(RS,"C0",rs.C0*CFrame.Angles(.2,0,2)* CFrame.Angles(0,1,0),.05,true) | |
1633 | ||
1634 | ctween(torso,"CFrame",cf*CFrame.new(0,0,-3) * CFrame.Angles(0,-5.5,0),.05) | |
1635 | ||
1636 | ctween(RS,"C0",rs.C0*CFrame.Angles(.2,0,1.5)* CFrame.Angles(0,1.6,0)*CFrame.Angles(0,0,-1),.05,true) | |
1637 | ||
1638 | sline = true | |
1639 | ||
1640 | ctween(torso,"CFrame",cf*CFrame.new(0,0,-4) * CFrame.Angles(0,-5.8,0),.05) | |
1641 | ||
1642 | ctween(RS,"C0",rs.C0*CFrame.Angles(.2,0,1.2)* CFrame.Angles(0,1.6,0)*CFrame.Angles(0,0,-1.9),.1,true) | |
1643 | ||
1644 | ctween(torso,"CFrame",cf*CFrame.new(0,0,-5) * CFrame.Angles(0,-7.7,0),.1) | |
1645 | ||
1646 | sline = false | |
1647 | ||
1648 | playSound(154965962,x,1,1) | |
1649 | ||
1650 | cf = cf * CFrame.new(0,0,-5) | |
1651 | end | |
1652 | ||
1653 | wait(.05) | |
1654 | ||
1655 | damage = 0 | |
1656 | ||
1657 | pushaway = 0 | |
1658 | ||
1659 | sline = false | |
1660 | ||
1661 | enabled = true | |
1662 | ||
1663 | ||
1664 | ||
1665 | end | |
1666 | ||
1667 | if key == "e" and equipped then | |
1668 | ||
1669 | playSound(154965962,x,1,1) | |
1670 | ||
1671 | enabled = false | |
1672 | ||
1673 | if combo > 0 and tick() > combolast + 1 then | |
1674 | ||
1675 | combo = 0 | |
1676 | ||
1677 | end | |
1678 | ||
1679 | local cnow = combo | |
1680 | ||
1681 | combo = combo + 1 | |
1682 | ||
1683 | if combo == 3 then | |
1684 | ||
1685 | combo = 0 | |
1686 | ||
1687 | end | |
1688 | ||
1689 | - | damage = 20 |
1689 | + | damage = 666 |
1690 | ||
1691 | - | pushaway = 10 |
1691 | + | pushaway = 666 |
1692 | ||
1693 | if cnow == 0 then | |
1694 | ||
1695 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,1.5) * CFrame.Angles(-.2,-.2,0),.1) | |
1696 | ||
1697 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,3) * CFrame.Angles(-.2,-.2,0),.1) | |
1698 | ||
1699 | bgb = CFrame.Angles(0,.5,0) | |
1700 | ||
1701 | sline = true | |
1702 | ||
1703 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,.6) * CFrame.Angles(.5,-.3,0),.1) | |
1704 | ||
1705 | wait(.05) | |
1706 | ||
1707 | enabled = true | |
1708 | ||
1709 | combolast = tick() | |
1710 | ||
1711 | noidle = true | |
1712 | ||
1713 | sline = false | |
1714 | ||
1715 | damage,pushaway = 0,0 | |
1716 | ||
1717 | local l = ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,.3) * CFrame.Angles(.6,-.5,0),.3) | |
1718 | ||
1719 | if l then | |
1720 | ||
1721 | noidle = false | |
1722 | ||
1723 | bgb = CFrame.Angles(0,0,0) | |
1724 | ||
1725 | end | |
1726 | ||
1727 | elseif cnow == 1 then | |
1728 | ||
1729 | bgb = CFrame.Angles(0,.4,0) | |
1730 | ||
1731 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,.5) * CFrame.Angles(.7,.7,0),.07) | |
1732 | ||
1733 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,1.3) * CFrame.Angles(.8,.8,0),.07) | |
1734 | ||
1735 | bgb = CFrame.Angles(0,-.6,0) | |
1736 | ||
1737 | sline = true | |
1738 | ||
1739 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,1) * CFrame.Angles(-.9,1.5,0)*CFrame.Angles(0,0,-.7),.1) | |
1740 | ||
1741 | wait(.05) | |
1742 | ||
1743 | enabled = true | |
1744 | ||
1745 | combolast = tick() | |
1746 | ||
1747 | noidle = true | |
1748 | ||
1749 | sline = false | |
1750 | ||
1751 | damage,pushaway = 0,0 | |
1752 | ||
1753 | local l = ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,.4) * CFrame.Angles(-.5,.8,0),.3) | |
1754 | ||
1755 | if l then | |
1756 | ||
1757 | noidle = false | |
1758 | ||
1759 | bgb = CFrame.Angles(0,0,0) | |
1760 | ||
1761 | end | |
1762 | ||
1763 | elseif cnow == 2 then | |
1764 | ||
1765 | bgb = CFrame.Angles(0,-.1,0) | |
1766 | ||
1767 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,1.5) * CFrame.Angles(.1,-.1,0),.1) | |
1768 | ||
1769 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,3) * CFrame.Angles(.1,-.1,0),.1) | |
1770 | ||
1771 | bgb = CFrame.Angles(0,.1,0) | |
1772 | ||
1773 | sline = true | |
1774 | ||
1775 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,1.3) * CFrame.Angles(.1,.3,0),.05) | |
1776 | ||
1777 | ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,-.2) * CFrame.Angles(.1,.5,0),.05) | |
1778 | ||
1779 | wait(.1) | |
1780 | ||
1781 | enabled = true | |
1782 | ||
1783 | combolast = tick() | |
1784 | ||
1785 | noidle = true | |
1786 | ||
1787 | sline = false | |
1788 | ||
1789 | damage,pushaway = 0,0 | |
1790 | ||
1791 | local l = ctween(RS,"C0",rs.C0 * CFrame.Angles(0,0,.3) * CFrame.Angles(-.3,.2,0),.3) | |
1792 | ||
1793 | if l then | |
1794 | ||
1795 | noidle = false | |
1796 | ||
1797 | bgb = CFrame.Angles(0,0,0) | |
1798 | ||
1799 | end | |
1800 | ||
1801 | end | |
1802 | ||
1803 | end | |
1804 | ||
1805 | end)) |