-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathFEZen.lua
2099 lines (2096 loc) · 75.2 KB
/
FEZen.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"))()
local p = game.Players.LocalPlayer
local char = game.Workspace.non
local Character = char
local Mau5 = p:GetMouse()
local larm = char["Left Arm"]
local rarm = char["Right Arm"]
local lleg = char["Left Leg"]
local rleg = char["Right Leg"]
local hed = char.Head
local torso = char.Torso
local hum = char.Humanoid
local cam = game.Workspace.CurrentCamera
local root = char.HumanoidRootPart
local RootPart = root
local l = game:GetService("Lighting")
local debris = game:GetService("Debris")
local rs = game:GetService("RunService").RenderStepped
local Damaged = {}
it = Instance.new
vt = Vector3.new
cn = CFrame.new
euler = CFrame.fromEulerAnglesXYZ
angles = CFrame.Angles
local HandCF = CFrame.new(root.Position - Vector3.new(0, 3, 0)) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
Debounces = {
CanAttack = true,
NoIdle = false,
Anger = false,
OrbMove1 = false,
OrbMove2 = false,
OrbMove3 = false,
OrbMove4 = false,
OrbMove5 = false,
OrbMove6 = false,
OrbMove7 = false,
OrbMove8 = false
}
function Lerp(a, b, t)
local qa = {
QuaternionFromCFrame(a)
}
local qb = {
QuaternionFromCFrame(b)
}
local ax, ay, az = a.x, a.y, a.z
local bx, by, bz = b.x, b.y, b.z
local _t = 1 - t
return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
end
local Lerp = CFrame.new().lerp
function QuaternionFromCFrame(cf)
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
local trace = m00 + m11 + m22
if trace > 0 then
local s = math.sqrt(1 + trace)
local recip = 0.5 / s
return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
else
local i = 0
if m00 < m11 then
i = 1
end
if i == 0 and m00 or m11 < m22 then
i = 2
end
if i == 0 then
local s = math.sqrt(m00 - m11 - m22 + 1)
local recip = 0.5 / s
return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
elseif i == 1 then
local s = math.sqrt(m11 - m22 - m00 + 1)
local recip = 0.5 / s
return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
elseif i == 2 then
local s = math.sqrt(m22 - m00 - m11 + 1)
local recip = 0.5 / s
return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
end
end
end
function QuaternionToCFrame(px, py, pz, x, y, z, w)
local xs, ys, zs = x + x, y + y, z + z
local wx, wy, wz = w * xs, w * ys, w * zs
local xx = x * xs
local xy = x * ys
local xz = x * zs
local yy = y * ys
local yz = y * zs
local zz = z * zs
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))
end
function QuaternionSlerp(a, b, t)
local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
local startInterp, finishInterp
if cosTheta >= 1.0E-4 then
if 1 - cosTheta > 1.0E-4 then
local theta = math.acos(cosTheta)
local invSinTheta = 1 / math.sin(theta)
startInterp = math.sin((1 - t) * theta) * invSinTheta
finishInterp = math.sin(t * theta) * invSinTheta
else
startInterp = 1 - t
finishInterp = t
if 1 + cosTheta > 1.0E-4 then
local theta = math.acos(-cosTheta)
local invSinTheta = 1 / math.sin(theta)
startInterp = math.sin((t - 1) * theta) * invSinTheta
finishInterp = math.sin(t * theta) * invSinTheta
else
startInterp = t - 1
finishInterp = t
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
end
end
end
end
function scaleTween(strt, fnsh, tim)
local com1 = {
strt.X,
strt.Y,
strt.Z
}
local com2 = {
fnsh.X,
fnsh.Y,
fnsh.Z
}
for i, v in pairs(com1) do
com1[i] = v + (com2[i] - v) * tim
end
return Vector3.new(com1[1], com1[2], com1[3])
end
function newWeld(wp0, wp1, wc0x, wc0y, wc0z)
local wld = Instance.new("Weld", wp1)
wld.Part0 = wp0
wld.Part1 = wp1
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
end
function TakeDamage(a, b)
--a:TakeDamage(b)
end
function WeldBetween(a, b)
weld = Instance.new("Weld", a)
weld.Name = "W"
weld.Part0 = a
weld.Part1 = b
weld.C0 = a.CFrame:inverse() * b.CFrame
return weld
end
function Lerp2(a, b, i)
return a:lerp(b, i)
end
function HasntDamaged(plrname)
local ret = true
for _, v in pairs(Damaged) do
if v == plrname then
ret = false
end
end
return ret
end
function nooutline(part)
part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
end
function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size)
local fp = it("Part")
fp.formFactor = formfactor
fp.Parent = parent
fp.Reflectance = reflectance
fp.Transparency = transparency
fp.CanCollide = false
fp.Locked = true
fp.BrickColor = BrickColor.new(tostring(brickcolor))
fp.Name = name
fp.Size = size
fp.Position = Character.Torso.Position
nooutline(fp)
fp.Material = material
fp:BreakJoints()
return fp
end
function mesh(Mesh, part, meshtype, meshid, offset, scale)
local mesh = it(Mesh)
mesh.Parent = part
if Mesh == "SpecialMesh" then
mesh.MeshType = meshtype
mesh.MeshId = meshid
end
mesh.Offset = offset
mesh.Scale = scale
return mesh
end
function weld(parent, part0, part1, c0, c1)
local weld = it("Weld")
weld.Parent = parent
weld.Part0 = part0
weld.Part1 = part1
weld.C0 = c0
weld.C1 = c1
return weld
end
function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, decreaseblock)
if hit.Parent == nil then
return
end
local h = hit.Parent:FindFirstChild("Humanoid")
for _, v in pairs(hit.Parent:children()) do
if v:IsA("Humanoid") then
h = v
end
end
if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
h = hit.Parent.Parent:FindFirstChild("Humanoid")
end
if hit.Parent.className == "Hat" then
hit = hit.Parent.Parent:findFirstChild("Head")
end
if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
return
end
local c = Instance.new("ObjectValue")
c.Name = "creator"
c.Value = game:service("Players").LocalPlayer
c.Parent = h
game:GetService("Debris"):AddItem(c, 0.5)
local Damage = math.random(minim, maxim)
local blocked = false
local block = hit.Parent:findFirstChild("Block")
if block ~= nil then
print(block.className)
if block.className == "NumberValue" and block.Value > 0 then
blocked = true
if decreaseblock == nil then
block.Value = block.Value - 1
end
end
if block.className == "IntValue" and block.Value > 0 then
blocked = true
if decreaseblock ~= nil then
block.Value = block.Value - 1
end
end
end
if blocked == false then
--TakeDamage(h, Damage)
ShowDamage(hit.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
else
--TakeDamage(h, Damage / 2)
ShowDamage(hit.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, BrickColor.new("Bright blue").Color)
end
if Type == "Knockdown" then
hum = hit.Parent.Humanoid
hum.PlatformStand = true
coroutine.resume(coroutine.create(function(HHumanoid)
swait(1)
HHumanoid.PlatformStand = false
end), hum)
local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
local bodvol = Instance.new("BodyVelocity")
bodvol.velocity = angle * knockback
bodvol.P = 5000
bodvol.maxForce = Vector3.new(8000, 8000, 8000)
bodvol.Parent = hit
local rl = Instance.new("BodyAngularVelocity")
rl.P = 3000
rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
rl.Parent = hit
game:GetService("Debris"):AddItem(bodvol, 0.5)
game:GetService("Debris"):AddItem(rl, 0.5)
elseif Type == "Normal" then
local vp = Instance.new("BodyVelocity")
vp.P = 500
vp.maxForce = Vector3.new(math.huge, 0, math.huge)
if KnockbackType == 1 then
vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
elseif KnockbackType == 2 then
vp.velocity = Property.CFrame.lookVector * knockback
end
if knockback > 0 then
vp.Parent = hit.Parent.Torso
end
game:GetService("Debris"):AddItem(vp, 0.1)
elseif Type == "Up" then
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.velocity = vt(0, 60, 0)
bodyVelocity.P = 5000
bodyVelocity.maxForce = Vector3.new(8000, 8000, 8000)
bodyVelocity.Parent = hit
game:GetService("Debris"):AddItem(bodyVelocity, 1)
local rl = Instance.new("BodyAngularVelocity")
rl.P = 3000
rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
rl.angularvelocity = Vector3.new(math.random(-30, 30), math.random(-30, 30), math.random(-30, 30))
rl.Parent = hit
game:GetService("Debris"):AddItem(rl, 0.5)
elseif Type == "Snare" then
local bp = Instance.new("BodyPosition")
bp.P = 2000
bp.D = 100
bp.maxForce = Vector3.new(math.huge, math.huge, math.huge)
bp.position = hit.Parent.Torso.Position
bp.Parent = hit.Parent.Torso
game:GetService("Debris"):AddItem(bp, 1)
elseif Type == "Target" then
local Targetting = false
if Targetting == false then
local ZTarget = hit.Parent.Torso
coroutine.resume(coroutine.create(function(Part)
so("http://www.roblox.com/asset/?id=15666462", Part, 1, 1.5)
swait(5)
so("http://www.roblox.com/asset/?id=15666462", Part, 1, 1.5)
end), ZTarget)
local TargHum = ZTarget.Parent:findFirstChild("Humanoid")
local targetgui = Instance.new("BillboardGui")
targetgui.Parent = ZTarget
targetgui.Size = UDim2.new(10, 100, 10, 100)
local targ = Instance.new("ImageLabel")
targ.Parent = targetgui
targ.BackgroundTransparency = 1
targ.Image = "rbxassetid://4834067"
targ.Size = UDim2.new(1, 0, 1, 0)
cam.CameraType = "Scriptable"
cam.CoordinateFrame = CFrame.new(Head.CFrame.p, ZTarget.Position)
local dir = Vector3.new(cam.CoordinateFrame.lookVector.x, 0, cam.CoordinateFrame.lookVector.z)
workspace.CurrentCamera.CoordinateFrame = CFrame.new(Head.CFrame.p, ZTarget.Position)
Targetting = true
local RocketTarget = ZTarget
for i = 1, Property do
if 0 < TargHum.Health and Character.Parent ~= nil and 0 < TargHum.Health and TargHum.Parent ~= nil and Targetting == true then
swait()
end
cam.CoordinateFrame = CFrame.new(Head.CFrame.p, ZTarget.Position)
dir = Vector3.new(cam.CoordinateFrame.lookVector.x, 0, cam.CoordinateFrame.lookVector.z)
cam.CoordinateFrame = CFrame.new(Head.CFrame.p, ZTarget.Position) * cf(0, 5, 10) * euler(-0.3, 0, 0)
end
Targetting = false
RocketTarget = nil
targetgui.Parent = nil
cam.CameraType = "Custom"
end
end
local debounce = Instance.new("BoolValue")
debounce.Name = "DebounceHit"
debounce.Parent = hit.Parent
debounce.Value = true
game:GetService("Debris"):AddItem(debounce, Delay)
c = Instance.new("ObjectValue")
c.Name = "creator"
c.Value = Player
c.Parent = h
game:GetService("Debris"):AddItem(c, 0.5)
end
end
function ShowDamage(Pos, Text, Time, Color)
local Rate = 0.03333333333333333
local Pos = Pos or Vector3.new(0, 0, 0)
local Text = Text or ""
local Time = Time or 2
local Color = Color or Color3.new(1, 0, 0)
local EffectPart = part("Custom", workspace, "Neon", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
EffectPart.Anchored = true
local BillboardGui = Instance.new("BillboardGui")
BillboardGui.Size = UDim2.new(3, 3, 3, 3)
BillboardGui.Adornee = EffectPart
local TextLabel = Instance.new("TextLabel")
TextLabel.BackgroundTransparency = 1
TextLabel.Size = UDim2.new(3, 3, 3, 3)
TextLabel.Text = Text
TextLabel.TextColor3 = Color
TextLabel.TextStrokeColor3 = BrickColor.new("Really black").Color
TextLabel.TextScaled = true
TextLabel.TextStrokeTransparency = 0
TextLabel.Font = Enum.Font.SourceSansBold
TextLabel.Parent = BillboardGui
BillboardGui.Parent = EffectPart
game.Debris:AddItem(EffectPart, Time + 0.1)
EffectPart.Parent = game:GetService("Workspace")
Delay(0, function()
local Frames = Time / Rate
for Frame = 1, Frames do
wait(Rate)
local Percent = Frame / Frames
EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
TextLabel.TextTransparency = Percent
TextLabel.TextStrokeTransparency = Percent
end
if EffectPart and EffectPart.Parent then
EffectPart:Destroy()
end
end)
end
function LoadOutfit()
local Player = game.Players.LocalPlayer
local InsertService = game:GetService("InsertService")
local char = Player.Character
local face = char.Head.face
local color = char["Body Colors"]
local Data = {
Pants = "rbxassetid://163845518",
Shirt = "rbxassetid://225706293",
Hat = 30380659,
Face = "rbxassetid://159139241",
BodyColor = "Pastel brown"
}
for i, v in pairs(char:children()) do
if v.ClassName == "Hat" then
v:Destroy()
elseif v.ClassName == "Shirt" then
v:Destroy()
elseif v.ClassName == "Pants" then
v:Destroy()
end
end
color.HeadColor = BrickColor.new("Pastel brown")
color.TorsoColor = BrickColor.new("Pastel brown")
color.LeftArmColor = BrickColor.new("Pastel brown")
color.LeftLegColor = BrickColor.new("Pastel brown")
color.RightArmColor = BrickColor.new("Pastel brown")
color.RightLegColor = BrickColor.new("Pastel brown")
face.Texture = Data.Face
InsertService:LoadAsset(Data.Hat):children()[1].Parent = char
local shirt = Instance.new("Shirt", char)
shirt.ShirtTemplate = Data.Shirt
local pants = Instance.new("Pants", char)
pants.PantsTemplate = Data.Pants
end
function MakeOrb(Type)
local this = {}
local LightOrDark
if Type == nil then
LightOrDark = math.random(0, 1)
else
LightOrDark = Type
end
local Orb = Instance.new("Part", Orbs)
Orb.Anchored = true
Orb.Material = "Neon"
if LightOrDark == 1 then
Orb.BrickColor = BrickColor.new("Fucking Gray")
else
Orb.BrickColor = BrickColor.new("Fucking Gray")
end
Orb.CFrame = torso.CFrame
Orb.CanCollide = false
Orb.Shape = "Ball"
Orb.Size = Vector3.new(0.9, 0.9, 0.9)
Orb.BottomSurface = "Smooth"
Orb.TopSurface = "Smooth"
Orb.Locked = true
local Outline = Instance.new("Part", Orbs)
Outline.Anchored = true
Outline.Material = "Neon"
if LightOrDark == 1 then
Outline.BrickColor = BrickColor.new("Fucking Gray")
else
Outline.BrickColor = BrickColor.new("Fucking Gray")
end
Outline.CFrame = torso.CFrame
Outline.CanCollide = false
Outline.Shape = "Ball"
Outline.Size = Vector3.new(1, 1, 1)
Outline.BottomSurface = "Smooth"
Outline.TopSurface = "Smooth"
Outline.Transparency = 0.75
Outline.Locked = true
local OrbWeld = newWeld(Outline, Orb, 0, 0, 0)
weld = Instance.new("Weld", Orb)
weld.Part0 = Orb
weld.Part1 = Outline
weld.C0 = CFrame.new(0, 0, 0)
local OrbMesh = Instance.new("SpecialMesh", Orb)
OrbMesh.MeshType = "Sphere"
OrbMesh.Scale = Vector3.new(0.9, 0.9, 0.9)
local OutlineMesh = Instance.new("SpecialMesh", Outline)
OutlineMesh.MeshType = "Sphere"
OutlineMesh.Scale = Vector3.new(1, 1, 1)
function this.Size(v3)
OrbMesh.Scale = Lerp2(OrbMesh.Scale, v3 - Vector3.new(0.1, 0.1, 0.1), 0.3)
OutlineMesh.Scale = Lerp2(OutlineMesh.Scale, v3, 0.3)
end
function this.CFrame(cf)
Orb.CFrame = cf
Outline.CFrame = Orb.CFrame
end
return Orb, Outline, this
end
function TailedBeastBomb()
local this = {}
local TailedBeastBomb = Instance.new("Model", char)
local Outer = Instance.new("Part", TailedBeastBomb)
Outer.Material = "Neon"
Outer.Name = "Outer"
Outer.BrickColor = BrickColor.new("Really black")
Outer.CFrame = CFrame.new(0, 0, 0)
Outer.Locked = true
Outer.Size = Vector3.new(4, 4, 4)
Outer.CanCollide = false
Outer.Transparency = 0.25
local OuterMesh = Instance.new("SpecialMesh", Outer)
OuterMesh.MeshType = "Sphere"
OuterMesh.Scale = Vector3.new(1, 1, 1)
local Inner = Instance.new("Part", TailedBeastBomb)
Inner.Material = "Neon"
Inner.Name = "Inner"
Inner.BrickColor = BrickColor.new("Institutional white")
Inner.CFrame = Outer.CFrame
Inner.Locked = true
Inner.Size = Outer.Size - Vector3.new(1, 1, 1)
Inner.CanCollide = false
Inner.Transparency = 0.8
local InnerMesh = Instance.new("SpecialMesh", Inner)
InnerMesh.MeshType = "Sphere"
InnerMesh.Scale = Vector3.new(1, 1, 1)
local InnerOuterWeld = Instance.new("Weld", Inner)
InnerOuterWeld.Part0 = Inner
InnerOuterWeld.Part1 = Outer
InnerOuterWeld.C0 = CFrame.new(0, 0, 0)
local Core = Instance.new("Part", TailedBeastBomb)
Core.Material = "Neon"
Core.Name = "Core"
Core.BrickColor = BrickColor.new("New Yeller")
Core.CFrame = Outer.CFrame
Core.Locked = true
Core.Size = Inner.Size - Vector3.new(2, 2, 2)
Core.CanCollide = false
Core.Shape = 0
Core.Transparency = 0
local CoreMesh = Instance.new("SpecialMesh", Core)
CoreMesh.MeshType = "Sphere"
CoreMesh.Scale = Vector3.new(1, 1, 1)
local InnerCoreWeld = Instance.new("Weld", Inner)
InnerCoreWeld.Part0 = Inner
InnerCoreWeld.Part1 = Core
InnerCoreWeld.C0 = CFrame.new(0, 0, 0)
function this.reSize(v3)
Outer.Size = Lerp2(Outer.Size, v3, 0.3)
Inner.Size = Lerp2(Inner.Size, Outer.Size - Vector3.new(1, 1, 1), 0.3)
Core.Size = Lerp2(Core.Size, Inner.Size - Vector3.new(2, 2, 2), 0.3)
end
return Outer, Inner, Core, this
end
function SpawnRasengan(m, cf)
local Rasengan = Instance.new("Part", m)
Rasengan.BrickColor = BrickColor.new("Bright blue")
Rasengan.Material = "Neon"
Rasengan.Anchored = true
Rasengan.CFrame = cf or CFrame.new(0, 0, 0)
Rasengan.CanCollide = false
Rasengan.CanCollide = true
Rasengan.BottomSurface = "Smooth"
Rasengan.TopSurface = "Smooth"
Rasengan.Locked = true
Rasengan.Size = Vector3.new(0.9, 0.9, 0.9)
local RasenganMesh = Instance.new("SpecialMesh", Rasengan)
RasenganMesh.MeshType = "Sphere"
local Outline = Instance.new("Part", m)
Outline.BrickColor = BrickColor.new("Institutional white")
Outline.Material = "Neon"
Outline.Transparency = 0.7
Outline.Anchored = true
Outline.CanCollide = false
Outline.CanCollide = true
Outline.BottomSurface = "Smooth"
Outline.TopSurface = "Smooth"
Outline.Locked = true
Outline.CFrame = Rasengan.CFrame
Outline.Size = Rasengan.Size + Vector3.new(0.1, 0.1, 0.1)
local OutlineMesh = Instance.new("SpecialMesh", Outline)
OutlineMesh.MeshType = "Sphere"
local RasenWeld = Instance.new("Weld", Rasengan)
RasenWeld.Part0 = Rasengan
RasenWeld.Part1 = Outline
RasenWeld.C0 = CFrame.new(0, 0, 0)
return Rasengan, Outline
end
function SpawnRasenShurikan(m, cf)
local Rasengan, Outline = SpawnRasengan(m, cf)
local this = {}
local interval = 0
Rasengan.BrickColor = BrickColor.new("Crimson")
Outline.BrickColor = BrickColor.new("Really black")
local Shurikan = Instance.new("Part", m)
Shurikan.BrickColor = BrickColor.new("Institutional white")
Shurikan.Material = "Neon"
Shurikan.Anchored = true
Shurikan.CanCollide = false
Shurikan.BottomSurface = "Smooth"
Shurikan.TopSurface = "Smooth"
Shurikan.Locked = true
Shurikan.Size = Vector3.new(1, 1, 1)
Shurikan.CFrame = Rasengan.CFrame
local ShurikanMesh = Instance.new("SpecialMesh", Shurikan)
ShurikanMesh.MeshType = "FileMesh"
ShurikanMesh.MeshId = "rbxassetid://11376946"
ShurikanMesh.Scale = Vector3.new(7, 7, 7)
ShurikanMesh.TextureId = "rbxassetid://269748808"
function this.Start()
local Event = game:GetService("RunService").RenderStepped:connect(function()
interval = interval + 60
Shurikan.CFrame = Rasengan.CFrame * CFrame.Angles(math.rad(0), math.rad(interval), math.rad(0))
end)
this.Connections = Event
end
function this.Stop()
this.Connections:disconnect()
Shurikan.CFrame = Rasengan.CFrame * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
end
return Rasengan, Outline, Shurikan, ShurikanMesh, this
end
function InstanceService()
local OldInstance = Instance
local Instance = newproxy(true)
local Meta = getmetatable(Instance)
local InstanceData = {
Properties = {
__READONLY = {ClassName = "Instance"}
},
Methods = {},
Events = {},
Private = {
Registered = {},
Util = FELOADLIBRARY
},
__META = {SERVICE_MODEL_VERSION = "0.1.0"}
}
local Properties = InstanceData.Properties
local Methods = InstanceData.Methods
local Events = InstanceData.Events
local Private = InstanceData.Private
local function CreateEvent(EventName)
Events[EventName] = {}
local Signal = Private.Util.CreateSignal()
local Event = InstanceData.Events[EventName]
function Event:connect(func)
local this = {}
if self ~= Event then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. type(func), 2)
end
Signal:connect(func)
function this:disconnect()
if self ~= this then
error("disconnect must be called with `:`, not `.`", 2)
end
Signal:disconnect()
end
return this
end
return Signal
end
local CheckSelf = function(self)
repeat
if not self then
return false, [==[":" Expected, got "."]==]
else
if not self or type(self) == "table" then
end
do return false, [==["userdata or table" Expected, got "" .. type(self) .. ""]==] end
do break end
if not self or type(self) ~= "table" then
end
return true
end
until true
end
local function MetaIndex(_table, index)
if Properties[index] and index:sub(1, 2) ~= "__" then
return Properties[index]
elseif Properties.__READONLY[index] then
return Properties.__READONLY[index]
elseif Methods[index] then
return Methods[index]
elseif Events[index] then
return Events[index]
end
end
local function MetaNewIndex(_table, index, value)
if Properties[index] and index:sub(1, 2) ~= "__" and type(value) ~= "function" then
if index:sub(1, 2) == "__" then
return error(index .. " is not a valid member of " .. Properties.__READONLY.ClassName)
else
Properties[index] = value
end
end
end
function Methods.register(name, constructor)
if type(name) ~= "string" then
error("Argument #1 of register must be a string, got a " .. type(name))
end
if type(constructor) ~= "function" then
error("Argument #2 of register must be a function, got a " .. type(constructor))
end
Private.Registered[name] = constructor
end
function Methods.new(name, parent, options)
local Parent
if type(parent) == "table" then
if parent[Parent] then
Parent = options[Parent]
else
Parent = nil
end
elseif type(parent) == "userdata" then
Parent = parent
end
if Private.Registered[name] then
return Private.Registered[name](Parent, options)
else
return OldInstance.new(name, Parent)
end
end
Meta.__index = MetaIndex
Meta.__newindex = MetaNewIndex
Meta.__metatable = "The metatable is locked"
return Instance
end
function TruthSeekerOrb()
local O1, O2 = MakeOrb()
local Orb = newproxy(true)
local OrbMeta = getmetatable(Orb)
local OrbProperties = {
ReadOnly = {
ClassName = "TruthSeekerOrb",
_VERSION = "0.1.0"
},
Parent = Orbs,
CFrame = CFrame.new(0, 0, 0),
Size = Vector3.new(0, 0, 0),
Touched = O1.Touched,
Outline = O2
}
local OrbPrivateData = {Orb = O1, Outline = O2}
local OrbMethods = {}
function OrbMeta.__index(_table, index)
if OrbProperties[index] then
if index == "CFrame" then
return OrbPrivateData.Orb.CFrame
elseif index == "Size" then
return OrbPrivateData.Orb.Size
elseif index == "ReadOnly" then
return nil
elseif index == "Parent" then
return OrbPrivateData.Orb.Parent
else
return OrbProperties[index]
end
elseif OrbProperties.ReadOnly[index] then
return OrbProperties.ReadOnly[index]
elseif OrbMethods[index] then
return OrbMethods[index]
end
end
function OrbMeta.__newindex(_table, index, value)
if OrbProperties[index] then
if not type(value) ~= "function" then
if index == "CFrame" then
OrbPrivateData.Orb.CFrame = value
OrbPrivateData.Outline.CFrame = value
elseif index == "Size" then
OrbPrivateData.Orb.Mesh.Scale = Lerp2(OrbPrivateData.Orb.Mesh.Scale, value - Vector3.new(0.1, 0.1, 0.1), 0.3)
OrbPrivateData.Outline.Mesh.Scale = Lerp2(OrbPrivateData.Outline.Mesh.Scale, value, 0.3)
elseif index == "Parent" then
OrbPrivateData.Orb.Parent = value
OrbPrivateData.Outline.Parent = value
elseif index == "ReadOnly" then
return error("can't set protected value")
else
OrbProperties[index] = value
end
end
elseif OrbProperties.ReadOnly[index] then
return error("can't set value")
end
end
local CheckSelf = function(s)
if not s then
return false, [==[":" Expected, got "."]==]
end
return true, ""
end
function OrbMethods:Destroy()
assert(CheckSelf(self))
OrbPrivateData.Orb:Destroy()
OrbPrivateData.Outline:Destroy()
end
return Orb
end
function Rasengan(m, options)
local m = Instance.new("Model", m)
local r, o = SpawnRasengan(m, options.CFrame or nil)
local Rasengan = newproxy(true)
local RasenganMeta = getmetatable(Rasengan)
local RasenganData = {Rasengan = r, Outline = o}
local RasenganProperties = {
__Protected = {ClassName = "Rasengan"},
Parent = m,
Size = Vector3.new(0, 0, 0),
CFrame = CFrame.new(0, 0, 0),
Transparency = 0
}
local RasenganMethods = {}
local RasenganEvents = {}
local CreateSignal = function()
local this = {}
local mBindableEvent = Instance.new("BindableEvent")
local mAllCns = {}
function this:connect(func)
if self ~= this then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. type(func), 2)
end
local cn = mBindableEvent.Event:connect(func)
mAllCns[cn] = true
local pubCn = {}
function pubCn:disconnect()
cn:disconnect()
mAllCns[cn] = nil
end
return pubCn
end
function this:disconnect()
if self ~= this then
error("disconnect must be called with `:`, not `.`", 2)
end
for cn, _ in pairs(mAllCns) do
cn:disconnect()
mAllCns[cn] = nil
end
end
function this:wait()
if self ~= this then
error("wait must be called with `:`, not `.`", 2)
end
return mBindableEvent.Event:wait()
end
function this:fire(...)
if self ~= this then
error("fire must be called with `:`, not `.`", 2)
end
mBindableEvent:Fire(...)
end
return this
end
local function CreateEvent(EventName)
RasenganEvents[EventName] = {}
local Signal = CreateSignal()
local Event = RasenganEvents[EventName]
function Event:connect(func)
local this = {}
if self ~= Event then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. type(func), 2)
end
Signal:connect(func)
function this:disconnect()
if self ~= this then
error("disconnect must be called with `:`, not `.`", 2)
end
Signal:disconnect()
end
return this
end
return Signal
end
local Touched = CreateEvent("Touched")
local Method = RasenganMethods
local CheckSelf = function(self)
if not self then
return false, [==[":" Expected, got "."]==]
else
return true
end
end
function Method:Destroy()
assert(CheckSelf(self))
if m then
m:Destroy()
end
if RasenganData.Outline then
RasenganData.Outline:Destroy()
end
if RasenganData.Rasengan then
RasenganData.Rasengan:Destroy()
end
end
local function Handle_GET_Property(index)
if index == "Parent" then
return RasenganData.Rasengan.Parent
elseif index == "Size" then
return RasenganData.Rasengan.Size
elseif index == "CFrame" then
return RasenganData.Rasengan.CFrame
elseif index == "Transparency" then
return RasenganData.Rasengan.Transparency
end
end
local function Handle_SET_Property(index, value)
if index == "Parent" then
RasenganData.Rasengan.Parent = value
RasenganData.Outline.Parent = value
elseif index == "Size" then
RasenganData.Rasengan.Size = Lerp2(RasenganData.Rasengan.Size, value - Vector3.new(0.1, 0.1, 0.1) * value, 0.3)
RasenganData.Outline.Size = Lerp2(RasenganData.Outline.Size, value, 0.3)
elseif index == "CFrame" then
RasenganData.Rasengan.CFrame = value
RasenganData.Outline.CFrame = value
elseif index == "Transparency" then
RasenganData.Rasengan.Transparency = value / 0.7
RasenganData.Outline.Transparency = value / 0.7
end
end
function RasenganMeta.__index(_table, index)
if RasenganProperties[index] then
if index:sub(1, 2) == "__" then
return nil
else
return Handle_GET_Property(index)
end
elseif RasenganProperties.__Protected[index] then
return RasenganProperties.__Protected[index]
elseif RasenganMethods[index] then
return RasenganMethods[index]
elseif RasenganEvents[index] then
return RasenganEvents[index]
else
error(index .. " is not a valid member of " .. RasenganProperties.__Protected.ClassName)
end
end
function RasenganMeta.__newindex(_table, index, value)
if RasenganProperties[index] then
if not type(value) ~= "function" then
if index:sub(1, 2) == "__" then
return error(index .. " is not a valid member of " .. RasenganProperties.__Protected.ClassName)
else
Handle_SET_Property(index, value)
end
end
elseif RasenganProperties.__Protected[index] then
return error("can't set value")
else
error(index .. " is not a valid member of " .. RasenganProperties.__Protected.ClassName)
end
end
RasenganMeta.__metatable = "The metatable is locked"
return Rasengan
end
function RasenShurikan(m, options)
local m = Instance.new("Model", m)
local r, o, s, sm, lib = SpawnRasenShurikan(m, options.CFrame or nil)
local Rasengan = newproxy(true)
local RasenganMeta = getmetatable(Rasengan)
local RasenganData = {
Rasengan = r,
Outline = o,
Shurikan = s,
ShurikanMesh = sm,
Lib = lib
}
local RasenganProperties = {
__Protected = {ClassName = "Rasengan"},
Parent = m,
Size = Vector3.new(0, 0, 0),
CFrame = CFrame.new(0, 0, 0),
Transparency = 0,
Base = r,
Outline = o
}
local RasenganMethods = {}
local RasenganEvents = {}
local CreateSignal = function()
local this = {}
local mBindableEvent = Instance.new("BindableEvent")
local mAllCns = {}
function this:connect(func)
if self ~= this then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. type(func), 2)
end
local cn = mBindableEvent.Event:connect(func)
mAllCns[cn] = true
local pubCn = {}
function pubCn:disconnect()
cn:disconnect()
mAllCns[cn] = nil
end
return pubCn