-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLibrary_GlassUI.lua
1113 lines (1026 loc) · 40.4 KB
/
Library_GlassUI.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
--[[
.
_ ._. _ _ | _ _ .
(_)[ (/,(_)|(_)(_]\_|
._|._|
Glass UI Library
Version 1.3
Changelog :
0.1 // Started Project.
0.2 // CreateFrame() function
0.3 // Create_MenuBar() function
0.4 // Create_ScrollList() function
Create_ScrollList_Image() function
Added MenuBar width option
0.5 // Create_TextButton() function
Create_Notification() function
0.6 // Reworked notification system
Create_Overflow_Menu() function
0.7 // Create_Indicator_Bar() function
0.8 // Create_DynamicList() function
0.9 // Create_Slider() function [x]
Added new animation option for Dynamic List
--]]
local UserInputService = game:GetService("UserInputService")
local FunctionTable = {}
function FunctionTable.Create_MenuBar(Object_Name, Object_Directory, Menu_Width, Item_Table, Item_Button_Directory, Return_Object)
local FrameContainer = Instance.new("Frame", Object_Directory)
FrameContainer.Name = tostring(Object_Name)
FrameContainer.Size = UDim2.new(tonumber(Menu_Width),0,1,0)
FrameContainer.Position = UDim2.new(0,0,0,0)
FrameContainer.BackgroundColor3 = Color3.new(0,0,0)
FrameContainer.BackgroundTransparency = 0.8
FrameContainer.BorderSizePixel = 0
FrameContainer.ZIndex = 9
local D1 = Instance.new("Frame", FrameContainer) -- Right Bar
D1.Size = UDim2.new(0,2,1,0)
D1.Position = UDim2.new(1,-5,0,0)
D1.BackgroundColor3 = Color3.new(1,1,1)
D1.BackgroundTransparency = 0.5
D1.BorderSizePixel = 0
D1.Name = "DecorBar_Rht"
D1.ZIndex = 9
local VisualFrame = Instance.new("Frame", FrameContainer)
VisualFrame.BackgroundTransparency = 2
VisualFrame.BorderSizePixel = 0
VisualFrame.Position = UDim2.new(0,0,0,0)
VisualFrame.Size = UDim2.new(1,0,1,0)
VisualFrame.ZIndex = 9
local CenterFrame = Instance.new("Frame", VisualFrame)
CenterFrame.BackgroundColor3 = Color3.new(0,0,0)
CenterFrame.BorderSizePixel = 0
CenterFrame.BackgroundTransparency = 0.6
CenterFrame.Position = UDim2.new(0,0,0.45,0)
CenterFrame.Size = UDim2.new(1,0,0.1,0)
CenterFrame.ZIndex = 9
local TextContainer = Instance.new("Frame", VisualFrame)
TextContainer.BackgroundTransparency = 2
TextContainer.BorderSizePixel = 0
TextContainer.Size = UDim2.new(1,0,1,0)
TextContainer.Position = UDim2.new(0,0,0,0)
TextContainer.ZIndex = 9
local NumberItems = #Item_Table
local Difference = (1/NumberItems)
local TextPos = 0.45
local TextPosDifference = 0.1
local ButtonPos = 0
for x = 1, NumberItems do
--[[ Create Visual Representation ]]
local NewText = Instance.new("TextLabel", TextContainer)
NewText.BackgroundTransparency = 2
NewText.BorderSizePixel = 0
NewText.Name = tostring(Item_Table[x][2])
NewText.TextColor3 = Color3.new(1,1,1)
NewText.Position = UDim2.new(0,0,TextPos,0)
NewText.Size = UDim2.new(1,0,0.1,0)
NewText.ZIndex = 9
NewText.Font = "SourceSans"
NewText.FontSize = "Size18"
NewText.Text = tostring(Item_Table[x][2])
local NumberTag = Instance.new("NumberValue", NewText)
NumberTag.Name = "ItemNumber"
NumberTag.Value = x
TextPos = TextPos + TextPosDifference
local NewButton = Instance.new("ImageButton", FrameContainer)
NewButton.Name = tostring(Item_Table[x][2])
NewButton.BackgroundTransparency = 2
NewButton.BorderSizePixel = 0
NewButton.Position = UDim2.new(0,0,ButtonPos,0)
NewButton.Size = UDim2.new(1,0,Difference,0)
NewButton.ZIndex = 9
ButtonPos = ButtonPos + Difference
NewButton.MouseEnter:Connect(function()
local VisText = TextContainer[NewButton.Name]
if (not VisText) then return end
TextContainer:TweenPosition(UDim2.new(0,0,(-(VisText["ItemNumber"].Value/10)+0.1),0),"Out","Quad",0.25,true)
VisText.FontSize = "Size36"
wait(0)
end)
NewButton.MouseLeave:Connect(function()
TextContainer[NewButton.Name].FontSize = "Size14"
wait(0)
end)
local Button_CodeConnection = Item_Button_Directory[Item_Table[x][1]]:Clone()
Button_CodeConnection.Parent = NewButton
Button_CodeConnection.Disabled = false
end
if (Return_Object) then
return FrameContainer
end
end
function FunctionTable.Create_Frame(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, Contain, Return_Object)
local NewFrame = Instance.new("Frame", Object_Directory)
NewFrame.Size = Object_Size
NewFrame.Position = Object_Position
NewFrame.BackgroundColor3 = Color3.new(0,0,0)
NewFrame.BackgroundTransparency = 0.8
NewFrame.BorderSizePixel = 0
NewFrame.Name = tostring(Object_Name)
NewFrame.ZIndex = tonumber(Object_ZIndex)
NewFrame.ClipsDescendants = Contain
local D1 = Instance.new("Frame", NewFrame) -- Top Bar
D1.Size = UDim2.new(1,0,0,2)
D1.Position = UDim2.new(0,0,0,3)
D1.BackgroundColor3 = Color3.new(1,1,1)
D1.BackgroundTransparency = 0.5
D1.BorderSizePixel = 0
D1.Name = "DecorBar_Top"
D1.ZIndex = Object_ZIndex
local D2 = Instance.new("Frame", NewFrame) -- Bottom Bar
D2.Size = UDim2.new(1,0,0,2)
D2.Position = UDim2.new(0,0,1,-5)
D2.BackgroundColor3 = Color3.new(1,1,1)
D2.BackgroundTransparency = 0.5
D2.BorderSizePixel = 0
D2.Name = "DecorBar_Bot"
D2.ZIndex = Object_ZIndex
local D3 = Instance.new("Frame", NewFrame) -- Right Bar
D3.Size = UDim2.new(0,2,1,0)
D3.Position = UDim2.new(1,-5,0,0)
D3.BackgroundColor3 = Color3.new(1,1,1)
D3.BackgroundTransparency = 0.5
D3.BorderSizePixel = 0
D3.Name = "DecorBar_Rht"
D3.ZIndex = Object_ZIndex
local D4 = Instance.new("Frame", NewFrame) -- Left Bar
D4.Size = UDim2.new(0,2,1,0)
D4.Position = UDim2.new(0,3,0,0)
D4.BackgroundColor3 = Color3.new(1,1,1)
D4.BackgroundTransparency = 0.5
D4.BorderSizePixel = 0
D4.Name = "DecorBar_Lft"
D4.ZIndex = Object_ZIndex
if (Return_Object) then
return NewFrame
end
end
function FunctionTable.Create_TextButton(Object_Name, Button_Text, Object_Directory, Object_Size, Object_Position, Object_ZIndex)
local Button = Instance.new("TextButton", Object_Directory)
Button.Name = tostring(Object_Name)
Button.Size = Object_Size
Button.Position = Object_Position
Button.ZIndex = Object_ZIndex
Button.BackgroundTransparency = 1
Button.BorderSizePixel = 0
Button.BackgroundColor3 = Color3.new(0,0,0)
Button.Text = tostring(Button_Text)
Button.FontSize = "Size24"
if (not Button.TextFits) then
Button.TextScaled = true
else
Button.TextScaled = false
end
Button.TextXAlignment = "Center"
Button.TextYAlignment = "Center"
Button.TextColor3 = Color3.new(1,1,1)
Button.Font = "SourceSans"
local Ylight = Instance.new("Frame", Button)
Ylight.BorderSizePixel = 0
Ylight.Size = UDim2.new(0,0,0,0)
Ylight.Position = UDim2.new(0,-2,0.5,0)
Ylight.BackgroundTransparency = 0.4
Ylight.BackgroundColor3 = Color3.new(1,1,1)
Ylight.ZIndex = Object_ZIndex
local Highlight = Instance.new("Frame", Button)
Highlight.BorderSizePixel = 0
Highlight.Position = UDim2.new(0.5,0,0.5,0)
Highlight.Size = UDim2.new(1,0,0,0)
Highlight.BackgroundTransparency = 0.8
Highlight.BackgroundColor3 = Color3.new(0,0,0)
Highlight.ZIndex = Object_ZIndex
Button.MouseEnter:Connect(function()
Ylight:TweenSizeAndPosition(UDim2.new(0,2,1,0), UDim2.new(0,-2,0,0), "Out", "Quad", 0.2, true)
Highlight:TweenSizeAndPosition(UDim2.new(1,0,1,0), UDim2.new(0,0,0,0), "Out", "Quad", 0.2, true)
end)
Button.MouseLeave:Connect(function()
Ylight:TweenSizeAndPosition(UDim2.new(0,0,0,0), UDim2.new(0,-2,0.5,0), "Out", "Quad", 0.2, true)
Highlight:TweenSizeAndPosition(UDim2.new(1,0,0,0), UDim2.new(0,0,0.5,0), "Out", "Quad", 0.2, true)
end)
return Button
end
function FunctionTable.Create_OverflowMenu_TextButton(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, MenuOptions, ExpandSize)
local Button = FunctionTable["Create_TextButton"](tostring(Object_Name), tostring(MenuOptions[1][2]), Object_Directory, Object_Size, Object_Position, Object_ZIndex)
local ButtonValue = Instance.new("StringValue", Button)
ButtonValue.Name = "Value"
Button.MouseButton1Click:Connect(function()
local ScrollSize = UDim2.new(Object_Size.X.Scale, Object_Size.X.Offset, Object_Size.Y.Scale, Object_Size.Y.Offset+ExpandSize)
local ScrollPosition = UDim2.new(Object_Position.X.Scale, Object_Position.X.Offset, Object_Position.Y.Scale, Object_Position.Y.Offset-(ExpandSize/2))
Button:TweenSizeAndPosition(ScrollSize, ScrollPosition, "Out", "Quad", 0.25, true)
Button.Text = ""
local ScrollList = FunctionTable["Create_ScrollList_Text"](tostring(Object_Name), Object_Directory, ScrollSize, ScrollPosition, false, MenuOptions, Object_ZIndex+1, nil, true, true)
local Items = ScrollList:GetChildren()
for x = 1, #Items do
local Item = Items[x]
if (Item:IsA("ImageButton")) then
Item.MouseButton1Click:Connect(function()
ButtonValue.Value = tostring(Item.Parent.Frame.Frame[Item.Name].Text)
Button.Text = ButtonValue.Value
Button:TweenSizeAndPosition(Object_Size, Object_Position, "Out", "Quad", 0.25, true)
ScrollList:Destroy()
end)
end
end
end)
return Button, ButtonValue
end
function FunctionTable.Create_LoadBar_Continuous(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, Delay, FadeIn, Speed)
local Container = Instance.new("Frame", Object_Directory)
Container.Name = tostring(Object_Name)
Container.Size = Object_Size
Container.Position = Object_Position
Container.BackgroundColor3 = Color3.new(1,1,1)
Container.BorderSizePixel = 0
Container.ZIndex = tonumber(Object_ZIndex)
Container.Visible = false
Container.ClipsDescendants = true
local B1 = Instance.new("Frame", Container)
B1.BackgroundColor3 = Color3.new(1,1,1)
B1.Visible = false
B1.Size = UDim2.new(0,50,1,0)
B1.Position = UDim2.new(0,-50,0,0)
B1.BorderSizePixel = 0
B1.ZIndex = Object_ZIndex
local B2 = Instance.new("Frame", Container)
B2.BackgroundColor3 = Color3.new(1,1,1)
B2.Visible = false
B2.Size = UDim2.new(0,50,1,0)
B2.Position = UDim2.new(0,-50,0,0)
B2.BorderSizePixel = 0
B2.ZIndex = tonumber(Object_ZIndex)
local B3 = Instance.new("Frame", Container)
B3.BackgroundColor3 = Color3.new(1,1,1)
B3.Visible = false
B3.Size = UDim2.new(0,50,1,0)
B3.Position = UDim2.new(0,-50,0,0)
B3.BorderSizePixel = 0
B3.ZIndex = tonumber(Object_ZIndex)
local B4 = Instance.new("Frame", Container)
B4.BackgroundColor3 = Color3.new(1,1,1)
B4.Visible = false
B4.Size = UDim2.new(0,50,1,0)
B4.Position = UDim2.new(0,-50,0,0)
B4.BorderSizePixel = 0
B4.ZIndex = tonumber(Object_ZIndex)
spawn(function()
while wait(Speed/2) do
B1.Position = UDim2.new(0,-50,0,0)
B2.Position = UDim2.new(0,-50,0,0)
B3.Position = UDim2.new(0,-50,0,0)
B4.Position = UDim2.new(0,-50,0,0)
wait(0)
B1:TweenPosition(UDim2.new(1,0,0,0), "InOut", "Quint", (Speed/2), true)
wait(Speed/12)
B2:TweenPosition(UDim2.new(1,0,0,0), "InOut", "Quint", (Speed/2), true)
wait(Speed/12)
B3:TweenPosition(UDim2.new(1,0,0,0), "InOut", "Quint", (Speed/2), true)
wait(Speed/12)
B4:TweenPosition(UDim2.new(1,0,0,0), "InOut", "Quint", (Speed/2), true)
wait(Speed/12)
end
end)
if FadeIn then
Container.BackgroundTransparency = 1
B1.BackgroundTransparency = 1
B2.BackgroundTransparency = 1
B3.BackgroundTransparency = 1
B4.BackgroundTransparency = 1
Container.Visible = true
B1.Visible = true
B2.Visible = true
B3.Visible = true
B4.Visible = true
for x = 1, 5 do
B1.BackgroundTransparency = B1.BackgroundTransparency - 0.08
B2.BackgroundTransparency = B2.BackgroundTransparency - 0.08
B3.BackgroundTransparency = B3.BackgroundTransparency - 0.08
B4.BackgroundTransparency = B4.BackgroundTransparency - 0.08
Container.BackgroundTransparency = Container.BackgroundTransparency - 0.025
wait(1/30)
end
wait(Delay-Delay/4)
for x = 1, 5 do
B1.BackgroundTransparency = B1.BackgroundTransparency + 0.08
B2.BackgroundTransparency = B2.BackgroundTransparency + 0.08
B3.BackgroundTransparency = B3.BackgroundTransparency + 0.08
B4.BackgroundTransparency = B4.BackgroundTransparency + 0.08
Container.BackgroundTransparency = Container.BackgroundTransparency + 0.025
wait(1/30)
end
wait(0)
Container:Destroy()
elseif (not FadeIn) then
Container.BackgroundTransparency = 0.8
B1.BackgroundTransparency = 0.6
B2.BackgroundTransparency = 0.6
B3.BackgroundTransparency = 0.6
B4.BackgroundTransparency = 0.6
Container.Visible = true
B1.Visible = true
B2.Visible = true
B3.Visible = true
B4.Visible = true
wait(Delay)
Container:Destroy()
end
end
function FunctionTable.Create_LoadBar_Fixed(Object_Name, Object_Directory, Object_Size, Object_Position, Delay, FadeIn, LoadPercent)
end
function FunctionTable.Create_LoadCircle(Object_Name, Object_Directory, Object_Size, Object_Position, Delay, FadeIn)
end
function FunctionTable.Create_Slider(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, Create_Container, Maximum, Minimum, Steps, Value)
if (Create_Container) then
repeat wait() until FunctionTable.Create_Frame
local Container = FunctionTable.Create_Frame(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local Line = Instance.new("Frame", Container)
Line.BorderSizePixel = 0
Line.ZIndex = Object_ZIndex
Line.BackgroundTransparency = 0.4
Line.BackgroundColor3 = Color3.new(1,1,1)
Line.Size = UDim2.new(1,-20,0,2)
Line.Position = UDim2.new(0,10,0.5,-1)
local MinStep = Instance.new("Frame", Line)
MinStep.Position = UDim2.new(0,0,-1,0)
MinStep.Size = UDim2.new(0,2,2,0)
MinStep.BorderSizePixel = 0
MinStep.BackgroundTransparency = 0.2
MinStep.BackgroundColor3 = Color3.new(1,1,1)
MinStep.ZIndex = Object_ZIndex
local MaxStep = Instance.new("Frame", Line)
MaxStep.Position = UDim2.new(1,-2,-1,0)
MaxStep.Size = UDim2.new(0,2,2,0)
MaxStep.BorderSizePixel = 0
MaxStep.BackgroundTransparency = 0.2
MaxStep.BackgroundColor3 = Color3.new(1,1,1)
MaxStep.ZIndex = Object_ZIndex
local StepValues = {}
table.insert(StepValues, Minimum)
for x = 1, Steps do
local Positions = (1/(Steps+1))
local StepFrame = Instance.new("Frame", Line)
StepFrame.Position = UDim2.new((Positions*x),-1,-1.5,0)
StepFrame.Size = UDim2.new(0,2,3,0)
StepFrame.BorderSizePixel = 0
StepFrame.BackgroundTransparency = 0.2
StepFrame.BackgroundColor3 = Color3.new(1,1,1)
StepFrame.ZIndex = Object_ZIndex
table.insert(StepValues, (((Maximum-Minimum)/(Steps+1)))*x)
end
table.insert(StepValues, Maximum)
for x = 1, #StepValues do
print(StepValues[x])
end
end
end
function FunctionTable.Create_Indicator_Bar(Object_Name, Object_Directory, Object_Size, Object_Position, Create_Container, Indicator_Value, Include_Tag, Object_ZIndex, Return_Object)
if (Create_Container) then
repeat wait() until FunctionTable.Create_Frame
local Container = FunctionTable.Create_Frame(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local IndicatorFrame = Instance.new("Frame", Container)
IndicatorFrame.ZIndex = Object_ZIndex
IndicatorFrame.Size = UDim2.new(1,-6,1,-6)
IndicatorFrame.Position = UDim2.new(0,3,0,3)
IndicatorFrame.BackgroundTransparency = 0.8
IndicatorFrame.BorderSizePixel = 0
IndicatorFrame.BackgroundColor3 = Color3.new(1,1,1)
local Bar = Instance.new("Frame", IndicatorFrame)
Bar.ZIndex = Object_ZIndex
Bar.Size = UDim2.new(1,0,1,0)
Bar.Position = UDim2.new(0,0,0,0)
Bar.BackgroundTransparency = 0.6
Bar.BorderSizePixel = 0
Bar.BackgroundColor3 = Color3.new(1,1,1)
Indicator_Value.Changed:Connect(function()
local Percentage = (Indicator_Value.Value / Indicator_Value.MaxValue)
Bar:TweenSize(UDim2.new(Percentage,0,1,0),"Out","Quad",0.125,true)
end)
else
local IndicatorFrame = Instance.new("Frame", Object_Directory)
IndicatorFrame.Name = tostring(Object_Name)
IndicatorFrame.ZIndex = Object_ZIndex
IndicatorFrame.Size = Object_Size
IndicatorFrame.Position = Object_Position
IndicatorFrame.BackgroundTransparency = 0.8
IndicatorFrame.BorderSizePixel = 0
IndicatorFrame.BackgroundColor3 = Color3.new(1,1,1)
local Bar = Instance.new("Frame", IndicatorFrame)
Bar.ZIndex = Object_ZIndex
Bar.Size = UDim2.new(1,0,1,0)
Bar.Position = UDim2.new(0,0,0,0)
Bar.BackgroundTransparency = 0.6
Bar.BorderSizePixel = 0
Bar.BackgroundColor3 = Color3.new(1,1,1)
Indicator_Value.Changed:Connect(function()
local Percentage = (Indicator_Value.Value / Indicator_Value.MaxValue)
Bar:TweenSize(UDim2.new(Percentage,0,1,0),"Out","Quad",0.125,true)
end)
end
end
function FunctionTable.Create_Notification(Notification_Title, Notification_Description, Duration)
repeat wait() until FunctionTable.Create_Frame
local TemporaryUI = Instance.new("ScreenGui", game:GetService("Players").LocalPlayer.PlayerGui)
local Container = FunctionTable.Create_Frame("Notification", TemporaryUI, UDim2.new(0,0,0,0), UDim2.new(0,0,0,0), 10, true, true)
Container.Position = UDim2.new(math.random(25/100,75/100),0,math.random(25/100,75/100),0)
local Title = Instance.new("TextLabel", Container)
Title.ZIndex = 10
Title.BorderSizePixel = 0
Title.BackgroundTransparency = 2
Title.Position = UDim2.new(0,0,0,0)
Title.Size = UDim2.new(1,0,0.45,0)
Title.Font = "SourceSans"
Title.FontSize = "Size24"
Title.Text = tostring(Notification_Title)
Title.TextColor3 = Color3.new(1,1,1)
Title.TextTransparency = 1
Title.TextScaled = true
Title.TextWrapped = true
local Description = Instance.new("TextLabel", Container)
Description.ZIndex = 10
Description.BorderSizePixel = 0
Description.BackgroundTransparency = 2
Description.Position = UDim2.new(0,0,0.45,0)
Description.Size = UDim2.new(1,0,0.5,0)
Description.Font = "SourceSans"
Description.FontSize = "Size24"
Description.Text = tostring(Notification_Description)
Description.TextColor3 = Color3.new(1,1,1)
Description.TextScaled = true
Description.TextTransparency = 1
Description.TextWrapped = true
Container:TweenSizeAndPosition(UDim2.new(0.2,0,0.2,0), UDim2.new(0.4,0,0.05,0),"Out","Quad",0.5,true)
spawn(function()
wait(0.15)
for x = 1, 0, -0.1 do
Title.TextTransparency = x
Description.TextTransparency = x
wait(0)
end
wait(Duration)
Container:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(math.random(25/100,75/100),0,math.random(25/100,75/100),0),"Out","Quad",0.5,true)
for x = 0, 1, 0.1 do
Title.TextTransparency = x
Description.TextTransparency = x
wait(0)
end
wait(1)
Container:Destroy()
end)
end
function FunctionTable.Create_TabbedMenu(Object_Name, Object_Directory, Object_Size, Object_Position, Object_ZIndex, Menu_Option_Table)
local Container = FunctionTable.Create_Frame(tostring(Object_Name), Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local MenuTabs = Instance.new("Frame", Container)
MenuTabs.Size = UDim2.new(1,0,0,75)
MenuTabs.ZIndex = Object_ZIndex
MenuTabs.Position = UDim2.new(0,0,0,0)
MenuTabs.BorderSizePixel = 0
MenuTabs.BackgroundTransparency = 0.9
MenuTabs.BackgroundColor3 = Color3.new(0,0,0)
--[[local DecorBar = Instance.new("Frame", MenuTabs)
DecorBar.Size = UDim2.new(1,0,0,3)
DecorBar.Position = UDim2.new(0,0,0,-5)
DecorBar.BorderSizePixel = 0
DecorBar.BackgroundTransparency = 0.8
DecorBar.BackgroundColor3 = Color3.new(1,1,1)
DecorBar.ZIndex = Object_ZIndex]]
local Dif = 1/#Menu_Option_Table
local Selected
local SelectBar = Instance.new("Frame", MenuTabs)
SelectBar.Size = UDim2.new(Dif,0,0,2)
SelectBar.Position = UDim2.new(0,0,1,-5)
SelectBar.BorderSizePixel = 0
SelectBar.BackgroundTransparency = 0.5
SelectBar.BackgroundColor3 = Color3.new(1,1,1)
SelectBar.ZIndex = Object_ZIndex
for x = 1, #Menu_Option_Table do
local MenuButton = FunctionTable.Create_TextButton(tostring(Menu_Option_Table[x][1]), tostring(Menu_Option_Table[x][2]), MenuTabs, UDim2.new(Dif,0,0.8,0), UDim2.new(((Dif*x)-Dif),0,0.1,0), Object_ZIndex)
--local ItemContainer = FunctionTable.Create_Frame(tostring(Menu_Option_Table[x][1]), Container, UDim2.new(1,0,1,-75), UDim2.new(0,0,0,-1), Object_ZIndex, true, true)
local ItemContainer = Instance.new("Frame", Container)
ItemContainer.Name = tostring(Menu_Option_Table[x][1])
ItemContainer.Size = UDim2.new(1,0,1,-75)
ItemContainer.Position = UDim2.new(0,0,0,1)
ItemContainer.ZIndex = Object_ZIndex
ItemContainer.BackgroundColor3 = Color3.new(0,0,0)
ItemContainer.BackgroundTransparency = 0.75
ItemContainer.BorderSizePixel = 0
MenuButton.MouseEnter:Connect(function()
if (Selected ~= ItemContainer) then
ItemContainer:TweenPosition(UDim2.new(0,0,0.75,75), "Out", "Quint", 0.25, true)
if (Selected~=nil) then
Selected:TweenPosition(UDim2.new(0,0,-0.2,75), "Out", "Quint", 0.25, true)
end
end
end)
MenuButton.MouseLeave:Connect(function()
if (Selected ~= ItemContainer) then
ItemContainer:TweenPosition(UDim2.new(0,0,1,75), "Out", "Quint", 0.25, true)
if (Selected~=nil) then
Selected:TweenPosition(UDim2.new(0,0,0,75), "Out", "Quint", 0.25, true)
end
end
end)
MenuButton.MouseButton1Click:Connect(function()
if (Selected ~= ItemContainer) then
Selected:TweenPosition(UDim2.new(0,0,1,0), "Out", "Quint", 0.4, true)
Selected = ItemContainer
SelectBar:TweenPosition(UDim2.new(MenuTabs[Selected.Name].Position.X.Scale, 0, 1, -5), "Out", "Quad", 0.25, true)
ItemContainer:TweenPosition(UDim2.new(0,0,0,75), "Out", "Quint", 0.4, true)
end
end)
end
Selected = Container[Menu_Option_Table[1][1]]
Container[Menu_Option_Table[1][1]]:TweenPosition(UDim2.new(0,0,0,75), "Out", "Quint", 0.25, true)
SelectBar:TweenPosition(UDim2.new(MenuTabs[Selected.Name].Position.X.Scale, 0, 1, -5), "Out", "Quad", 0.25, true)
end
function FunctionTable.Create_DynamicList_Scroll(Object_Name, Object_Directory, Object_Size, Object_Position, Create_Container, List_Table, Object_ZIndex, Return_Objects, Add_Direction)
local TableNo = #List_Table
if (Create_Container) then
local Frame = FunctionTable.Create_Frame(tostring(Object_Name), Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local Container = Instance.new("Frame", Frame)
Container.BackgroundTransparency = 1
Container.Size = UDim2.new(1,0,1,0)
Container.Position = UDim2.new(0,0,0,0)
Container.ZIndex = Object_ZIndex
spawn(function()
if (Add_Direction == "Downward") then
while wait(1) do
if (#List_Table > TableNo) then
TableNo = #List_Table
local OldStuff = Container:GetChildren()
for x = 1, #OldStuff do
if (OldStuff[x]:IsA("TextLabel")) then
OldStuff[x]:TweenPosition(UDim2.new(0,0,0,OldStuff[x].Position.Y.Offset + 50), "Out", "Quint", 0.5, true)
end
end
local Label = Instance.new("TextLabel", Container)
Label.BackgroundTransparency = 1
Label.Size = UDim2.new(1,0,0,50)
Label.Position = UDim2.new(-1,0,0,0)
Label.BorderSizePixel = 0
Label.Text = tostring(List_Table[TableNo])
Label.FontSize = "Size24"
if (not Label.TextFits) then
Label.TextScaled = true
end
Label.TextColor3 = Color3.new(1,1,1)
Label.Font = "SourceSans"
Label:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quad", 0.35, true)
end
end
elseif (Add_Direction == "Upward") then
while wait(1) do
if (#List_Table > TableNo) then
TableNo = #List_Table
local OldStuff = Container:GetChildren()
for x = 1, #OldStuff do
if (OldStuff[x]:IsA("TextLabel")) then
if (OldStuff[x].Position.Y.Scale <= -0.5) then
OldStuff[x]:Destroy()
end
OldStuff[x]:TweenPosition(UDim2.new(0,0,1,OldStuff[x].Position.Y.Offset - 50), "Out", "Quint", 0.5, true)
end
end
local Label = Instance.new("TextLabel", Container)
Label.BackgroundTransparency = 1
Label.Size = UDim2.new(1,0,0,50)
Label.Position = UDim2.new(-1,0,1,-50)
Label.BorderSizePixel = 0
Label.Text = tostring(List_Table[TableNo])
Label.FontSize = "Size24"
if (not Label.TextFits) then
Label.TextScaled = true
end
Label.TextColor3 = Color3.new(1,1,1)
Label.Font = "SourceSans"
Label:TweenPosition(UDim2.new(0,0,1,-50), "Out", "Quad", 0.35, true)
end
end
end
end)
local InFrame = false
Frame.MouseEnter:Connect(function()
InFrame = true
while InFrame do
if (not InFrame) then break end
Container.Position = UDim2.new(0,0,0,(Container.AbsoluteSize.Y - UserInputService.GetMouseLocation().Y))
wait(1/30)
end
end)
Frame.MouseLeave:Connect(function()
InFrame = false
Container:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quint", 0.4, true)
end)
end
end
function FunctionTable.Create_DynamicList_Fixed(Object_Name, Object_Directory, Object_Size, Object_Position, Create_Container, List_Table, Object_ZIndex, Return_Objects, Add_Direction)
local TableNo = #List_Table
--[[local NewChild = Instance.new("BindableEvent", game:GetService("Players").LocalPlayer)
setmetatable(Table, {
__newindex = function(Table, i, v)
rawset(Table, i, v)
NewChild:Fire()
end,
__index = function(Table, i, v)
rawset(Table, i, v)
NewChild:Fire()
end
})]]
if (Create_Container) then
local Frame = FunctionTable.Create_Frame(tostring(Object_Name), Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local Container = Instance.new("Frame", Frame)
Container.BackgroundTransparency = 1
Container.Size = UDim2.new(1,0,1,0)
Container.Position = UDim2.new(0,0,0,0)
Container.ZIndex = Object_ZIndex
spawn(function()
if (Add_Direction == "Downward") then
while wait(1) do
if (#List_Table > TableNo) then
TableNo = #List_Table
local OldStuff = Container:GetChildren()
for x = 1, #OldStuff do
if (OldStuff[x]:IsA("TextLabel")) then
OldStuff[x]:TweenPosition(UDim2.new(0,0,0,OldStuff[x].Position.Y.Offset + 50), "Out", "Quint", 0.5, true)
end
end
local Label = Instance.new("TextLabel", Container)
Label.BackgroundTransparency = 1
Label.Size = UDim2.new(1,0,0,50)
Label.Position = UDim2.new(-1,0,0,0)
Label.BorderSizePixel = 0
Label.Text = tostring(List_Table[TableNo])
Label.FontSize = "Size24"
if (not Label.TextFits) then
Label.TextScaled = true
end
Label.TextColor3 = Color3.new(1,1,1)
Label.Font = "SourceSans"
Label:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quad", 0.35, true)
end
end
elseif (Add_Direction == "Upward") then
while wait(1) do
if (#List_Table > TableNo) then
TableNo = #List_Table
local OldStuff = Container:GetChildren()
for x = 1, #OldStuff do
if (OldStuff[x]:IsA("TextLabel")) then
if (OldStuff[x].Position.Y.Scale <= -0.5) then
OldStuff[x]:Destroy()
end
OldStuff[x]:TweenPosition(UDim2.new(0,0,1,OldStuff[x].Position.Y.Offset - 50), "Out", "Quint", 0.5, true)
end
end
local Label = Instance.new("TextLabel", Container)
Label.BackgroundTransparency = 1
Label.Size = UDim2.new(1,0,0,50)
Label.Position = UDim2.new(-1,0,1,-50)
Label.BorderSizePixel = 0
Label.Text = tostring(List_Table[TableNo])
Label.FontSize = "Size24"
if (not Label.TextFits) then
Label.TextScaled = true
end
Label.TextColor3 = Color3.new(1,1,1)
Label.Font = "SourceSans"
Label:TweenPosition(UDim2.new(0,0,1,-50), "Out", "Quad", 0.35, true)
end
end
end
end)
--[[NewChild.Event:Connect(function()
local Oldshit = Container:GetChildren()
for x = 1, #Oldshit do
if (OldStuff[x]:IsA("TextLabel")) then
OldStuff[x]:TweenPosition(UDim2.new(0,0,0,OldStuff[x].Position.x.Offset - 50), "Out", "Quint", 0.25, true)
end
end
local Label = Instance.new("TextLabel", Container)
Label.BackgroundTransparency = 1
Label.Size = UDim2.new(1,0,0,50)
Label.Position = UDim2.new(-1,0,0,0)
Label.BackgroundColor3 = Color3.new(0,0,0)
Label.BorderSizePixel = 0
Label.ZIndex = Object_ZIndex
Label.Font = "SourceSans"
Label.Text = tostring(Table[#Table])
Label.FontSize = "Size24"
if (not Label.TextFits) then
Label.TextScaled = true
end
Label:TweenPosition(UDim2.new(0,0,0,0), "Out", "Quint", 0.25, true)
end)]]
end
end
function FunctionTable.Create_ScrollList_Image(Object_Name, Object_Directory, Object_Size, Object_Position, Create_Container, Item_Table, Object_ZIndex, Item_Names, Item_Button_Directory, Contain, Return_Objects)
if (Create_Container) then
repeat wait() until FunctionTable.Create_Frame
local Container = FunctionTable.Create_Frame(tostring(Object_Name), Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local FrameContainer = Instance.new("Frame", Container)
FrameContainer.Size = UDim2.new(1,0,1,0)
FrameContainer.Position = UDim2.new(0,0,0,0)
FrameContainer.BackgroundColor3 = Color3.new(0,0,0)
FrameContainer.BackgroundTransparency = 2
FrameContainer.BorderSizePixel = 0
FrameContainer.ZIndex = Object_ZIndex
local VisualFrame = Instance.new("Frame", FrameContainer)
VisualFrame.BackgroundTransparency = 2
VisualFrame.BorderSizePixel = 0
VisualFrame.Position = UDim2.new(0,0,0,0)
VisualFrame.Size = UDim2.new(1,0,1,0)
VisualFrame.ZIndex = Object_ZIndex
local NumberItems = #Item_Table
local Difference = (1/NumberItems)
local VisualDifference = 0.25
local CenterPos = UDim2.new(0,0,0.375,0)
local CenterSize = UDim2.new(1,0,0.25,0)
local OtherSize = UDim2.new(0.75,0,0.125,0)
local VisualPos = 0.675
local ButtonPos = 0
for x = 1, NumberItems do
local ImageFrame = Instance.new("Frame", VisualFrame)
ImageFrame.Transparency = 2
ImageFrame.Name = Item_Table[x][1]
ImageFrame.ZIndex = Object_ZIndex
ImageFrame.Size = UDim2.new(0.75,0,0.125,0)
ImageFrame.Position = UDim2.new(0.125,0,VisualPos,0)
ImageFrame.BorderSizePixel = 0
local ImageTag = Instance.new("NumberValue", ImageFrame)
ImageTag.Name = "ItemNumber"
ImageTag.Value = x
local ImageLabel = Instance.new("ImageLabel", ImageFrame)
ImageLabel.Name = "ItemImage"
ImageLabel.BackgroundTransparency = 2
ImageLabel.Image = Item_Table[x][3]
ImageLabel.Size = UDim2.new(0.5,0,1,0)
ImageLabel.Position = UDim2.new(0,0,0,0)
ImageLabel.ZIndex = Object_ZIndex
if (Item_Names) then
local ImageName = Instance.new("TextLabel", ImageFrame)
ImageName.BackgroundTransparency = 2
ImageName.BorderSizePixel = 0
ImageName.Name = "ItemName"
ImageName.Position = UDim2.new(0.1,0,0,0)
ImageName.Size = UDim2.new(1,0,1,0)
ImageName.Text = Item_Table[x][2]
ImageName.ZIndex = Object_ZIndex
ImageName.Font = "SourceSans"
ImageName.FontSize = "Size18"
ImageName.TextColor3 = Color3.new(1,1,1)
end
local NewButton = Instance.new("ImageButton", FrameContainer)
NewButton.Name = Item_Table[x][1]
NewButton.BackgroundTransparency = 2
NewButton.BorderSizePixel = 0
NewButton.Size = UDim2.new(1,0,Difference,0)
NewButton.Position = UDim2.new(0,0,ButtonPos,0)
NewButton.ZIndex = Object_ZIndex
local Button_CodeConnection = Item_Button_Directory[Item_Table[x][1]]:Clone()
Button_CodeConnection.Parent = NewButton
Button_CodeConnection.Disabled = false
ButtonPos = (ButtonPos+Difference)
VisualPos = (VisualPos+VisualDifference)
NewButton.MouseEnter:Connect(function()
VisualFrame:TweenPosition(UDim2.new(0,0,(-0.25*(VisualFrame[NewButton.Name].ItemNumber.Value)),0), "Out", "Quad", 0.25, true)
VisualFrame[NewButton.Name]:TweenSize(CenterSize, "Out", "Quad", 0.25, true)
if (Item_Names) then
VisualFrame[NewButton.Name].ItemName.TextTransparency = 0
end
end)
NewButton.MouseLeave:Connect(function()
VisualFrame[NewButton.Name]:TweenSize(OtherSize, "Out", "Quad", 0.25, true)
if (Item_Names) then
VisualFrame[NewButton.Name].ItemName.TextTransparency = 0.75
end
end)
end
else
local FrameContainer = Instance.new("Frame", Object_Directory)
FrameContainer.Size = Object_Size
FrameContainer.Position = Object_Position
FrameContainer.BackgroundColor3 = Color3.new(0,0,0)
FrameContainer.BackgroundTransparency = 2
FrameContainer.BorderSizePixel = 0
FrameContainer.ZIndex = Object_ZIndex
local VisualFrame = Instance.new("Frame", FrameContainer)
VisualFrame.BackgroundTransparency = 2
VisualFrame.BorderSizePixel = 0
VisualFrame.Position = UDim2.new(0,0,0,0)
VisualFrame.Size = UDim2.new(1,0,1,0)
VisualFrame.ZIndex = Object_ZIndex
local NumberItems = #Item_Table
local Difference = (1/NumberItems)
local VisualDifference = 0.25
local CenterPos = UDim2.new(0,0,0.375,0)
local CenterSize = UDim2.new(1,0,0.25,0)
local OtherSize = UDim2.new(0.75,0,0.125,0)
local VisualPos = 0.675
local ButtonPos = 0
for x = 1, NumberItems do
local ImageFrame = Instance.new("Frame", VisualFrame)
ImageFrame.Transparency = 2
ImageFrame.Name = Item_Table[x][1]
ImageFrame.ZIndex = Object_ZIndex
ImageFrame.Size = UDim2.new(0.75,0,0.125,0)
ImageFrame.Position = UDim2.new(0.125,0,VisualPos,0)
ImageFrame.BorderSizePixel = 0
local ImageTag = Instance.new("NumberValue", ImageFrame)
ImageTag.Name = "ItemNumber"
ImageTag.Value = x
local ImageLabel = Instance.new("ImageLabel", ImageFrame)
ImageLabel.Name = "ItemImage"
ImageLabel.BackgroundTransparency = 2
ImageLabel.Image = Item_Table[x][3]
ImageLabel.Size = UDim2.new(0.5,0,1,0)
ImageLabel.Position = UDim2.new(0,0,0,0)
ImageLabel.ZIndex = Object_ZIndex
if (Item_Names) then
local ImageName = Instance.new("TextLabel", ImageFrame)
ImageName.BackgroundTransparency = 2
ImageName.BorderSizePixel = 0
ImageName.Name = "ItemName"
ImageName.Text = Item_Table[x][2]
ImageName.ZIndex = Object_ZIndex
ImageName.Font = "SourceSans"
ImageName.FontSize = "Size18"
ImageName.TextColor3 = Color3.new(1,1,1)
end
local NewButton = Instance.new("ImageButton", FrameContainer)
NewButton.Name = Item_Table[x][1]
NewButton.BackgroundTransparency = 2
NewButton.BorderSizePixel = 0
NewButton.Size = UDim2.new(1,0,Difference,0)
NewButton.Position = UDim2.new(0,0,ButtonPos,0)
NewButton.ZIndex = Object_ZIndex
local Button_CodeConnection = Item_Button_Directory[Item_Table[x][1]]:Clone()
Button_CodeConnection.Parent = NewButton
Button_CodeConnection.Disabled = false
ButtonPos = (ButtonPos+Difference)
VisualPos = (VisualPos+VisualDifference)
NewButton.MouseEnter:Connect(function()
VisualFrame:TweenPosition(UDim2.new(0,0,(-0.25*(VisualFrame[NewButton.Name].ItemNumber.Value)),0), "Out", "Quad", 0.25, true)
VisualFrame[NewButton.Name]:TweenSize(CenterSize, "Out", "Quad", 0.25, true)
if (Item_Names) then
VisualFrame[NewButton.Name].ItemName.TextTransparency = 0
end
end)
NewButton.MouseLeave:Connect(function()
VisualFrame[NewButton.Name]:TweenSize(OtherSize, "Out", "Quad", 0.25, true)
if (Item_Names) then
VisualFrame[NewButton.Name].ItemName.TextTransparency = 0.75
end
end)
end
end
end
function FunctionTable.Create_ScrollList_Text(Object_Name, Object_Directory, Object_Size, Object_Position, Create_Container, Item_Table, Object_ZIndex, Item_Button_Directory, Contain, Return_Objects)
if (Create_Container) then
repeat wait() until FunctionTable.Create_Frame
local Container = FunctionTable.Create_Frame(tostring(Object_Name), Object_Directory, Object_Size, Object_Position, Object_ZIndex, true, true)
local FrameContainer = Instance.new("Frame", Container)
FrameContainer.Size = UDim2.new(1,0,1,0)
FrameContainer.Position = UDim2.new(0,0,0,0)
FrameContainer.BackgroundColor3 = Color3.new(0,0,0)
FrameContainer.BackgroundTransparency = 2
FrameContainer.BorderSizePixel = 0
FrameContainer.ZIndex = Object_ZIndex
local VisualFrame = Instance.new("Frame", FrameContainer)
VisualFrame.BackgroundTransparency = 2
VisualFrame.BorderSizePixel = 0
VisualFrame.Position = UDim2.new(0,0,0,0)
VisualFrame.Size = UDim2.new(1,0,1,0)
VisualFrame.ZIndex = Object_ZIndex
local TextContainer = Instance.new("Frame", VisualFrame)
TextContainer.BackgroundTransparency = 2
TextContainer.BorderSizePixel = 0
TextContainer.Size = UDim2.new(1,0,1,0)
TextContainer.Position = UDim2.new(0,0,0,0)
TextContainer.ZIndex = Object_ZIndex
local NumberItems = #Item_Table
local Difference = (1/NumberItems)
local TextPos = 0.45
local TextPosDifference = 0.1
local ButtonPos = 0
for x = 1, NumberItems do
--[[ Create Visual Representation ]]
local NewText = Instance.new("TextLabel", TextContainer)
NewText.BackgroundTransparency = 2
NewText.BorderSizePixel = 0
NewText.Name = tostring(Item_Table[x][1])
NewText.TextColor3 = Color3.new(1,1,1)
NewText.TextTransparency = 0.75
NewText.Position = UDim2.new(0,0,TextPos,0)
NewText.Size = UDim2.new(1,0,0.1,0)
NewText.ZIndex = Object_ZIndex
NewText.Font = "SourceSans"
NewText.FontSize = "Size14"
NewText.Text = tostring(Item_Table[x][2])
local NumberTag = Instance.new("NumberValue", NewText)
NumberTag.Name = "ItemNumber"