-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathJohn Doe Blasters.lua
2792 lines (2625 loc) · 100 KB
/
John Doe Blasters.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
loadstring(game:HttpGet("https://raw.githubusercontent.com/Tescalus/Pendulum-Hubs-Source/main/Reanimation.lua"))()
--March 18th
math.randomseed(tick())
plr=game:service'Players'.LocalPlayer
ch,char=game.Workspace.non
hum=ch.Humanoid
tor,torso,rootpart,rj=ch.Torso,ch.Torso,ch.HumanoidRootPart,ch.HumanoidRootPart.RootJoint
m,mouse=plr:GetMouse(),plr:GetMouse()
cfn,ang,mr,int=CFrame.new,CFrame.Angles,math.rad,Instance.new
bc=BrickColor.new
head=ch.Head
cam=workspace.CurrentCamera
rj.C0=cfn()
rj.C1=cfn()
lib={}
lib.cone='1033714'
lib.ring="3270017"
lib.yato='579392805'
lib.diamond='9756362'
lib.crown='20329976'
rbx='rbxassetid://'
--tb and anti sc
v3 = Vector3.new
cn = CFrame.new
ca2 = CFrame.Angles
mf = math.floor
mran = math.random rn=mran
mrad = math.rad rd=mrad
mdeg = math.deg dg=mdeg
ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
mran2 = function(a,b) return mran(a*1000,b*1000)/1000 end
ud=UDim2.new
bn = BrickColor.new
c3 = Color3.new
--tb and anti sc
getSound=function(id)
game:service'ContentProvider':Preload('rbxassetid'..tostring(id))
local s=int("Sound",ch.Head)
s.SoundId='rbxassetid://' .. tostring(id-1)
s.Volume=1
return s
end
--declarations
--strings
local combostring=[[]]
local attackstring=[[]]
--sounds, some by qaeo
blocksound=getSound(260433722)
blocksound.Pitch=1
startsound=getSound(588738950) --260433747
startsound.Pitch=1
endsound=getSound(588736246) --260433769
endsound.Pitch=1
endsound.Volume=2
swsound=getSound(588736970)
--swsound.Pitch=0.8
swexp=getSound(365002939)
swexp.Pitch=1
spexp=getSound(365002939)
spexp.Pitch=1.2
startsound2=getSound(260433769)--260433769
startsound2.Pitch=0.8
startsound3=getSound(260433769)
startsound3.Pitch=0.89
chargesound=getSound(181004944)
chargesound.Pitch=1
basicsound=getSound(588736246)--260433747
basicsound.Pitch=1.2
dodgesound=getSound(177162407)
dodgesound.Pitch=1.4
landsound=getSound(315775190)
rushsound=getSound(134012323)--134012323
swoosh=getSound(231917988)
--swoosh.Pitch=1.2
swoosh.Volume=2
aerialcharge=getSound(265109959)
aerialcharge.Pitch=1.1
curse=getSound(231917971)
glass=getSound(130779172)
magictone1=getSound(588738950)
chargedupbeam=getSound(588735946)
chargedupbeam.Volume=2.5
diamondproj=getSound(231917751)
diamondproj.PlaybackSpeed=5
diamondbreak=getSound(130779172)
diamondbreak.Pitch=2
magicriff=getSound(588735156)
bigmagic=getSound(231917773)
walksound=getSound(142665236)
--tables
tweenTable={}
altTweenTable={}
local alljoints={}
textTable={}
local fx={}
moves={}
connectlist={}
cooldowns={}
movers={}
local linetable={}
moveDescriptions={
['John Missle']={move='John Missile',key='Left Mouse Button',desc=[[A basic, dark blast that is cheap on mana and easy to use. Deals low damage.]]},
['Doe Block']={move='Doe Block',desc=[[Blocks projectile attacks where you aim.]]},
['March 18th Beam']={move='March 18th Beam',desc=[[A beam of energy that deals heavy damage and knocks down foes.]]},
['Dark Hacks']={move='Dark Hacks',desc=[[A series of dark stakes that explode to push enemies back and deal medium damage.]]},
['John Slam']={move='John Slam',key=[[Space, Space, Q]],desc=[[An aerial attack that slams the character against the ground to create a shockwave that knocks down and deals low damage to enemies.]]},
['Doe Sword']={move='Doe Sword',key=[[Space, Space, Hold R]],desc=[[An aerial attack with huge power; creates a sphere of dark energy that flings spectral swords which explode and deal damage.]]},
['Hack Curse']={move='Hack Curse',desc=[[An attack that inflicts the Cursed debuff (5% maxhealth damage every second) and lifesteals half of damage dealt.]]},
['Jane Slash']={move='Jane Slash',desc=[[Summons a spectral sword that slashes to deal huge critical damage. Very high crit chance.]]},
['John Storm']={move='John Storm',desc=[[Charge up dark energy to release a flurry of diamonds that explode to deal damage with high crit chance. Heals twice damage dealt. High mana cost.]]},
}
--bool global
local run=false
idle=false
local animPlaying=false
local runLeg=false
canRunLeg=false
local deb=false
local basicswitch=false
local canExecuteMoves=true
local bg=false
local sprinting=false
ascension=false
local aright=false
local aleft=false
local aforward=false
local aback=false
local mult=2
--num
maxmana=math.huge
mana=math.huge
chain=0
regws=16
bigws=14
hum.MaxHealth=200
spawn(function()
wait() hum.Health=200
end)
-- gui
local managui=int('ScreenGui',plr.PlayerGui)
managui.Name='John Doe Gui'
local frame=int('Frame',managui)
frame.Size=UDim2.new(0.15,0,0.02,0)
frame.Position=UDim2.new(1-0.17,0,0.7,0)
frame.BackgroundColor3=BrickColor.new('Black').Color
frame.BorderColor3=BrickColor.new('Really black').Color
frame.BorderSizePixel=6
local manabartext=int('TextLabel',frame)
manabartext.ZIndex=2
manabartext.Size=UDim2.new(1,0,1,0)
manabartext.TextColor3=BrickColor.new('White').Color
manabartext.TextStrokeTransparency=1
manabartext.Font='SourceSansLight'
manabartext.Text=tostring(mana)..'/'..tostring(maxmana)
manabartext.FontSize='Size18'
manabartext.BackgroundTransparency=1
local manabar=int('Frame',frame)
manabar.Size=UDim2.new(1,0,1,0)
manabar.BorderSizePixel=0
manabar.BackgroundColor3=BrickColor.new('Bright blue').Color
manabar.Size=UDim2.new(mana/maxmana,0,1,0)
local chainframe=int('Frame',managui)
chainframe.Size=frame.Size
chainframe.BackgroundTransparency=1
chainframe.Position=frame.Position+UDim2.new(0.07,0,-0.05,0)
local chaintext=int('TextLabel',chainframe)
chaintext.BackgroundTransparency=1
chaintext.TextStrokeColor3=BrickColor.new('White').Color
chaintext.TextStrokeTransparency=0
chaintext.Size=UDim2.new(1,0,1,0)
chaintext.Font='Antique'
chaintext.FontSize='Size48'
chaintext.Text='0x'
local cooldownframe=int('Frame',managui)
cooldownframe.Size=UDim2.new(0.3,0,0.2,0)
cooldownframe.BorderSizePixel=0
cooldownframe.Transparency=1
cooldownframe.Position=UDim2.new(0.7,0,0.8,0)
local movebutton=int('TextButton',managui)
movebutton.Position=UDim2.new(0.93,0,0.73,0)
movebutton.Text='Moves'
movebutton.Font='Antique'
movebutton.BackgroundColor3=BrickColor.new('Really black').Color
movebutton.BorderSizePixel=0
movebutton.TextColor3=BrickColor.new('White').Color
movebutton.FontSize='Size24'
movebutton.Size=UDim2.new(0.05,0,0.025,0)
movesframe=int('Frame',managui)
movesframe.Size=UDim2.new(0.3,0,0.5,0)
movesframe.BackgroundColor3=BrickColor.new('Really black').Color
movesframe.BorderSizePixel=6
movesframe.Position=UDim2.new(0.35,0,0.25,0)
movesframe.BorderColor3=BrickColor.new('Black').Color
movesframe.Visible=false
local scrollframe=int('ScrollingFrame',movesframe)
scrollframe.Size=UDim2.new(0.35,0,1,0)
scrollframe.BackgroundColor3=BrickColor.new('Really black').Color
scrollframe.ZIndex=2
scrollframe.BorderColor3=BrickColor.new('Black').Color
scrollframe.BorderSizePixel=5
local descbox=int('Frame',movesframe)
descbox.Size=UDim2.new(1-0.35,0,1,0)
descbox.Position=UDim2.new(0.35,0,0,0)
descbox.ZIndex=3
descbox.BackgroundTransparency=1
descbox.BorderSizePixel=0
local nam=int('TextLabel',descbox)
nam.Size=UDim2.new(1,0,0.05,0)
nam.Position=UDim2.new(0,0,0.1,0)
nam.ZIndex=4
nam.Font='Antique'
nam.FontSize='Size24'
nam.BackgroundTransparency=1
nam.TextColor3=BrickColor.new('White').Color
nam.Text='Select a move!'
local desc=int('TextLabel',descbox)
desc.BackgroundTransparency=1
desc.TextWrapped=true
desc.Font='Antique'
desc.FontSize='Size36'
desc.Text=''
desc.TextColor3=BrickColor.new('White').Color
desc.TextXAlignment='Center'
desc.TextYAlignment='Top'
desc.Size=UDim2.new(1,0,0.6,0)
desc.Position=UDim2.new(0,0,0.2,0)
desc.ZIndex=4
local manacostg=int('TextLabel',desc)
manacostg.Size=UDim2.new(1,0,0.1,0)
manacostg.Text=''
manacostg.Font='Antique'
manacostg.FontSize='Size28'
manacostg.TextColor3=BrickColor.new('White').Color
manacostg.Position=UDim2.new(0,0,0.85,0)
manacostg.BackgroundTransparency=1
local cmb=int('TextLabel',desc)
cmb.Size=UDim2.new(1,0,0.1,0)
cmb.Text=''
cmb.Font='Antique'
cmb.FontSize='Size28'
cmb.TextColor3=BrickColor.new('White').Color
cmb.Position=UDim2.new(0,0,0.7,0)
cmb.BackgroundTransparency=1
local buttony=0.002
for _,v in pairs(moveDescriptions) do
local button=int('TextButton',scrollframe)
button.Size=UDim2.new(0.85,0,0.05,0)
button.BorderSizePixel=0
button.BackgroundColor3=BrickColor.new('Black').Color
button.Font='Antique'
button.FontSize='Size24'
button.TextColor3=BrickColor.new('White').Color
button.TextWrapped=true
button.Text=v.move
button.ZIndex=3
button.Position=UDim2.new(0.03,0,buttony,0)
buttony=buttony+0.052
button.MouseButton1Down:connect(function()
desc.Text=v.desc
nam.Text=v.move
if v.key then
cmb.Text='Keys: ' .. v.key
else
cmb.Text='Keys: ' .. string.upper(moves[v.move].key)
end
manacostg.Text='Mana Cost: ' .. tostring(moves[v.move].manacost)
end)
end
movebutton.MouseButton1Down:connect(function()
if movesframe.Visible==false then
movesframe.Visible=true
else
movesframe.Visible=false
end
end)
local cx=0
local cy=0
addCoolDownGui=function(v)
local thing=int('TextLabel',cooldownframe)
thing.TextWrapped=true
thing.Size=UDim2.new(0.2,0,0.5,0)
thing.Position=UDim2.new(cx,0,cy,0)
thing.BackgroundColor3=BrickColor.new('Really black').Color
thing.Font='Antique'
thing.FontSize='Size24'
thing.TextColor3=BrickColor.new('White').Color
thing.BorderSizePixel=0
thing.Text=v.move .. ' ' .. tostring(v.timeleft)
spawn(function()
repeat wait(0.1) thing.Text=v.move .. ' ' .. tostring(v.timeleft) until v.timeleft<0.1
thing:Destroy()
if cy<1 and cx>0 then
cx=cx-0.2
end
if cy>1 and cx>0 then
cx=cx-0.2
end
end)
if cx<1-0.2 then
cx=cx+0.2
else
cy=0.5
cx=0
end
end
ypcall(function()
ch.Animate:Destroy()
ch.Humanoid.Animator:Destroy()
end)
if ch:findFirstChild("Riven") then
ch['Riven']:Destroy()
end
local tube=int("Model",ch)
tube.Name='Riven'
script.Parent=tube
--functions
Weld = function(p0,p1,x,y,z,rx,ry,rz,par)--recommend to use this with my weld. use this function only with arm lockers.
p0.Position = p1.Position
local w = Instance.new('Motor',par or p0)
w.Part0 = p1
w.Part1 = p0
w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
w.MaxVelocity = .1
return w
end
function clerp(c1,c2,sp)
local R1,R2,R3 = c1:toEulerAnglesXYZ()
local R21,R22,R23 = c2:toEulerAnglesXYZ()
return CFrame.new(
c1.X + (c2.X-c1.X)*sp,
c1.Y + (c2.Y-c1.Y)*sp,
c1.Z + (c2.Z-c1.Z)*sp)*CFrame.Angles(
R1 + (R21-R1)*sp,
R2 + (R22-R2)*sp,
R3 + (R23-R3)*sp
)
end
Tween = function(Weld, Stop, Step,a)
ypcall(function()
local func = function()
local Start = Weld.C1
local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
local Stop = Stop
local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
if not Step then Step=0.1 end
table.insert(tweenTable,{th=0,Weld=Weld,Step=Step,Start=Start,X1=X1,Y1=Y1,Z1=Z1,Stop=Stop,X2=X2,Y2=Y2,Z2=Z2})
end
if a then coroutine.wrap(func)() else func() end
end)
end
altTween = function(Weld, Stop, Step,a)
ypcall(function()
local func = function()
local Start = Weld.C1
local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
local Stop = Stop
local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
if not Step then Step=0.1 end
table.insert(altTweenTable,{th=0,Weld=Weld,Step=Step,Start=Start,X1=X1,Y1=Y1,Z1=Z1,Stop=Stop,X2=X2,Y2=Y2,Z2=Z2})
end
if a then coroutine.wrap(func)() else func() end
end)
end
weld=function(p0,p1,c0)
local w=Instance.new("Weld",p0)
w.Part0=p0
w.Part1=p1
w.C0=c0
return w
end
cp=function(parent,color,size,anchored,cancollide)
local newp=Instance.new("Part",parent)
newp.TopSurface='SmoothNoOutlines'
newp.BottomSurface='SmoothNoOutlines'
newp.FrontSurface='SmoothNoOutlines'
newp.BackSurface='SmoothNoOutlines'
newp.RightSurface='SmoothNoOutlines'
newp.LeftSurface='SmoothNoOutlines'
newp.FormFactor="Custom"
newp.BrickColor=bc(color)
local rn=math.random(3)
if rn==1 then
-- newp.BrickColor=BrickColor.new('Bright red')
end
newp.Size=size
newp.Anchored=anchored
newp.CanCollide=cancollide
newp:BreakJoints()
return newp
end
if ch:findFirstChild('Body Colors') then
ch['Body Colors'].HeadColor=BrickColor.new('Cool yellow')
ch['Body Colors'].TorsoColor=BrickColor.new('Bright yellow')
ch['Body Colors'].LeftLegColor=BrickColor.new('Pastel Blue')
ch['Body Colors'].RightLegColor=BrickColor.new('Pastel Blue')
ch['Body Colors'].RightArmColor=BrickColor.new('Cool yellow')
ch['Body Colors'].LeftArmColor=BrickColor.new('Cool yellow')
end
destroyJoints=function()
for i=1,5 do
for _,v in pairs(alljoints) do
ypcall(function()
v:Destroy()
table.remove(alljoints,_)
end)
end
end
end
initializeJoints=function()
destroyJoints()
rabr = cp(tube,'White',Vector3.new(1,1,1),false,false) rabr.Transparency = 1 rabr.Name='Locker'
rabr.Position = torso.Position
rw = Weld(rabr,torso,1.5,.5,0,0,0,0) rw.Parent = tube rw.Name = 'rw'
w = Instance.new("Weld",tube)
w.Part0,w.Part1 = ch['Right Arm'],rabr
w.C1 = CFrame.new(0,-.5,0)
labr = cp(tube,'White',Vector3.new(1,1,1),false,false) labr.Transparency = 1 labr.Name='Locker'
labr.Position = torso.Position
lw = Weld(labr,torso,-1.5,.5,0,0,0,0) lw.Parent = tube lw.Name = 'lw'
ww = Instance.new("Weld",tube)
ww.Part0,ww.Part1 = ch['Left Arm'],labr
ww.C1 = CFrame.new(0,-.5,0)
rlabr = cp(tube,'White',Vector3.new(1,1,1),false,false) rlabr.Transparency = 1 rlabr.Name='Locker'
rlabr.Position = torso.Position
rlw = Weld(rlabr,torso,0.5,-1.5,0,0,0,0) rlw.Parent = tube rlw.Name = 'rlw'
wl = Instance.new("Weld",tube)
wl.Part0,wl.Part1 = ch['Right Leg'],rlabr
wl.C1 = CFrame.new(0,-.5,0)
llabr = cp(tube,'White',Vector3.new(1,1,1),false,false) llabr.Transparency = 1 llabr.Name='Locker'
llabr.Position = torso.Position
llw = Weld(llabr,torso,-0.5,-1.5,0,0,0,0) llw.Parent = tube llw.Name = 'llw'
wwl = Instance.new("Weld",tube)
wwl.Part0,wwl.Part1 = ch['Left Leg'],llabr
wwl.C1 = CFrame.new(0,-.5,0)
nk = cp(tube,'White',Vector3.new(1,1,1),false,false) nk.Transparency = 1 nk.Name='Locker'
nk.Position = torso.Position
neck = Weld(nk,torso,0,2,0,0,0,0) neck.Parent = tube neck.Name = 'neck'
www = Instance.new("Weld",tube)
www.Part0,www.Part1 = ch['Head'],nk
www.C1 = CFrame.new(0,-.5,0)
table.insert(alljoints,rabr)
table.insert(alljoints,labr)
table.insert(alljoints,rw)
table.insert(alljoints,lw)
table.insert(alljoints,w)
table.insert(alljoints,ww)
table.insert(alljoints,rlabr)
table.insert(alljoints,llabr)
table.insert(alljoints,rlw)
table.insert(alljoints,llw)
table.insert(alljoints,wl)
table.insert(alljoints,wwl)
table.insert(alljoints,nk)
table.insert(alljoints,neck)
table.insert(alljoints,www)
end
cyl=function(prt)
local c=int("CylinderMesh",prt)
return c
end
blo=function(prt)
local c=int("BlockMesh",prt)
c.Name='bmsh'
return c
end
sphere=function(prt)
local c=int('SpecialMesh',prt)
c.MeshType='Sphere'
return c
end
newSpm=function(prt)
local nspm=int('SpecialMesh',prt)
nspm.MeshType='FileMesh'
return nspm
end
--cool hat
local hat=cp(tube,'Cool yellow',Vector3.new(1,1,1))
local hatmesh=int('SpecialMesh',hat)
hatmesh.MeshId=rbx..'0'
weld(ch.Head,hat,cfn(0,0,0))
local rarmdiamond=cp(tube,'Pastel Blue',Vector3.new(1,1,1))
local dia=newSpm(rarmdiamond)
dia.MeshId=rbx..lib.diamond
dia.Scale=Vector3.new(0.4,0.8,0.4)
weld(ch['Right Arm'],rarmdiamond,cfn(0.4,0,0))
local testshoulder=cp(tube,'Cool yellow',Vector3.new(1.1,0.6,1.1))
testshoulder.Material='SmoothPlastic'
weld(ch['Right Arm'],testshoulder,cfn(0,0.8,0))
--local testtorso=cp(tube,'Bright yellow',Vector3.new(2.8,0.4,1.1))
--blo(testtorso).Scale=Vector3.new(0.95,1,0.95)
--weld(tor,testtorso,cfn(0,0,0)*ang(0,0,mr(45)))
local testhalf=cp(tube,'Bright yellow',Vector3.new(1,2,1))
testhalf.Material='SmoothPlastic'
blo(testhalf).Scale=Vector3.new(1.003,1.003,1.005)
weld(tor,testhalf,cfn(0.5,0,0))
local cooldiamond=cp(tube,'Bright yellow',Vector3.new(0.5,0.5,0.5))
local dia=newSpm(cooldiamond)
dia.Scale=Vector3.new(0.4,0.8,0.45)
dia.MeshId=rbx..lib.diamond
weld(testhalf,cooldiamond,cfn(0,0.3,-0.3))
local cooldiamond2=cp(tube,'Bright yellow',Vector3.new(0.5,0.5,0.5))
local dia=newSpm(cooldiamond2)
dia.Scale=Vector3.new(0.4,0.8,0.45)
dia.MeshId=rbx..lib.diamond
weld(testhalf,cooldiamond2,cfn(0.2,-0.15,-0.3))
local cooldiamond3=cp(tube,'Bright yellow',Vector3.new(0.5,0.5,0.5))
local dia=newSpm(cooldiamond3)
dia.Scale=Vector3.new(0.4,0.8,0.45)
dia.MeshId=rbx..lib.diamond
weld(testhalf,cooldiamond3,cfn(-0.2,-0.15,-0.3))
--blo(ch['Right Leg'])
--ch['Right Leg'].Material='SmoothPlastic'
--[[
local testp=cp(tube,'Bright red',Vector3.new(2.1,1.3,1.2))
local tpb=blo(tstp)
tpb.Scale=Vector3.new(1.01,1.01,1)
weld(tor,testp,cfn(0,0.4,0))
]]
initializeJoints()
reset=function()
if run == false and animPlaying == false then
altTweenTable={}
Tween(llw,cfn(0,-0.08*math.sin(tick()*1.5),0)*ang(0,0,mr(5)))
Tween(rlw,cfn(0,-0.08*math.sin(tick()*1.5),0)*ang(0,0,mr(-5)))
Tween(rw,cfn(0,0.03*math.sin(tick()*1.5),0)*ang(0,0,mr(-15)+mr(-5*math.sin(tick()*1.5))))
Tween(lw,cfn(0,0.03*math.sin(tick()*1.5),0)*ang(0,0,mr(15)+mr(5*math.sin(tick()*1.5))))
Tween(neck,cfn())
Tween(rj,cfn(0,0.08*math.sin(tick()*1.5),0),0.3)
end
end
bigreset=function()
if run == false and animPlaying == false then
altTweenTable={}
Tween(llw,cfn(0,-0.08*math.sin(tick()*1.5*mult),0)*ang(0,0,mr(5)))
Tween(rlw,cfn(0,-0.08*math.sin(tick()*1.5*mult),0)*ang(0,0,mr(-5)))
Tween(rw,cfn(0,0.03*math.sin(tick()*1.5*mult),0)*ang(0,0,mr(-15)+mr(-5*math.sin(tick()*1.5))))
Tween(lw,cfn(0,0.03*math.sin(tick()*1.5*mult),0)*ang(0,0,mr(15)+mr(5*math.sin(tick()*1.5))))
Tween(neck,cfn())
Tween(rj,cfn(0,0.08*math.sin(tick()*1.5*mult),0),0.3)
end
end
resetLegs=function()
altTweenTable={}
Tween(llw,cfn())
Tween(rlw,cfn())
end
walkCycle=function()
if run==true and animPlaying==false then
tweenTable={}
Tween(neck,cfn())
Tween(rj,cfn())
Tween(llw,cfn(0,0,-0.2*math.sin(tick()*8))*ang(mr(10)+mr(40*math.sin(tick()*8)),0,0),0.6)
Tween(rlw,cfn(0,0,0.2*math.sin(tick()*8))*ang(mr(10)+mr(-40*math.sin(tick()*8)),0,0),0.6)
Tween(rw,cfn()*ang(mr(-40),0,mr(-30)),0.07)
Tween(lw,cfn()*ang(mr(20),0,mr(20)),0.07)
end
end
walkCycleBig=function()
if run==true and animPlaying==false then
tweenTable={}
Tween(neck,cfn())
Tween(rj,cfn())
Tween(llw,cfn(0,0,-0.2*math.sin(tick()*8)*mult)*ang(mr(10)+mr(40*math.sin(tick()*8)),0,0),0.6)
Tween(rlw,cfn(0,0,0.2*math.sin(tick()*8)*mult)*ang(mr(10)+mr(-40*math.sin(tick()*8)),0,0),0.6)
Tween(rw,cfn()*ang(mr(-40),0,mr(-30)),0.07)
Tween(lw,cfn()*ang(mr(20),0,mr(20)),0.07)
end
end
sprintCycle=function()
if run==true and animPlaying==false then
tweenTable={}
Tween(rj,cfn()*ang(mr(10),0,0))
Tween(llw,cfn(0,0,-0.2*math.sin(tick()*11))*ang(mr(20)+mr(60*math.sin(tick()*11)),0,0),0.25)
Tween(rlw,cfn(0,0,0.2*math.sin(tick()*11))*ang(mr(20)+mr(-60*math.sin(tick()*11)),0,0),0.25)
Tween(rw,cfn()*ang(mr(-20)+mr(60*math.sin(tick()*11)),0,mr(-10)),0.25)
Tween(lw,cfn()*ang(mr(-20)+mr(-60*math.sin(tick()*11)),0,mr(10)),0.25)
end
end
local jumping=false
jump=function()
if animPlaying==false then
jumping=true
run=false
resetLegs()
tweenTable={}
altTweenTable={}
-- animPlaying=true
-- Tween(rj,cfn()*ang(mr(-15),0,0),0.2)
Tween(neck,cfn(0,0,-0.2)*ang(mr(-20),0,0),0.1)
Tween(rw,cfn()*ang(mr(15),0,mr(-25)),0.1)
Tween(lw,cfn()*ang(mr(15),0,mr(25)),0.1)
Tween(rlw,cfn()*ang(mr(15),0,0),0.1)
Tween(llw,cfn()*ang(mr(15),0,0),0.1)
wait(0.2)
reset()
wait(0.1)
-- animPlaying=false
jumping=false
end
end
walkLegs=function()
if runLeg==true then
altTweenTable={}
altTween(llw,cfn(0,0,-0.2*math.sin(tick()*8))*ang(mr(20)+mr(50*math.sin(tick()*8)),0,0),0.6)
altTween(rlw,cfn(0,0,0.2*math.sin(tick()*8))*ang(mr(20)+mr(-50*math.sin(tick()*8)),0,0),0.6)
end
end
dealDamage=function(man,damage,crit,multi,lifesteal)
if man and man:findFirstChild'Humanoid' and man:findFirstChild'Head' then
local dm=damage
local cr=false
local hm=man.Humanoid
if crit then
if crit>0 then
local c=math.random(crit)
if c==1 then
cr=true
end
end
end
if cr==true then
if not multi then
dm=dm*1.5
else
dm=dm*multi
end
end
hm:TakeDamage(0)
if lifesteal then
--print'lifesteal'
local plife=lifesteal*dm
if hum.Health<hum.MaxHealth then
hum.Health=hum.Health+plife
local bbg=int('BillboardGui',tube)
bbg.Size=UDim2.new(1,0,1,0)
bbg.StudsOffset=Vector3.new(0,2,0)
bbg.StudsOffset=bbg.StudsOffset+Vector3.new(math.random(-math.random(50)/10,math.random(50)/10),0,math.random(-math.random(50)/10,math.random(50)/10))
bbg.Adornee=ch.Head
bbg.AlwaysOnTop=true
local tlabl=int('TextLabel',bbg)
tlabl.Size=UDim2.new(1,0,1,0)
tlabl.Text=tostring(plife)
tlabl.BackgroundTransparency=1
tlabl.TextColor3=BrickColor.new('Bright green').Color
tlabl.TextStrokeColor3=BrickColor.new('White').Color
tlabl.TextStrokeTransparency=0
tlabl.Font='Antique'
tlabl.FontSize='Size60'
table.insert(textTable,bbg)
end
end
chain=chain+1
if hm.MaxHealth>=99999 then
hm.Parent:BreakJoints()
end
local bbg=int('BillboardGui',tube)
bbg.Size=UDim2.new(1,0,1,0)
bbg.StudsOffset=Vector3.new(0,2,0)
bbg.StudsOffset=bbg.StudsOffset+Vector3.new(math.random(-math.random(50)/10,math.random(50)/10),0,math.random(-math.random(50)/10,math.random(50)/10))
bbg.Adornee=man.Head
bbg.AlwaysOnTop=true
local tlabl=int('TextLabel',bbg)
tlabl.Size=UDim2.new(1,0,1,0)
tlabl.Text=tostring(dm)
tlabl.BackgroundTransparency=1
tlabl.TextColor3=BrickColor.new('Really black').Color
tlabl.TextStrokeColor3=BrickColor.new('White').Color
if cr==true then
tlabl.TextColor3=BrickColor.new('Really red').Color
tlabl.TextStrokeColor3=BrickColor.new('Really black').Color
end
tlabl.TextStrokeTransparency=0
tlabl.Font='Antique'
tlabl.FontSize='Size60'
table.insert(textTable,bbg)
return dm
end
end
displayText=function(thing,text,color)
local bbg=int('BillboardGui',tube)
bbg.Size=UDim2.new(1,0,1,0)
bbg.StudsOffset=Vector3.new(0,3,0)
bbg.Adornee=thing
bbg.AlwaysOnTop=true
local tlabl=int('TextLabel',bbg)
tlabl.Size=UDim2.new(1,0,1,0)
tlabl.Text=text
tlabl.BackgroundTransparency=1
tlabl.TextColor3=BrickColor.new('Really black').Color
tlabl.TextStrokeColor3=BrickColor.new('White').Color
tlabl.TextStrokeTransparency=0
tlabl.Font='Antique'
tlabl.FontSize='Size60'
table.insert(textTable,bbg)
end
local tp=cp(tube,'White',Vector3.new(1,1,1))
tp.Transparency=1
weld(ch['Right Arm'],tp,cfn(0,-1,0))
addFx=function(item,int,final,func)
table.insert(fx,{item=item,int=int,func=func,final=final,stepval=0})
end
addMove=function(name,key,cooldown,func,manacost)
moves[name]={key=key,cooldown=cooldown,func=func,manacost=manacost}
end
drawLine=function(point_a,point_b,bc_code,angle,mag,width)
local dist=(point_a-point_b).magnitude;
local num=1
if mag then
num=mag
end
if dist>num then
local rad=dist/2;
local line=Instance.new('Part',tube)
line.Anchored=true;
line.FormFactor='Custom';
line.BrickColor=BrickColor.new(bc_code);
line.TopSurface='SmoothNoOutlines'
line.BottomSurface='SmoothNoOutlines'
line.LeftSurface='SmoothNoOutlines'
line.RightSurface='SmoothNoOutlines'
line.FrontSurface='SmoothNoOutlines'
line.BackSurface='SmoothNoOutlines'
line.Material='Neon'
line.CanCollide=false;
line.Size=Vector3.new(0.7,dist,0.7);
if width then
line.Size=Vector3.new(width,dist,width);
end
cyl(line).Name='blok'
-- Instance.new("BlockMesh",line).Name='blok'
line.CFrame=CFrame.new(point_a,point_b)*CFrame.new(0,0,-rad)*ang(mr(90),0,0)--*angle;
return line;
end
end;
depleteMana=function(amount)
if mana>0 then
if mana-amount>0 then
mana=mana-amount
return true
else
return false
end
end
end
executeMove=function(name)
if canExecuteMoves==true then
if ch and hum and hum.Health>0 then
local can=true
for _,v in pairs(cooldowns) do
if v.move==name then
can=false
break
end
end
if can==true then
local can2=true
if moves[name].manacost then
local a=depleteMana(moves[name].manacost)
if not a then
can2=false
end
end
if can2 then
moves[name].func()
end
end
end
end
end
addToCList=function(what,key)
local a={what,key=key,up=false}
table.insert(connectlist,a)
return a
end
waitForUp=function(what)
repeat wait() until what.up==true
end
addMover=function(what,step,func)
table.insert(movers,{mover=what,step=step,lastpoint=what.CFrame,func=func})
end
local function CreateRegion3FromLocAndSize(Position, Size)
local SizeOffset = Size/2
local Point1 = Position - SizeOffset
local Point2 = Position + SizeOffset
return Region3.new(Point1, Point2)
end
local righthandle=cp(tube,"White",Vector3.new(1,1,1))
weld(ch['Right Arm'],righthandle,cfn(0,-1,0))
righthandle.Transparency=1
local lefthandle=cp(tube,"White",Vector3.new(1,1,1))
weld(ch['Left Arm'],lefthandle,cfn(0,-1,0))
lefthandle.Transparency=1
--[[
Current Moves:
Normal Block
Dark Missile (High Crit (20% chance))
Rive Beam (10% Crit chance)
Dark Slash (Very High Crit (50% chance))
Down Slam
Aerial Sword (Very High Crit (50% chance))
Dark Spikes (Very High Crit (50% chance))
Curse (Damage Over Time and Lifesteal)
]]
addCoolDown=function(move)
local a={timeleft=moves[move].cooldown,move=move}
addCoolDownGui(a)
table.insert(cooldowns,a)
end
addMove('Normal Block','f',0.5,function()
deb=true
idle=false
local ws=hum.WalkSpeed
tor.CFrame = CFrame.new(tor.Position, Vector3.new(mouse.Hit.p.X, tor.Position.Y, mouse.Hit.p.Z))
hum.WalkSpeed=0
tweenTable={}
animPlaying=true
local pcf=tor.CFrame
Tween(rj,cfn()*ang(0,mr(-45),0),0.2)
Tween(rw,cfn()*ang(mr(-86),mr(-15),0),0.2)
Tween(lw,cfn()*ang(0,mr(5),mr(20)),0.2)
blocksound:Play()
local block=cp(workspace,'Really black',Vector3.new(8,6,1),true,true)
block.CFrame=pcf*CFrame.new(0,0,-5)
block.Material='Neon'
local bm=blo(block)
bm.Scale=Vector3.new(0,0,0.9)
addFx(block,0.05,nil,function() bm.Scale=bm.Scale+Vector3.new(0.05,0.05,0) end)
local a=addToCList('block_connect','f')
waitForUp(a)
addCoolDown('Normal Block')
hum.WalkSpeed=ws
deb=false
addFx(block,0.05,"destroy",function() block.Transparency=block.Transparency+0.05 block.bmsh.Scale=block.bmsh.Scale+Vector3.new(0.07,0.07,0) end)
idle=true
reset()
animPlaying=false
end,15)
addMove('Diamond Storm','v',10,function()
animPlaying=true
deb=true
canExecuteMoves=false
hum.WalkSpeed=0
tweenTable={}
altTweenTable={}
Tween(rw,cfn(0,1,0)*ang(mr(-70),mr(-45),0))
Tween(lw,cfn()*ang(mr(-70),mr(45),0))
magicriff:Play()
game.Debris:AddItem(bgmc,1)
spawn(function()
for i=1,20 do
wait()
local fx=cp(tube,'Really black',Vector3.new(1.2,1.2,1.2),true)
fx.CFrame=righthandle.CFrame*ang(mr(math.random(90)),mr(math.random(90)),mr(math.random(90)))
local bl=blo(fx)
addFx(fx,0.07,'destroy',function() bl.Scale=bl.Scale+Vector3.new(.1,.1,.1) fx.Transparency=fx.Transparency+0.07 end)
end
end)
wait(1)
bg=true
local a=addToCList('diamond_connect','v')
Tween(rj,cfn()*ang(0,mr(-90),0),0.2)
Tween(rw,cfn()*ang(0,0,mr(-90)),0.2)
Tween(lw,cfn()*ang(0,mr(5),mr(20)),0.2)
repeat wait(0.1)
local d=depleteMana(10)
if d then
local bgmc=bigmagic:clone()
bgmc.Parent=ch.Head
bgmc.Volume=1
bgmc:Play()
local crn=cp(tube,'Really black',Vector3.new(1,1,1),true)
crn.CFrame=tor.CFrame*cfn(0,-2.5,0)
local ms=newSpm(crn)
ms.TextureId=rbx..'132155326'
ms.MeshId=rbx..lib.crown
ms.VertexColor=Vector3.new(0,0,0)
ms.Scale=Vector3.new(1.5,1,1.5)
addFx(crn,0.07,'destroy',function() crn.Transparency=crn.Transparency+0.07 ms.Scale=ms.Scale+Vector3.new(0.3,0,0.3) end)
diamondproj:Play()
local dia=cp(tube,'Really black',Vector3.new(1,1,1))
local ran=math.random(2)
if ran==1 then
dia.BrickColor=BrickColor.new('Bright red')
end
local dmm=newSpm(dia)
dmm.Scale=Vector3.new(0.5,1,0.5)
dmm.MeshId=rbx..lib.diamond
dia.CFrame=righthandle.CFrame
local sw=dia
local vel=int('BodyVelocity',dia)
sw.CFrame=CFrame.new(righthandle.CFrame.p, Vector3.new(m.Hit.p.X,m.Hit.p.Y,m.Hit.p.Z))*ang(mr(math.random(-math.random(5),math.random(5))),mr(math.random(-math.random(5),math.random(5))),mr(math.random(-math.random(5),math.random(5))))--*ang(mr(90),0,0)
vel.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
vel.Velocity=sw.CFrame.lookVector*152
sw.CFrame=sw.CFrame*ang(mr(90),0,0)
game.Debris:AddItem(sw,2)
local dmgdealt=false
local nct=sw.Touched:connect(function(part)
if part.Parent and part.Parent:findFirstChild('Humanoid') and not part:IsDescendantOf(ch) and not dmgdealt then
dealDamage(part.Parent,0)
dmgdealt=true
end
if part:IsDescendantOf(ch)==false then
local snd=diamondbreak:clone()
snd.Parent=sw
snd:Play()
vel:Destroy()