-
Notifications
You must be signed in to change notification settings - Fork 319
/
Material.
2418 lines (2031 loc) · 86.2 KB
/
Material.
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
--Yeah yeah, I added it to the list 'Finally'.
--We all know this Lib
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local TextService = game:GetService("TextService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local InputService = game:GetService("UserInputService")
local CoreGuiService = game:GetService("CoreGui")
local ContentService = game:GetService("ContentProvider")
local Themes = {
Light = {
MainFrame = Color3.fromRGB(255,255,255),
Minimise = Color3.fromRGB(255,106,0),
MinimiseAccent = Color3.fromRGB(147,59,0),
Maximise = Color3.fromRGB(25,255,0),
MaximiseAccent = Color3.fromRGB(0,255,110),
NavBar = Color3.fromRGB(124,37,255),
NavBarAccent = Color3.fromRGB(255,255,255),
NavBarInvert = Color3.fromRGB(30,30,30),
TitleBar = Color3.fromRGB(124,37,255),
TitleBarAccent = Color3.fromRGB(255,255,255),
Overlay = Color3.fromRGB(124,37,255),
Banner = Color3.fromRGB(255,255,255),
BannerAccent = Color3.fromRGB(124,37,255),
Content = Color3.fromRGB(124,37,255),
Button = Color3.fromRGB(124,37,255),
ButtonAccent = Color3.fromRGB(255,255,255),
ChipSet = Color3.fromRGB(124,37,255),
ChipSetAccent = Color3.fromRGB(255,255,255),
DataTable = Color3.fromRGB(124,37,255),
DataTableAccent = Color3.fromRGB(255,255,255),
Slider = Color3.fromRGB(255,255,255),
SliderAccent = Color3.fromRGB(124,37,255),
Toggle = Color3.fromRGB(124,37,255),
ToggleAccent = Color3.fromRGB(255,255,255),
Dropdown = Color3.fromRGB(255,255,255),
DropdownAccent = Color3.fromRGB(124,37,255),
ColorPicker = Color3.fromRGB(255,255,255),
ColorPickerAccent = Color3.fromRGB(124,37,255),
TextField = Color3.fromRGB(124,37,255),
TextFieldAccent = Color3.fromRGB(124,37,255),
},
Dark = {
MainFrame = Color3.fromRGB(30,30,30),
Minimise = Color3.fromRGB(255,106,0),
MinimiseAccent = Color3.fromRGB(147,59,0),
Maximise = Color3.fromRGB(25,255,0),
MaximiseAccent = Color3.fromRGB(0,255,110),
NavBar = Color3.fromRGB(55,55,55),
NavBarAccent = Color3.fromRGB(255,255,255),
NavBarInvert = Color3.fromRGB(235,235,235),
TitleBar = Color3.fromRGB(55,55,55),
TitleBarAccent = Color3.fromRGB(255,255,255),
Overlay = Color3.fromRGB(175,175,175),
Banner = Color3.fromRGB(55,55,55),
BannerAccent = Color3.fromRGB(255,255,255),
Content = Color3.fromRGB(85,85,85),
Button = Color3.fromRGB(85,85,85),
ButtonAccent = Color3.fromRGB(255,255,255),
ChipSet = Color3.fromRGB(235,235,235),
ChipSetAccent = Color3.fromRGB(85,85,85),
DataTable = Color3.fromRGB(235,235,235),
DataTableAccent = Color3.fromRGB(85,85,85),
Slider = Color3.fromRGB(85,85,85),
SliderAccent = Color3.fromRGB(235,235,235),
Toggle = Color3.fromRGB(205,205,205),
ToggleAccent = Color3.fromRGB(125,125,125),
Dropdown = Color3.fromRGB(85,85,85),
DropdownAccent = Color3.fromRGB(235,235,235),
ColorPicker = Color3.fromRGB(85,85,85),
ColorPickerAccent = Color3.fromRGB(235,235,235),
TextField = Color3.fromRGB(175,175,175),
TextFieldAccent = Color3.fromRGB(255,255,255),
},
Mocha = {
MainFrame = Color3.fromRGB(255,255,255),
Minimise = Color3.fromRGB(219, 210, 202),
MinimiseAccent = Color3.fromRGB(219, 210, 202),
Maximise = Color3.fromRGB(189, 183, 177),
MaximiseAccent = Color3.fromRGB(189, 183, 177),
NavBar = Color3.fromRGB(176, 148, 125),
NavBarAccent = Color3.fromRGB(255,255,255),
NavBarInvert = Color3.fromRGB(30,30,30),
TitleBar = Color3.fromRGB(176, 148, 125),
TitleBarAccent = Color3.fromRGB(255,255,255),
Overlay = Color3.fromRGB(176, 148, 125),
Banner = Color3.fromRGB(255,255,255),
BannerAccent = Color3.fromRGB(176, 148, 125),
Content = Color3.fromRGB(176, 148, 125),
Button = Color3.fromRGB(176, 148, 125),
ButtonAccent = Color3.fromRGB(255,255,255),
ChipSet = Color3.fromRGB(176, 148, 125),
ChipSetAccent = Color3.fromRGB(255,255,255),
DataTable = Color3.fromRGB(176, 148, 125),
DataTableAccent = Color3.fromRGB(255,255,255),
Slider = Color3.fromRGB(255,255,255),
SliderAccent = Color3.fromRGB(176, 148, 125),
Toggle = Color3.fromRGB(176, 148, 125),
ToggleAccent = Color3.fromRGB(255,255,255),
Dropdown = Color3.fromRGB(255,255,255),
DropdownAccent = Color3.fromRGB(176, 148, 125),
ColorPicker = Color3.fromRGB(255,255,255),
ColorPickerAccent = Color3.fromRGB(176, 148, 125),
TextField = Color3.fromRGB(175,175,175),
TextFieldAccent = Color3.fromRGB(255,255,255)
},
Aqua = {
MainFrame = Color3.fromRGB(255,255,255),
Minimise = Color3.fromRGB(219, 210, 202),
MinimiseAccent = Color3.fromRGB(219, 210, 202),
Maximise = Color3.fromRGB(189, 183, 177),
MaximiseAccent = Color3.fromRGB(189, 183, 177),
NavBar = Color3.fromRGB(116, 112, 140),
NavBarAccent = Color3.fromRGB(255,255,255),
NavBarInvert = Color3.fromRGB(30,30,30),
TitleBar = Color3.fromRGB(116, 112, 140),
TitleBarAccent = Color3.fromRGB(255,255,255),
Overlay = Color3.fromRGB(116, 112, 140),
Banner = Color3.fromRGB(255,255,255),
BannerAccent = Color3.fromRGB(116, 112, 140),
Content = Color3.fromRGB(116, 112, 140),
Button = Color3.fromRGB(116, 112, 140),
ButtonAccent = Color3.fromRGB(255,255,255),
ChipSet = Color3.fromRGB(116, 112, 140),
ChipSetAccent = Color3.fromRGB(255,255,255),
DataTable = Color3.fromRGB(116, 112, 140),
DataTableAccent = Color3.fromRGB(255,255,255),
Slider = Color3.fromRGB(255,255,255),
SliderAccent = Color3.fromRGB(116, 112, 140),
Toggle = Color3.fromRGB(116, 112, 140),
ToggleAccent = Color3.fromRGB(255,255,255),
Dropdown = Color3.fromRGB(255,255,255),
DropdownAccent = Color3.fromRGB(116, 112, 140),
ColorPicker = Color3.fromRGB(255,255,255),
ColorPickerAccent = Color3.fromRGB(116, 112, 140),
TextField = Color3.fromRGB(175,175,175),
TextFieldAccent = Color3.fromRGB(255,255,255)
},
Jester = {
MainFrame = Color3.fromRGB(255,255,255),
Minimise = Color3.fromRGB(219, 210, 202),
MinimiseAccent = Color3.fromRGB(219, 210, 202),
Maximise = Color3.fromRGB(189, 183, 177),
MaximiseAccent = Color3.fromRGB(189, 183, 177),
NavBar = Color3.fromRGB(219, 68, 103),
NavBarAccent = Color3.fromRGB(255,255,255),
NavBarInvert = Color3.fromRGB(30,30,30),
TitleBar = Color3.fromRGB(219, 68, 103),
TitleBarAccent = Color3.fromRGB(255,255,255),
Overlay = Color3.fromRGB(219, 68, 103),
Banner = Color3.fromRGB(255,255,255),
BannerAccent = Color3.fromRGB(219, 68, 103),
Content = Color3.fromRGB(219, 68, 103),
Button = Color3.fromRGB(219, 68, 103),
ButtonAccent = Color3.fromRGB(255,255,255),
ChipSet = Color3.fromRGB(219, 68, 103),
ChipSetAccent = Color3.fromRGB(255,255,255),
DataTable = Color3.fromRGB(219, 68, 103),
DataTableAccent = Color3.fromRGB(255,255,255),
Slider = Color3.fromRGB(255,255,255),
SliderAccent = Color3.fromRGB(219, 68, 103),
Toggle = Color3.fromRGB(219, 68, 103),
ToggleAccent = Color3.fromRGB(255,255,255),
Dropdown = Color3.fromRGB(255,255,255),
DropdownAccent = Color3.fromRGB(219, 68, 103),
ColorPicker = Color3.fromRGB(255,255,255),
ColorPickerAccent = Color3.fromRGB(219, 68, 103),
TextField = Color3.fromRGB(175,175,175),
TextFieldAccent = Color3.fromRGB(255,255,255),
}
}
local Types = {
"RoundFrame",
"Shadow",
"Circle",
"CircleButton",
"Frame",
"Label",
"Button",
"SmoothButton",
"Box",
"ScrollingFrame",
"Menu",
"NavBar"
}
local ActualTypes = {
RoundFrame = "ImageLabel",
Shadow = "ImageLabel",
Circle = "ImageLabel",
CircleButton = "ImageButton",
Frame = "Frame",
Label = "TextLabel",
Button = "TextButton",
SmoothButton = "ImageButton",
Box = "TextBox",
ScrollingFrame = "ScrollingFrame",
Menu = "ImageButton",
NavBar = "ImageButton"
}
local Properties = {
RoundFrame = {
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=5554237731",
ScaleType = Enum.ScaleType.Slice,
SliceCenter = Rect.new(3,3,297,297)
},
SmoothButton = {
AutoButtonColor = false,
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=5554237731",
ScaleType = Enum.ScaleType.Slice,
SliceCenter = Rect.new(3,3,297,297)
},
Shadow = {
Name = "Shadow",
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=5554236805",
ScaleType = Enum.ScaleType.Slice,
SliceCenter = Rect.new(23,23,277,277),
Size = UDim2.fromScale(1,1) + UDim2.fromOffset(30,30),
Position = UDim2.fromOffset(-15,-15)
},
Circle = {
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=5554831670"
},
CircleButton = {
BackgroundTransparency = 1,
AutoButtonColor = false,
Image = "http://www.roblox.com/asset/?id=5554831670"
},
Frame = {
BackgroundTransparency = 1,
BorderSizePixel = 0,
Size = UDim2.fromScale(1,1)
},
Label = {
BackgroundTransparency = 1,
Position = UDim2.fromOffset(5,0),
Size = UDim2.fromScale(1,1) - UDim2.fromOffset(5,0),
TextSize = 14,
TextXAlignment = Enum.TextXAlignment.Left
},
Button = {
BackgroundTransparency = 1,
Position = UDim2.fromOffset(5,0),
Size = UDim2.fromScale(1,1) - UDim2.fromOffset(5,0),
TextSize = 14,
TextXAlignment = Enum.TextXAlignment.Left
},
Box = {
BackgroundTransparency = 1,
Position = UDim2.fromOffset(5,0),
Size = UDim2.fromScale(1,1) - UDim2.fromOffset(5,0),
TextSize = 14,
TextXAlignment = Enum.TextXAlignment.Left
},
ScrollingFrame = {
BackgroundTransparency = 1,
ScrollBarThickness = 0,
CanvasSize = UDim2.fromScale(0,0),
Size = UDim2.fromScale(1,1)
},
Menu = {
Name = "More",
AutoButtonColor = false,
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=5555108481",
Size = UDim2.fromOffset(20,20),
Position = UDim2.fromScale(1,0.5) - UDim2.fromOffset(25,10)
},
NavBar = {
Name = "SheetToggle",
Image = "http://www.roblox.com/asset/?id=5576439039",
BackgroundTransparency = 1,
Size = UDim2.fromOffset(20,20),
Position = UDim2.fromOffset(5,5),
AutoButtonColor = false
}
}
function FindType(String)
for _, Type in next, Types do
if Type:sub(1, #String):lower() == String:lower() then
return Type
end
end
return false
end
local Objects = {}
function Objects.new(Type)
local TargetType = FindType(Type)
if TargetType then
local NewImage = Instance.new(ActualTypes[TargetType])
if Properties[TargetType] then
for Property, Value in next, Properties[TargetType] do
NewImage[Property] = Value
end
end
return NewImage
else
return Instance.new(Type)
end
end
local function GetXY(GuiObject)
local Max, May = GuiObject.AbsoluteSize.X, GuiObject.AbsoluteSize.Y
local Px, Py = math.clamp(Mouse.X - GuiObject.AbsolutePosition.X, 0, Max), math.clamp(Mouse.Y - GuiObject.AbsolutePosition.Y, 0, May)
return Px/Max, Py/May
end
local function CircleAnim(GuiObject, EndColour, StartColour)
local PX, PY = GetXY(GuiObject)
local Circle = Objects.new("Circle")
Circle.Size = UDim2.fromScale(0,0)
Circle.Position = UDim2.fromScale(PX,PY)
Circle.ImageColor3 = StartColour or GuiObject.ImageColor3
Circle.ZIndex = 200
Circle.Parent = GuiObject
local Size = GuiObject.AbsoluteSize.X
TweenService:Create(Circle, TweenInfo.new(1), {Position = UDim2.fromScale(PX,PY) - UDim2.fromOffset(Size/2,Size/2), ImageTransparency = 1, ImageColor3 = EndColour, Size = UDim2.fromOffset(Size,Size)}):Play()
spawn(function()
wait(2)
Circle:Destroy()
end)
end
local Material = {}
local Styles = {
[1] = "Normal",
[2] = "Invert",
[3] = "Sheets"
}
local ThisTheme
local NavBar = {
Normal = function()
local NewNavBar = Objects.new("Round")
NewNavBar.Name = "NavBar"
NewNavBar.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,30)
NewNavBar.Position = UDim2.fromOffset(5,35)
NewNavBar.ImageColor3 = ThisTheme.NavBar
NewNavBar.ZIndex = 100
local NavBarShadow = Objects.new("Shadow")
NavBarShadow.ImageColor3 = ThisTheme.NavBar
NavBarShadow.Parent = NewNavBar
NavBarShadow.ZIndex = 100
local NavBarContent = Objects.new("Frame")
NavBarContent.Name = "Content"
NavBarContent.Parent = NewNavBar
NavBarContent.ChildAdded:Connect(function(Child)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {TextTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child:FindFirstChildWhichIsA("ImageLabel"), TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
Child.TextColor3 = ThisTheme.NavBarAccent
end)
pcall(function()
Child:FindFirstChildWhichIsA("ImageLabel").ImageColor3 = ThisTheme.NavBarAccent
end)
pcall(function()
Child.ImageColor3 = ThisTheme.NavBarAccent
end)
end)
local NavBarList = Objects.new("UIListLayout")
NavBarList.FillDirection = Enum.FillDirection.Horizontal
NavBarList.HorizontalAlignment = Enum.HorizontalAlignment.Left
NavBarList.VerticalAlignment = Enum.VerticalAlignment.Center
NavBarList.SortOrder = Enum.SortOrder.LayoutOrder
NavBarList.Parent = NavBarContent
local NavBarPadding = Objects.new("UIPadding")
NavBarPadding.PaddingLeft = UDim.new(0,5)
NavBarPadding.Parent = NavBarContent
return NewNavBar, NavBarContent
end,
Invert = function()
local NewNavBar = Objects.new("Round")
NewNavBar.Name = "NavBar"
NewNavBar.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,30)
NewNavBar.Position = UDim2.fromOffset(5,35)
NewNavBar.ImageColor3 = ThisTheme.NavBarAccent
NewNavBar.ImageTransparency = 1
NewNavBar.ZIndex = 100
local NavBarShadow = Objects.new("Shadow")
NavBarShadow.ImageColor3 = ThisTheme.NavBarInvert
NavBarShadow.ImageTransparency = 1
NavBarShadow.Parent = NewNavBar
NavBarShadow.ZIndex = 100
TweenService:Create(NewNavBar, TweenInfo.new(1), {ImageTransparency = 0}):Play()
TweenService:Create(NavBarShadow, TweenInfo.new(1), {ImageTransparency = 0}):Play()
local NavBarContent = Objects.new("Frame")
NavBarContent.Name = "Content"
NavBarContent.Parent = NewNavBar
NavBarContent.ChildAdded:Connect(function(Child)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {TextTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child:FindFirstChildWhichIsA("ImageLabel"), TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
Child.TextColor3 = ThisTheme.NavBar
end)
pcall(function()
Child:FindFirstChildWhichIsA("ImageLabel").ImageColor3 = ThisTheme.NavBar
end)
pcall(function()
Child.ImageColor3 = ThisTheme.NavBar
end)
end)
local NavBarList = Objects.new("UIListLayout")
NavBarList.FillDirection = Enum.FillDirection.Horizontal
NavBarList.HorizontalAlignment = Enum.HorizontalAlignment.Left
NavBarList.VerticalAlignment = Enum.VerticalAlignment.Center
NavBarList.SortOrder = Enum.SortOrder.LayoutOrder
NavBarList.Parent = NavBarContent
local NavBarPadding = Objects.new("UIPadding")
NavBarPadding.PaddingLeft = UDim.new(0,5)
NavBarPadding.Parent = NavBarContent
return NewNavBar, NavBarContent
end,
Sheets = function()
local NewNavBar = Objects.new("Round")
NewNavBar.ClipsDescendants = true
NewNavBar.Name = "NavBar"
NewNavBar.Size = UDim2.fromScale(0,1) - UDim2.fromOffset(0,30)
NewNavBar.Position = UDim2.fromOffset(0,30)
NewNavBar.ImageColor3 = ThisTheme.NavBarAccent
NewNavBar.ZIndex = 100
local NavBarOverlay = Objects.new("Frame")
NavBarOverlay.Name = "Overlay"
NavBarOverlay.BackgroundColor3 = ThisTheme.NavBar
NavBarOverlay.BackgroundTransparency = 1
NavBarOverlay.Size = UDim2.fromScale(1,1) - UDim2.fromOffset(0,30)
NavBarOverlay.Position = UDim2.fromOffset(0,30)
NavBarOverlay.ZIndex = 75
local NavBarMenu = Objects.new("NavBar")
NavBarMenu.ZIndex = 100
local NavBarShadow = Objects.new("Shadow")
NavBarShadow.ImageColor3 = ThisTheme.NavBar
NavBarShadow.Parent = NewNavBar
NavBarShadow.ZIndex = 100
local Effect1, Effect2, Effect3 = Objects.new("Frame"), Objects.new("Frame"), Objects.new("Frame")
Effect1.ZIndex = 100
Effect2.ZIndex = 100
Effect3.ZIndex = 100
Effect1.BackgroundTransparency = 0
Effect2.BackgroundTransparency = 0
Effect3.BackgroundTransparency = 0
Effect1.BackgroundColor3 = ThisTheme.NavBarAccent
Effect2.BackgroundColor3 = ThisTheme.NavBarAccent
Effect3.BackgroundColor3 = ThisTheme.NavBar
Effect1.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,5)
Effect2.Size = UDim2.fromScale(0,1) + UDim2.fromOffset(5,0)
Effect3.Size = UDim2.fromScale(0,1) + UDim2.fromOffset(1,0)
Effect1.Position = UDim2.fromScale(0,0)
Effect2.Position = UDim2.fromScale(1,0) - UDim2.fromOffset(5,0)
Effect3.Position = UDim2.fromScale(1,0)
Effect1.Parent = NewNavBar
Effect2.Parent = NewNavBar
Effect3.Parent = NewNavBar
local NavBarContent = Objects.new("Frame")
NavBarContent.Name = "Content"
NavBarContent.Parent = NewNavBar
local NavBarList = Objects.new("UIListLayout")
NavBarList.FillDirection = Enum.FillDirection.Vertical
NavBarList.HorizontalAlignment = Enum.HorizontalAlignment.Center
NavBarList.VerticalAlignment = Enum.VerticalAlignment.Top
NavBarList.SortOrder = Enum.SortOrder.LayoutOrder
NavBarList.Parent = NavBarContent
local NavBarPadding = Objects.new("UIPadding")
NavBarPadding.PaddingLeft = UDim.new(0,5)
NavBarPadding.PaddingRight = UDim.new(0,5)
NavBarPadding.PaddingTop = UDim.new(0,5)
NavBarPadding.PaddingBottom = UDim.new(0,5)
NavBarPadding.Parent = NavBarContent
NavBarContent.ChildAdded:Connect(function(Child)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {TextTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child, TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
local Children = #NavBarContent:GetChildren() - 2
TweenService:Create(Child:FindFirstChildWhichIsA("ImageLabel"), TweenInfo.new(1), {ImageTransparency = (Children > 1) and 0.5 or 0}):Play()
end)
pcall(function()
Child.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,30)
end)
pcall(function()
Child:FindFirstChildWhichIsA("ImageLabel").ImageColor3 = ThisTheme.NavBar
end)
pcall(function()
Child.TextColor3 = ThisTheme.NavBar
end)
pcall(function()
Child.ImageColor3 = ThisTheme.NavBar
end)
end)
return NewNavBar, NavBarContent, NavBarMenu, NavBarOverlay
end
}
local MainGUI
function TryAddMenu(Object, Menu, ReturnTable)
local Menu = Menu
local ReturnTable = ReturnTable
ReturnTable.Object = Object
local Total = 0
table.foreach(Menu, function(_, Value)
Total = Total + ((typeof(Value) == "function") and 1 or 0)
end)
if Total > 0 then
local MenuToggle = false
local MenuButton = Objects.new("Menu")
MenuButton.ImageTransparency = 1
MenuButton.Parent = Object
TweenService:Create(MenuButton, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
local Size = Total * 30 + ((Total + 1) * 2)
local MenuBuild = Objects.new("Round")
MenuBuild.Name = "Menu"
MenuBuild.ImageColor3 = ThisTheme.ButtonAccent
MenuBuild.Size = UDim2.fromOffset(120,0)
MenuBuild.Position = UDim2.fromOffset(MenuButton.AbsolutePosition.X,MenuButton.AbsolutePosition.Y) - UDim2.fromOffset(125,5)
MenuBuild.ZIndex = 100
MenuBuild.ClipsDescendants = true
MenuBuild.Parent = MainGUI
MenuButton:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
MenuBuild.Position = UDim2.fromOffset(MenuButton.AbsolutePosition.X,MenuButton.AbsolutePosition.Y) - UDim2.fromOffset(125,5)
end)
local MenuContent = Objects.new("Frame")
MenuContent.Name = "Content"
MenuContent.Parent = MenuBuild
local MenuList = Objects.new("UIListLayout")
MenuList.Padding = UDim.new(0,2)
MenuList.Parent = MenuContent
local MenuPadding = Objects.new("UIPadding")
MenuPadding.PaddingTop = UDim.new(0,2)
MenuPadding.PaddingRight = UDim.new(0,2)
MenuPadding.PaddingLeft = UDim.new(0,2)
MenuPadding.PaddingBottom = UDim.new(0,2)
MenuPadding.Parent = MenuContent
MenuButton.MouseButton1Down:Connect(function()
MenuToggle = not MenuToggle
TweenService:Create(MenuBuild, TweenInfo.new(0.15), {Size = MenuToggle and UDim2.fromOffset(120,Size) or UDim2.fromOffset(120,0)}):Play()
end)
table.foreach(Menu, function(Option, Value)
if typeof(Value) == "function" then
local MenuOption = Objects.new("SmoothButton")
MenuOption.Name = "MenuOption"
MenuOption.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,30)
MenuOption.ImageColor3 = ThisTheme.Button
MenuOption.ImageTransparency = 1
MenuOption.ZIndex = 150
MenuOption.Parent = MenuContent
local OptionShadow = Objects.new("Shadow")
OptionShadow.ImageColor3 = ThisTheme.Button
OptionShadow.ImageTransparency = 1
OptionShadow.Parent = MenuOption
local OptionValue = Objects.new("Label")
OptionValue.Name = "Value"
OptionValue.Position = UDim2.fromScale(0,0)
OptionValue.Size = UDim2.fromScale(1,1) - UDim2.fromOffset(5,0)
OptionValue.Text = Option
OptionValue.TextColor3 = ThisTheme.Button
OptionValue.Font = Enum.Font.Gotham
OptionValue.TextSize = 12
OptionValue.ZIndex = 150
OptionValue.TextXAlignment = Enum.TextXAlignment.Right
OptionValue.Parent = MenuOption
MenuOption.MouseButton1Down:Connect(function()
Value(ReturnTable)
MenuToggle = false
TweenService:Create(MenuBuild, TweenInfo.new(0.15), {Size = UDim2.fromOffset(120,0)}):Play()
end)
MenuOption.MouseEnter:Connect(function()
TweenService:Create(MenuOption, TweenInfo.new(0.15), {ImageTransparency = 0.8}):Play()
TweenService:Create(OptionShadow, TweenInfo.new(0.15), {ImageTransparency = 0.8}):Play()
end)
MenuOption.MouseLeave:Connect(function()
TweenService:Create(MenuOption, TweenInfo.new(0.15), {ImageTransparency = 1}):Play()
TweenService:Create(OptionShadow, TweenInfo.new(0.15), {ImageTransparency = 1}):Play()
end)
end
end)
return true, MenuButton
end
return false
end
function CreateNewButton(ButtonConfig, Parent)
local ButtonText = ButtonConfig.Text or "nil button"
local ButtonCallback = ButtonConfig.Callback or function() print("nil button") end
local Menu = ButtonConfig.Menu or {}
local Button = Objects.new("SmoothButton")
Button.Name = "Button"
Button.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,30)
Button.ImageColor3 = ThisTheme.Button
Button.ImageTransparency = 1
Button.Parent = Parent
local ButtonShadow = Objects.new("Shadow")
ButtonShadow.ImageColor3 = ThisTheme.Button
ButtonShadow.ImageTransparency = 1
ButtonShadow.Parent = Button
local ButtonLabel = Objects.new("Label")
ButtonLabel.Text = ButtonText
ButtonLabel.TextColor3 = ThisTheme.ButtonAccent
ButtonLabel.Font = Enum.Font.GothamSemibold
ButtonLabel.TextSize = 14
ButtonLabel.ClipsDescendants = true
ButtonLabel.TextTransparency = 1
ButtonLabel.Parent = Button
TweenService:Create(Button, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
TweenService:Create(ButtonShadow, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
TweenService:Create(ButtonLabel, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
Button.MouseButton1Down:Connect(function()
CircleAnim(ButtonLabel, ThisTheme.ButtonAccent, ThisTheme.Button)
ButtonCallback()
end)
local MenuAdded = TryAddMenu(Button, Menu, {})
return Button, ButtonLabel
end
local TargetParent = RunService:IsStudio() and Player.PlayerGui or CoreGuiService
function Material.Load(Config)
local Style = (Config.Style and math.clamp(Config.Style, 1, 3)) or 1
local Title = Config.Title or "MaterialLua"
local SizeX = Config.SizeX or 300
local SizeY = Config.SizeY or 500
local Theme = Config.Theme or "Light"
local Overrides = Config.ColorOverrides or {}
local Open = true
Theme = Themes[Theme]
ThisTheme = Theme
for KeyOverride, ValueOverride in next, Overrides do
ThisTheme[KeyOverride] = ValueOverride
end
local OldInstance = TargetParent:FindFirstChild(Title)
if OldInstance then
OldInstance:Destroy()
end
local NewInstance = Objects.new("ScreenGui")
NewInstance.Name = Title
NewInstance.Parent = TargetParent
MainGUI = NewInstance
local MainFrame = Objects.new("Round")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.fromOffset(0,SizeY)
MainFrame.Position = UDim2.fromScale(0.5,0.5) - UDim2.fromOffset(SizeX/2,SizeY/2)
MainFrame.ImageColor3 = Theme.MainFrame
MainFrame.Parent = NewInstance
TweenService:Create(MainFrame, TweenInfo.new(1), {Size = UDim2.fromOffset(SizeX,SizeY)}):Play()
wait(1)
local MainShadow = Objects.new("Shadow")
MainShadow.ImageColor3 = Theme.MainFrame
MainShadow.Parent = MainFrame
local TitleBar = Objects.new("SmoothButton")
TitleBar.Name = "TitleBar"
TitleBar.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,30)
TitleBar.ImageColor3 = Theme.TitleBar
TitleBar.ImageTransparency = 1
TitleBar.Parent = MainFrame
local ExtraBar = Objects.new("Frame")
ExtraBar.Name = "Hidden"
ExtraBar.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(0,5)
ExtraBar.Position = UDim2.fromScale(0,1) - UDim2.fromOffset(0,5)
ExtraBar.BackgroundColor3 = Theme.TitleBar
ExtraBar.Parent = TitleBar
local TitleShadow = Objects.new("Shadow")
TitleShadow.ImageColor3 = Theme.TitleBar
TitleShadow.ImageTransparency = 1
TitleShadow.Parent = TitleBar
local TitleText = Objects.new("Button")
TitleText.Name = "Title"
TitleText.Text = Title
TitleText.TextColor3 = Theme.TitleBarAccent
TitleText.TextTransparency = 1
TitleText.Font = Enum.Font.GothamBold
TitleText.Parent = TitleBar
TitleText.MouseButton1Down:Connect(function()
local Mx, My = Mouse.X, Mouse.Y
local MouseMove, MouseKill
MouseMove = Mouse.Move:Connect(function()
local nMx, nMy = Mouse.X, Mouse.Y
local Dx, Dy = nMx - Mx, nMy - My
MainFrame.Position = MainFrame.Position + UDim2.fromOffset(Dx, Dy)
Mx, My = nMx, nMy
end)
MouseKill = InputService.InputEnded:Connect(function(UserInput)
if UserInput.UserInputType == Enum.UserInputType.MouseButton1 then
MouseMove:Disconnect()
MouseKill:Disconnect()
end
end)
end)
local MinimiseButton = Objects.new("SmoothButton")
MinimiseButton.Size = UDim2.fromOffset(20,20)
MinimiseButton.Position = UDim2.fromScale(1,0) + UDim2.fromOffset(-25,5)
MinimiseButton.ImageColor3 = Theme.Minimise
MinimiseButton.ImageTransparency = 1
MinimiseButton.Parent = TitleBar
local MinimiseShadow = Objects.new("Shadow")
MinimiseShadow.ImageColor3 = Theme.MinimiseAccent
MinimiseShadow.ImageTransparency = 1
MinimiseShadow.Parent = MinimiseButton
MinimiseButton.MouseButton1Down:Connect(function()
Open = not Open
TweenService:Create(MainShadow, TweenInfo.new(0.15), {ImageTransparency = 1}):Play()
TweenService:Create(MainFrame, TweenInfo.new(0.15), {Size = Open and UDim2.fromOffset(SizeX,SizeY) or UDim2.fromOffset(SizeX,30)}):Play()
TweenService:Create(MinimiseButton, TweenInfo.new(0.15), {ImageColor3 = Open and Theme.Minimise or Theme.Maximise}):Play()
TweenService:Create(MinimiseShadow, TweenInfo.new(0.15), {ImageColor3 = Open and Theme.MinimiseAccent or Theme.MaximiseAccent}):Play()
if Open then
wait(0.15)
MainFrame.ClipsDescendants = false
TweenService:Create(MainShadow, TweenInfo.new(0.15), {ImageTransparency = 0}):Play()
else
MainFrame.ClipsDescendants = true
end
end)
local Content = Objects.new("Round")
Content.Name = "Content"
Content.ImageColor3 = Theme.Content
Content.Size = UDim2.fromScale(1,1) - UDim2.fromOffset(10,75)
Content.Position = UDim2.fromOffset(5,70)
Content.ImageTransparency = 1
Content.Parent = MainFrame
local NavigationBar, NavigationBarContent, NavBarMenu, NavBarOverlay = NavBar[Styles[Style]]()
NavigationBar.Parent = MainFrame
TweenService:Create(TitleBar, TweenInfo.new(1), {ImageTransparency = 0}):Play()
TweenService:Create(ExtraBar, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
TweenService:Create(TitleShadow, TweenInfo.new(1), {ImageTransparency = 0}):Play()
TweenService:Create(TitleText, TweenInfo.new(1), {TextTransparency = 0}):Play()
TweenService:Create(MinimiseButton, TweenInfo.new(1), {ImageTransparency = 0}):Play()
TweenService:Create(MinimiseShadow, TweenInfo.new(1), {ImageTransparency = 0}):Play()
TweenService:Create(Content, TweenInfo.new(1), {ImageTransparency = 0.8}):Play()
wait(1)
if NavBarMenu then
TweenService:Create(TitleText, TweenInfo.new(0.5), {
Size = TitleText.Size - UDim2.fromOffset(25,0),
Position = TitleText.Position + UDim2.fromOffset(25,0)
}):Play()
TweenService:Create(Content, TweenInfo.new(0.5), {
Size = Content.Size + UDim2.fromOffset(0,35),
Position = Content.Position - UDim2.fromOffset(0,35)
}):Play()
NavBarMenu.ImageTransparency = 1
NavBarMenu.Parent = TitleBar
TweenService:Create(NavBarMenu, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
NavBarOverlay.Parent = MainFrame
local MenuToggle = false
NavBarMenu.MouseButton1Down:Connect(function()
MenuToggle = not MenuToggle
TweenService:Create(NavigationBar, TweenInfo.new(0.15), {Size = (MenuToggle and UDim2.fromScale(0.5,1) or UDim2.fromScale(0,1)) - UDim2.fromOffset(0,30)}):Play()
TweenService:Create(NavBarOverlay, TweenInfo.new(0.15), {BackgroundTransparency = MenuToggle and 0.5 or 1}):Play()
if MenuToggle then
wait(0.15)
NavigationBar.ClipsDescendants = false
else
NavigationBar.ClipsDescendants = true
end
end)
end
local TabCount = 0
local TabLibrary = {}
local ButtonTrack = {}
local PageTrack = {}
function TabLibrary.Banner(BannerConfig)
local BannerText = BannerConfig.Text
local BannerOptions = BannerConfig.Options or {}
local ExistingBanner, ExistingBannerOverlay = MainFrame:FindFirstChild("BannerOverlay"), MainFrame:FindFirstChild("Banner")
if ExistingBanner then
ExistingBanner:Destroy()
end
if ExistingBannerOverlay then
ExistingBannerOverlay:Destroy()
end
local BannerOverlay = Objects.new("Frame")
BannerOverlay.Name = "BannerOverlay"
BannerOverlay.BackgroundColor3 = Theme.BannerAccent
BannerOverlay.Size = UDim2.fromScale(1,1) - UDim2.fromOffset(0,30)
BannerOverlay.Position = UDim2.fromOffset(0,30)
BannerOverlay.ZIndex = 75
BannerOverlay.Parent = MainFrame
local TextSize = TextService:GetTextSize(BannerText, 12, Enum.Font.Gotham, Vector2.new(0,0)).X
local Lines = math.ceil((TextSize) / (MainFrame.AbsoluteSize.X - 10))
local BannerSize = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,(Lines*20)+40)
local BannerPosition = UDim2.fromScale(0,1) + UDim2.fromOffset(5,(-Lines*20)-45)
local Banner = Objects.new("Round")
Banner.Name = "Banner"
Banner.ImageTransparency = 1
Banner.ImageColor3 = Theme.Banner
Banner.Size = BannerSize
Banner.Position = BannerPosition
Banner.ZIndex = 80
Banner.Parent = MainFrame
local BannerLabel = Objects.new("Label")
BannerLabel.Name = "Value"
BannerLabel.Text = BannerText
BannerLabel.TextColor3 = Theme.BannerAccent
BannerLabel.TextSize = 12
BannerLabel.Font = Enum.Font.Gotham
BannerLabel.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-5,(Lines*20)+5)
BannerLabel.TextWrapped = true
BannerLabel.Position = UDim2.fromOffset(5,0)
BannerLabel.TextTransparency = 1
BannerLabel.ZIndex = 80
BannerLabel.Parent = Banner
TweenService:Create(BannerOverlay, TweenInfo.new(0.5), {BackgroundTransparency = 0.5}):Play()
TweenService:Create(Banner, TweenInfo.new(0.5), {ImageTransparency = 0}):Play()
TweenService:Create(BannerLabel, TweenInfo.new(0.5), {TextTransparency = 0}):Play()
local BannerContainer = Objects.new("Frame")
BannerContainer.Name = "Options"
BannerContainer.Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,0)
BannerContainer.Position = UDim2.fromScale(0,1) - UDim2.fromOffset(-5,35)
BannerContainer.ZIndex = 80
BannerContainer.ClipsDescendants = true
BannerContainer.Parent = Banner
local BannerList = Objects.new("UIListLayout")
BannerList.FillDirection = Enum.FillDirection.Horizontal
BannerList.HorizontalAlignment = Enum.HorizontalAlignment.Right
BannerList.SortOrder = Enum.SortOrder.LayoutOrder
BannerList.Padding = UDim.new(0,5)
BannerList.Parent = BannerContainer
BannerOptions["Ok"] = function()
TweenService:Create(BannerContainer, TweenInfo.new(0.5), {Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,0)}):Play()
TweenService:Create(BannerOverlay, TweenInfo.new(0.5), {BackgroundTransparency = 1}):Play()
TweenService:Create(Banner, TweenInfo.new(0.5), {ImageTransparency = 1}):Play()
TweenService:Create(BannerLabel, TweenInfo.new(0.5), {TextTransparency = 1}):Play()
end
table.foreach(BannerOptions, function(Option, Value)
if typeof(Value) == "function" then
local TextSize = TextService:GetTextSize(Option:upper(), 12, Enum.Font.GothamBold, Vector2.new(0,0)).X
local OptionItem = Objects.new("SmoothButton")
OptionItem.ImageColor3 = Theme.BannerAccent
OptionItem.ImageTransparency = 0.9
OptionItem.Size = UDim2.fromOffset(TextSize+10,30)
OptionItem.ZIndex = 80
OptionItem.ClipsDescendants = true
OptionItem.Parent = BannerContainer
local OptionLabel = Objects.new("Label")
OptionLabel.Text = Option:upper()
OptionLabel.TextSize = 12
OptionLabel.TextColor3 = Theme.BannerAccent
OptionLabel.Font = Enum.Font.GothamBold
OptionLabel.Size = UDim2.fromScale(1,1)
OptionLabel.Position = UDim2.fromScale(0,0)
OptionLabel.TextXAlignment = Enum.TextXAlignment.Center
OptionLabel.ZIndex = 80
OptionLabel.Parent = OptionItem
OptionItem.MouseButton1Down:Connect(function()
Value()
CircleAnim(OptionItem, Theme.Banner)
end)
end
end)
TweenService:Create(BannerContainer, TweenInfo.new(0.5), {Size = UDim2.fromScale(1,0) + UDim2.fromOffset(-10,30)}):Play()
end
function TabLibrary.New(TabConfig)
local ImageID = TabConfig.ID
local Title = TabConfig.Title
local Button
if ImageID then
if Title then