forked from bloodball/UI-Librarys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HeliosHub Lib New
1516 lines (1325 loc) · 46.6 KB
/
HeliosHub Lib New
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
--Yet another amazing lib from this dev team. Go show them support in their discord provided in the old lib.
--example provided at bottom
do
local ui = game:GetService("CoreGui"):FindFirstChild("helioslib")
if ui then
ui:Destroy()
end
end
local lib = {RainbowColorValue = 0, HueSelectionPosition = 0}
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local function MakeDraggable(topbarobject, object)
local Dragging = nil
local DragInput = nil
local DragStart = nil
local StartPosition = nil
local function Update(input)
local Delta = input.Position - DragStart
local pos =
UDim2.new(
StartPosition.X.Scale,
StartPosition.X.Offset + Delta.X,
StartPosition.Y.Scale,
StartPosition.Y.Offset + Delta.Y
)
local Tween = TweenService:Create(object, TweenInfo.new(0.2), {Position = pos})
Tween:Play()
end
topbarobject.InputBegan:Connect(
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
Dragging = true
DragStart = input.Position
StartPosition = object.Position
input.Changed:Connect(
function()
if input.UserInputState == Enum.UserInputState.End then
Dragging = false
end
end
)
end
end
)
topbarobject.InputChanged:Connect(
function(input)
if
input.UserInputType == Enum.UserInputType.MouseMovement or
input.UserInputType == Enum.UserInputType.Touch
then
DragInput = input
end
end
)
UserInputService.InputChanged:Connect(
function(input)
if input == DragInput and Dragging then
Update(input)
end
end
)
end
local helioslib = Instance.new("ScreenGui")
helioslib.Name = "helioslib"
helioslib.Parent = game.CoreGui
helioslib.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
local usi = game:GetService("UserInputService")
local uitoggled = false
usi.InputBegan:Connect(
function(io, p)
if io.KeyCode == Enum.KeyCode.RightShift then
if uitoggled == false then
helioslib.Enabled = false
uitoggled = true
else
helioslib.Enabled = true
uitoggled = false
end
end
end
)
function lib:Tween(instance, properties, duration, ...)
TweenService:Create(instance, TweenInfo.new(duration, ...), properties):Play()
end
coroutine.wrap(
function()
while wait() do
lib.RainbowColorValue = lib.RainbowColorValue + 1 / 255
lib.HueSelectionPosition = lib.HueSelectionPosition + 1
if lib.RainbowColorValue >= 1 then
lib.RainbowColorValue = 0
end
if lib.HueSelectionPosition == 105 then
lib.HueSelectionPosition = 0
end
end
end
)()
function lib:notification(textt)
for i, v in next, helioslib:GetChildren() do
if v.Name == "notificationframe" then
v:Destroy()
end
end
local notificationframe = Instance.new("Frame")
local notificationuicorner = Instance.new("UICorner")
local Glow = Instance.new("ImageLabel")
local text = Instance.new("TextLabel")
local container = Instance.new("Frame")
local containeruicorner = Instance.new("UICorner")
local okay = Instance.new("TextButton")
local loaduicorner = Instance.new("UICorner")
local desc = Instance.new("TextLabel")
notificationframe.Name = "notificationframe"
notificationframe.Parent = helioslib
notificationframe.AnchorPoint = Vector2.new(0.5, 0.5)
notificationframe.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
notificationframe.Position = UDim2.new(0.5, 0, 0.50856787, 0)
notificationframe.Size = UDim2.new(0, 406, 0, 194)
notificationuicorner.CornerRadius = UDim.new(0, 6)
notificationuicorner.Name = "notificationuicorner"
notificationuicorner.Parent = notificationframe
Glow.Name = "Glow"
Glow.Parent = notificationframe
Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Glow.BackgroundTransparency = 1.000
Glow.BorderSizePixel = 0
Glow.Position = UDim2.new(0, -15, 0, -15)
Glow.Size = UDim2.new(1, 30, 1, 30)
Glow.ZIndex = 0
Glow.Image = "rbxassetid://4996891970"
Glow.ImageColor3 = Color3.fromRGB(15, 15, 15)
Glow.ScaleType = Enum.ScaleType.Slice
Glow.SliceCenter = Rect.new(20, 20, 280, 280)
text.Name = "text"
text.Parent = notificationframe
text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
text.BackgroundTransparency = 1.000
text.Position = UDim2.new(0.0470411777, 0, 0.0600325875, 0)
text.Size = UDim2.new(0, 106, 0, 28)
text.Font = Enum.Font.GothamSemibold
text.Text = "Notification"
text.TextColor3 = Color3.fromRGB(255, 255, 255)
text.TextSize = 18.000
text.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
text.TextWrapped = true
text.TextXAlignment = Enum.TextXAlignment.Left
container.Name = "container"
container.Parent = notificationframe
container.BackgroundColor3 = Color3.fromRGB(51, 51, 51)
container.Position = UDim2.new(0.031752713, 0, 0.228634387, 0)
container.Size = UDim2.new(0, 383, 0, 142)
containeruicorner.CornerRadius = UDim.new(0, 6)
containeruicorner.Name = "containeruicorner"
containeruicorner.Parent = container
okay.Name = "okay"
okay.Parent = container
okay.AnchorPoint = Vector2.new(0.5, 0.5)
okay.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
okay.BackgroundTransparency = -0.050
okay.Position = UDim2.new(0.499596477, 0, 0.844715297, 0)
okay.Size = UDim2.new(0, 368, 0, 31)
okay.AutoButtonColor = false
okay.Font = Enum.Font.Gotham
okay.Text = "Okay"
okay.TextColor3 = Color3.fromRGB(255, 255, 255)
okay.TextSize = 14.000
loaduicorner.CornerRadius = UDim.new(0, 3)
loaduicorner.Name = "loaduicorner"
loaduicorner.Parent = okay
desc.Name = "desc"
desc.Parent = notificationframe
desc.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
desc.BackgroundTransparency = 1.000
desc.Position = UDim2.new(0.226844221, 0, 0.410032541, 0)
desc.Size = UDim2.new(0, 223, 0, 42)
desc.Font = Enum.Font.GothamSemibold
desc.Text = textt
desc.TextColor3 = Color3.fromRGB(255, 255, 255)
desc.TextScaled = true
desc.TextSize = 18.000
desc.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
desc.TextWrapped = true
okay.MouseEnter:Connect(
function()
TweenService:Create(
okay,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(71, 71, 71)}
):Play()
end
)
okay.MouseLeave:Connect(
function()
TweenService:Create(
okay,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(61, 61, 61)}
):Play()
end
)
okay.MouseButton1Click:Connect(function()
notificationframe:Destroy()
end)
end
function lib:MainWindow(text)
local ft = false
local mainframe = Instance.new("Frame")
local mainuicorner = Instance.new("UICorner")
local leftframe = Instance.new("Frame")
local leftuicorner = Instance.new("UICorner")
local title = Instance.new("TextLabel")
local gamename = Instance.new("TextLabel")
local tabholder = Instance.new("Frame")
local tabuicorner = Instance.new("UICorner")
local tabuilist = Instance.new("UIListLayout")
local tabuipadding = Instance.new("UIPadding")
local currenttab = Instance.new("TextLabel")
local Glow = Instance.new("ImageLabel")
local Glow_2 = Instance.new("ImageLabel")
local containers = Instance.new("Folder")
local dragframe = Instance.new("Frame")
mainframe.Name = "mainframe"
mainframe.Parent = helioslib
mainframe.AnchorPoint = Vector2.new(0.5, 0.5)
mainframe.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
mainframe.Position = UDim2.new(0.5, 0, 0.5, 0)
mainframe.Size = UDim2.new(0, 624, 0, 358)
mainuicorner.CornerRadius = UDim.new(0, 6)
mainuicorner.Name = "mainuicorner"
mainuicorner.Parent = mainframe
leftframe.Name = "leftframe"
leftframe.Parent = mainframe
leftframe.BackgroundColor3 = Color3.fromRGB(29, 29, 29)
leftframe.Position = UDim2.new(-0.000906724192, 0, -0.000741202093, 0)
leftframe.Size = UDim2.new(0, 162, 0, 358)
leftuicorner.CornerRadius = UDim.new(0, 6)
leftuicorner.Name = "leftuicorner"
leftuicorner.Parent = leftframe
title.Name = "title"
title.Parent = leftframe
title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
title.BackgroundTransparency = 1.000
title.Position = UDim2.new(0.172839507, 0, 0.0558659211, 0)
title.Size = UDim2.new(0, 106, 0, 28)
title.Font = Enum.Font.GothamSemibold
title.Text = "Helios Hub"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextSize = 18.000
title.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
gamename.Name = "gamename"
gamename.Parent = leftframe
gamename.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
gamename.BackgroundTransparency = 1.000
gamename.Position = UDim2.new(0.172839507, 0, 0.0977653712, 0)
gamename.Size = UDim2.new(0, 106, 0, 28)
gamename.Font = Enum.Font.Gotham
gamename.Text = text
gamename.TextColor3 = Color3.fromRGB(255, 255, 255)
gamename.TextSize = 12.000
gamename.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
tabholder.Name = "tabholder"
tabholder.Parent = leftframe
tabholder.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
tabholder.Position = UDim2.new(0.0608215332, 0, 0.175977647, 0)
tabholder.Size = UDim2.new(0, 141, 0, 283)
tabuicorner.CornerRadius = UDim.new(0, 6)
tabuicorner.Name = "tabuicorner"
tabuicorner.Parent = tabholder
tabuilist.Name = "tabuilist"
tabuilist.Parent = tabholder
tabuilist.SortOrder = Enum.SortOrder.LayoutOrder
tabuilist.Padding = UDim.new(0, 6)
tabuipadding.Name = "tabuipadding"
tabuipadding.Parent = tabholder
tabuipadding.PaddingBottom = UDim.new(0, 6)
tabuipadding.PaddingTop = UDim.new(0, 6)
currenttab.Name = "currenttab"
currenttab.Parent = leftframe
currenttab.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
currenttab.BackgroundTransparency = 1.000
currenttab.Position = UDim2.new(1.09876537, 0, 0.0558659211, 0)
currenttab.Size = UDim2.new(0, 106, 0, 28)
currenttab.Font = Enum.Font.GothamSemibold
currenttab.Text = "Main"
currenttab.TextColor3 = Color3.fromRGB(255, 255, 255)
currenttab.TextSize = 18.000
currenttab.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
currenttab.TextWrapped = true
currenttab.TextXAlignment = Enum.TextXAlignment.Left
Glow.Name = "Glow"
Glow.Parent = leftframe
Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Glow.BackgroundTransparency = 1.000
Glow.BorderSizePixel = 0
Glow.Position = UDim2.new(0, -15, 0, -15)
Glow.Size = UDim2.new(1, 30, 1, 30)
Glow.ZIndex = 0
Glow.Image = "rbxassetid://4996891970"
Glow.ImageColor3 = Color3.fromRGB(15, 15, 15)
Glow.ScaleType = Enum.ScaleType.Slice
Glow.SliceCenter = Rect.new(20, 20, 280, 280)
Glow_2.Name = "Glow"
Glow_2.Parent = mainframe
Glow_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Glow_2.BackgroundTransparency = 1.000
Glow_2.BorderSizePixel = 0
Glow_2.Position = UDim2.new(0, -15, 0, -15)
Glow_2.Size = UDim2.new(1, 30, 1, 30)
Glow_2.ZIndex = 0
Glow_2.Image = "rbxassetid://4996891970"
Glow_2.ImageColor3 = Color3.fromRGB(15, 15, 15)
Glow_2.ScaleType = Enum.ScaleType.Slice
Glow_2.SliceCenter = Rect.new(20, 20, 280, 280)
dragframe.Name = "dragframe"
dragframe.Parent = mainframe
dragframe.AnchorPoint = Vector2.new(0.5, 0.5)
dragframe.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
dragframe.BackgroundTransparency = 1.000
dragframe.Position = UDim2.new(0.629807711, 0, 0.0893854722, 0)
dragframe.Size = UDim2.new(0, 448, 0, 48)
MakeDraggable(dragframe, mainframe)
containers.Name = "containers"
containers.Parent = mainframe
local window = {}
function window:Tab(title)
local scrollframe = Instance.new("ScrollingFrame")
local container = Instance.new("Frame")
local containeruicorner = Instance.new("UICorner")
local scrolluilist = Instance.new("UIListLayout")
local tab = Instance.new("TextButton")
tab.Name = "tab"
tab.Parent = tabholder
tab.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
tab.BackgroundTransparency = 1.000
tab.Size = UDim2.new(0, 141, 0, 22)
tab.Font = Enum.Font.Gotham
tab.Text = title
tab.TextColor3 = Color3.fromRGB(255, 255, 255)
tab.TextSize = 14.000
tab.TextTransparency = 0.5
scrollframe.Name = "scrollframe"
scrollframe.Parent = container
scrollframe.Active = true
scrollframe.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
scrollframe.BackgroundTransparency = 1.000
scrollframe.BorderSizePixel = 0
scrollframe.Position = UDim2.new(0.0260001495, 0, 0.04099999, 0)
scrollframe.Size = UDim2.new(0, 427, 0, 264)
scrollframe.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
scrollframe.CanvasSize = UDim2.new(0, 0, 0, 0)
scrollframe.ScrollBarThickness = 2
scrollframe.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
scrollframe.ScrollBarImageColor3 = Color3.fromRGB(75, 75, 75)
scrolluilist.Name = "scrolluilist"
scrolluilist.Parent = scrollframe
scrolluilist.SortOrder = Enum.SortOrder.LayoutOrder
scrolluilist.Padding = UDim.new(0, 3)
container.Name = "container"
container.Parent = containers
container.BackgroundColor3 = Color3.fromRGB(51, 51, 51)
container.Position = UDim2.new(0.273131847, 0, 0.175236449, 0)
container.Size = UDim2.new(0, 443, 0, 283)
container.Visible = false
containeruicorner.CornerRadius = UDim.new(0, 6)
containeruicorner.Name = "containeruicorner"
containeruicorner.Parent = container
if ft == false then
ft = true
container.Visible = true
tab.TextTransparency = 0
currenttab.Text = title
end
tab.MouseButton1Click:Connect(
function()
for i, v in next, containers:GetChildren() do
if v.Name == "container" then
v.Visible = false
end
end
for i, v in next, tabholder:GetChildren() do
if v.ClassName == "TextButton" then
v.TextTransparency = 0.5
end
end
container.Visible = true
tab.TextTransparency = 0
currenttab.Text = title
end
)
local tab = {}
function tab:Button(title, callback)
local button = Instance.new("TextButton")
local buttonuicorner = Instance.new("UICorner")
button.Name = "button"
button.Parent = scrollframe
button.AnchorPoint = Vector2.new(0.5, 0.5)
button.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
button.Position = UDim2.new(0.503571451, 0, 0.535714269, 0)
button.Size = UDim2.new(0, 420, 0, 28)
button.AutoButtonColor = false
button.Font = Enum.Font.Gotham
button.TextColor3 = Color3.fromRGB(255, 255, 255)
button.TextSize = 14.000
button.Text = title
buttonuicorner.CornerRadius = UDim.new(0, 3)
buttonuicorner.Name = "buttonuicorner"
buttonuicorner.Parent = button
button.MouseEnter:Connect(
function()
TweenService:Create(
button,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(71, 71, 71)}
):Play()
end
)
button.MouseLeave:Connect(
function()
TweenService:Create(
button,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(61, 61, 61)}
):Play()
end
)
button.MouseButton1Click:Connect(
function()
button.TextSize = 0
lib:Tween(button, {TextSize = 16}, 0.2)
wait(0.2)
lib:Tween(button, {TextSize = 14}, 0.2)
if callback then
pcall(callback)
end
end
)
scrollframe.CanvasSize = UDim2.new(0, 0, 0, scrolluilist.AbsoluteContentSize.Y)
end
function tab:Toggle(text, toggled, callback)
local t = false
local toggle = Instance.new("TextButton")
local toggleuicorner = Instance.new("UICorner")
local title = Instance.new("TextLabel")
local box = Instance.new("Frame")
local fill = Instance.new("Frame")
local filluicorner = Instance.new("UICorner")
local boxuicorner = Instance.new("UICorner")
toggle.Name = "toggle"
toggle.Parent = scrollframe
toggle.AnchorPoint = Vector2.new(0.5, 0.5)
toggle.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
toggle.Position = UDim2.new(0.503571451, 0, 0.535714269, 0)
toggle.Size = UDim2.new(0, 420, 0, 28)
toggle.AutoButtonColor = false
toggle.Font = Enum.Font.Gotham
toggle.Text = ""
toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
toggle.TextSize = 14.000
toggleuicorner.CornerRadius = UDim.new(0, 3)
toggleuicorner.Name = "toggleuicorner"
toggleuicorner.Parent = toggle
title.Name = "title"
title.Parent = toggle
title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
title.BackgroundTransparency = 1.000
title.Position = UDim2.new(0.0238095261, 0, 0.178571433, 0)
title.Size = UDim2.new(0, 55, 0, 17)
title.Font = Enum.Font.Gotham
title.Text = text
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextSize = 14.000
title.TextXAlignment = Enum.TextXAlignment.Left
box.Name = "box"
box.Parent = toggle
box.AnchorPoint = Vector2.new(1, 0.5)
box.BackgroundColor3 = Color3.fromRGB(51, 51, 51)
box.BorderSizePixel = 0
box.Position = UDim2.new(1, -5, 0.5, 0)
box.Size = UDim2.new(0, 36, 1, -8)
fill.Name = "fill"
fill.Parent = box
fill.AnchorPoint = Vector2.new(0, 0.5)
fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fill.BorderSizePixel = 0
fill.Position = UDim2.new(0, 2, 0.5, 0)
fill.Size = UDim2.new(0.5, -2, 1, -4)
filluicorner.CornerRadius = UDim.new(0, 3)
filluicorner.Name = "filluicorner"
filluicorner.Parent = fill
boxuicorner.CornerRadius = UDim.new(0, 3)
boxuicorner.Name = "boxuicorner"
boxuicorner.Parent = box
toggle.MouseEnter:Connect(
function()
TweenService:Create(
toggle,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(71, 71, 71)}
):Play()
end
)
toggle.MouseLeave:Connect(
function()
TweenService:Create(
toggle,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(61, 61, 61)}
):Play()
end
)
toggle.MouseButton1Click:Connect(
function()
if t == true then
fill:TweenPosition(UDim2.new(0, 2, 0.5, 0), "In", "Linear", 0.2)
if callback then
callback(false)
end
t = not t
else
fill:TweenPosition(UDim2.new(0, 17, 0.5, 0), "Out", "Linear", 0.2)
if callback then
callback(true)
end
t = not t
end
end
)
scrollframe.CanvasSize = UDim2.new(0, 0, 0, scrolluilist.AbsoluteContentSize.Y)
end
function tab:Colorpicker(text, presetcolor, callback)
local colorpicker = Instance.new("TextButton")
local colorpickeruicorner = Instance.new("UICorner")
local title = Instance.new("TextLabel")
local currentcolor = Instance.new("Frame")
local currentcoloruicorner = Instance.new("UICorner")
local ColorPickerToggled = false
local OldToggleColor = Color3.fromRGB(0, 0, 0)
local OldColor = Color3.fromRGB(0, 0, 0)
local OldColorSelectionPosition = nil
local OldHueSelectionPosition = nil
local ColorH, ColorS, ColorV = 1, 1, 1
local RainbowColorPicker = false
local ColorPickerInput = nil
local ColorInput = nil
local HueInput = nil
colorpicker.Name = "colorpicker"
colorpicker.Parent = scrollframe
colorpicker.AnchorPoint = Vector2.new(0.5, 0.5)
colorpicker.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
colorpicker.Position = UDim2.new(0.516391993, 0, 0.569233835, 0)
colorpicker.Size = UDim2.new(0, 420, 0, 28)
colorpicker.AutoButtonColor = false
colorpicker.Font = Enum.Font.Gotham
colorpicker.Text = ""
colorpicker.TextColor3 = Color3.fromRGB(255, 255, 255)
colorpicker.TextSize = 14.000
colorpickeruicorner.CornerRadius = UDim.new(0, 3)
colorpickeruicorner.Name = "colorpickeruicorner"
colorpickeruicorner.Parent = colorpicker
title.Name = "title"
title.Parent = colorpicker
title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
title.BackgroundTransparency = 1.000
title.Position = UDim2.new(0.0238095261, 0, 0.178571433, 0)
title.Size = UDim2.new(0, 55, 0, 17)
title.Font = Enum.Font.Gotham
title.Text = text
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextSize = 14.000
title.TextXAlignment = Enum.TextXAlignment.Left
currentcolor.Name = "currentcolor"
currentcolor.Parent = colorpicker
currentcolor.AnchorPoint = Vector2.new(1, 0.5)
currentcolor.BackgroundColor3 = presetcolor
currentcolor.BorderSizePixel = 0
currentcolor.Position = UDim2.new(1, -5, 0.5, 0)
currentcolor.Size = UDim2.new(0, 36, 1, -8)
currentcoloruicorner.CornerRadius = UDim.new(0, 3)
currentcoloruicorner.Name = "currentcoloruicorner"
currentcoloruicorner.Parent = currentcolor
local colorpickerframe = Instance.new("Frame")
local color = Instance.new("ImageLabel")
local UICorner = Instance.new("UICorner")
local colorselection = Instance.new("ImageLabel")
local colorhue = Instance.new("ImageLabel")
local huecorner = Instance.new("UICorner")
local UIGradient = Instance.new("UIGradient")
local hueselection = Instance.new("ImageLabel")
local confirmbutton = Instance.new("TextButton")
local confirmbuttonuicorner = Instance.new("UICorner")
local colorpickeruicorner = Instance.new("UICorner")
local rainbowtoggle = Instance.new("TextButton")
local rainbowtoggleuicorner = Instance.new("UICorner")
local title = Instance.new("TextLabel")
local box = Instance.new("Frame")
local fill = Instance.new("Frame")
local filluicorner = Instance.new("UICorner")
local boxuicorner = Instance.new("UICorner")
colorpickerframe.Name = "colorpickerframe"
colorpickerframe.Parent = scrollframe
colorpickerframe.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
colorpickerframe.Position = UDim2.new(1.06778276, 0, -0.0327380896, 0)
colorpickerframe.Size = UDim2.new(0, 169, 0, 175)
colorpickerframe.Visible = false
color.Name = "color"
color.Parent = colorpickerframe
color.BackgroundColor3 = presetcolor
color.Position = UDim2.new(0, 9, 0, 10)
color.Size = UDim2.new(0, 124, 0, 105)
color.ZIndex = 10
color.Image = "rbxassetid://4155801252"
UICorner.CornerRadius = UDim.new(0, 3)
UICorner.Parent = color
colorselection.Name = "colorselection"
colorselection.Parent = color
colorselection.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
colorselection.BackgroundTransparency = 1.000
colorselection.ZIndex = 25
colorselection.AnchorPoint = Vector2.new(0.5, 0.5)
colorselection.Position = UDim2.new(presetcolor and select(3, Color3.toHSV(presetcolor)))
colorselection.Size = UDim2.new(0, 18, 0, 18)
colorselection.Image = "rbxassetid://4953646208"
colorselection.ScaleType = Enum.ScaleType.Fit
colorhue.Name = "colorhue"
colorhue.Parent = colorpickerframe
colorhue.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
colorhue.Position = UDim2.new(0, 136, 0, 10)
colorhue.Size = UDim2.new(0, 25, 0, 105)
huecorner.CornerRadius = UDim.new(0, 3)
huecorner.Name = "huecorner"
huecorner.Parent = colorhue
UIGradient.Color =
ColorSequence.new {
ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 4)),
ColorSequenceKeypoint.new(0.20, Color3.fromRGB(234, 255, 0)),
ColorSequenceKeypoint.new(0.40, Color3.fromRGB(21, 255, 0)),
ColorSequenceKeypoint.new(0.60, Color3.fromRGB(0, 255, 255)),
ColorSequenceKeypoint.new(0.80, Color3.fromRGB(0, 17, 255)),
ColorSequenceKeypoint.new(0.90, Color3.fromRGB(255, 0, 251)),
ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 4))
}
UIGradient.Rotation = 270
UIGradient.Parent = colorhue
hueselection.Name = "hueselection"
hueselection.Parent = colorhue
hueselection.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
hueselection.BackgroundTransparency = 1.000
hueselection.Position = UDim2.new(0.48, 0, 1 - select(1, Color3.toHSV(presetcolor)))
hueselection.Size = UDim2.new(0, 18, 0, 18)
hueselection.Image = "rbxassetid://4953646208"
hueselection.AnchorPoint = Vector2.new(0.5, 0.5)
confirmbutton.Name = "confirmbutton"
confirmbutton.Parent = colorpickerframe
confirmbutton.AnchorPoint = Vector2.new(0.5, 0.5)
confirmbutton.BackgroundColor3 = Color3.fromRGB(51, 51, 51)
confirmbutton.Position = UDim2.new(0.499422163, 0, 0.90464288, 0)
confirmbutton.Size = UDim2.new(0, 150, 0, 19)
confirmbutton.AutoButtonColor = false
confirmbutton.Font = Enum.Font.Gotham
confirmbutton.Text = "Confirm"
confirmbutton.TextColor3 = Color3.fromRGB(255, 255, 255)
confirmbutton.TextSize = 14.000
confirmbuttonuicorner.CornerRadius = UDim.new(0, 3)
confirmbuttonuicorner.Name = "confirmbuttonuicorner"
confirmbuttonuicorner.Parent = confirmbutton
colorpickeruicorner.CornerRadius = UDim.new(0, 3)
colorpickeruicorner.Name = "colorpickeruicorner"
colorpickeruicorner.Parent = colorpickerframe
rainbowtoggle.Name = "rainbowtoggle"
rainbowtoggle.Parent = colorpickerframe
rainbowtoggle.AnchorPoint = Vector2.new(0.5, 0.5)
rainbowtoggle.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
rainbowtoggle.Position = UDim2.new(0.495000005, 0, 0.755999982, 0)
rainbowtoggle.Size = UDim2.new(0, 152, 0, 25)
rainbowtoggle.AutoButtonColor = false
rainbowtoggle.Font = Enum.Font.Gotham
rainbowtoggle.Text = ""
rainbowtoggle.TextColor3 = Color3.fromRGB(255, 255, 255)
rainbowtoggle.TextSize = 14.000
rainbowtoggleuicorner.CornerRadius = UDim.new(0, 3)
rainbowtoggleuicorner.Name = "rainbowtoggleuicorner"
rainbowtoggleuicorner.Parent = rainbowtoggle
title.Name = "title"
title.Parent = rainbowtoggle
title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
title.BackgroundTransparency = 1.000
title.Position = UDim2.new(0.0238095261, 0, 0.178571433, 0)
title.Size = UDim2.new(0, 55, 0, 17)
title.Font = Enum.Font.Gotham
title.Text = "Rainbow"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextSize = 14.000
title.TextXAlignment = Enum.TextXAlignment.Left
box.Name = "box"
box.Parent = rainbowtoggle
box.AnchorPoint = Vector2.new(1, 0.5)
box.BackgroundColor3 = Color3.fromRGB(51, 51, 51)
box.BorderSizePixel = 0
box.Position = UDim2.new(1, -5, 0.5, 0)
box.Size = UDim2.new(0, 36, 1, -8)
fill.Name = "fill"
fill.Parent = box
fill.AnchorPoint = Vector2.new(0, 0.5)
fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
fill.BorderSizePixel = 0
fill.Position = UDim2.new(0, 2, 0.5, 0)
fill.Size = UDim2.new(0.5, -2, 1, -4)
filluicorner.CornerRadius = UDim.new(0, 3)
filluicorner.Name = "filluicorner"
filluicorner.Parent = fill
boxuicorner.CornerRadius = UDim.new(0, 3)
boxuicorner.Name = "boxuicorner"
boxuicorner.Parent = box
colorpicker.MouseEnter:Connect(
function()
TweenService:Create(
colorpicker,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(71, 71, 71)}
):Play()
end
)
colorpicker.MouseLeave:Connect(
function()
TweenService:Create(
colorpicker,
TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{BackgroundColor3 = Color3.fromRGB(61, 61, 61)}
):Play()
end
)
local function UpdateColorPicker(nope)
currentcolor.BackgroundColor3 = Color3.fromHSV(ColorH, ColorS, ColorV)
color.BackgroundColor3 = Color3.fromHSV(ColorH, 1, 1)
callback(currentcolor.BackgroundColor3)
end
ColorH =
1 -
(math.clamp(hueselection.AbsolutePosition.Y - colorhue.AbsolutePosition.Y, 0, colorhue.AbsoluteSize.Y) /
colorhue.AbsoluteSize.Y)
ColorS =
(math.clamp(colorselection.AbsolutePosition.X - color.AbsolutePosition.X, 0, color.AbsoluteSize.X) /
color.AbsoluteSize.X)
ColorV =
1 -
(math.clamp(colorselection.AbsolutePosition.Y - color.AbsolutePosition.Y, 0, color.AbsoluteSize.Y) /
color.AbsoluteSize.Y)
currentcolor.BackgroundColor3 = presetcolor
color.BackgroundColor3 = presetcolor
callback(color.BackgroundColor3)
color.InputBegan:Connect(
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if RainbowColorPicker then
return
end
if ColorInput then
ColorInput:Disconnect()
end
ColorInput =
RunService.RenderStepped:Connect(
function()
local ColorX =
(math.clamp(Mouse.X - color.AbsolutePosition.X, 0, color.AbsoluteSize.X) /
color.AbsoluteSize.X)
local ColorY =
(math.clamp(Mouse.Y - color.AbsolutePosition.Y, 0, color.AbsoluteSize.Y) /
color.AbsoluteSize.Y)
colorselection.Position = UDim2.new(ColorX, 0, ColorY, 0)
ColorS = ColorX
ColorV = 1 - ColorY
UpdateColorPicker(true)
end
)
end
end
)
color.InputEnded:Connect(
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if ColorInput then
ColorInput:Disconnect()
end
end
end
)
colorhue.InputBegan:Connect(
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if RainbowColorPicker then
return
end
if HueInput then
HueInput:Disconnect()
end
HueInput =
RunService.RenderStepped:Connect(
function()
local HueY =
(math.clamp(Mouse.Y - colorhue.AbsolutePosition.Y, 0, colorhue.AbsoluteSize.Y) /
colorhue.AbsoluteSize.Y)
hueselection.Position = UDim2.new(0.48, 0, HueY, 0)
ColorH = 1 - HueY
UpdateColorPicker(true)
end
)
end
end
)
colorhue.InputEnded:Connect(
function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if HueInput then
HueInput:Disconnect()
end
end
end
)
rainbowtoggle.MouseButton1Down:Connect(
function()
RainbowColorPicker = not RainbowColorPicker
if ColorInput then
ColorInput:Disconnect()
end
if HueInput then
HueInput:Disconnect()
end
if RainbowColorPicker then
fill:TweenPosition(UDim2.new(0, 17, 0.5, 0), "In", "Linear", 0.2)
OldToggleColor = currentcolor.BackgroundColor3
OldColor = color.BackgroundColor3
OldColorSelectionPosition = colorselection.Position
OldHueSelectionPosition = hueselection.Position
while RainbowColorPicker do
currentcolor.BackgroundColor3 = Color3.fromHSV(lib.RainbowColorValue, 1, 1)
color.BackgroundColor3 = Color3.fromHSV(lib.RainbowColorValue, 1, 1)
colorselection.Position = UDim2.new(1, 0, 0, 0)
hueselection.Position = UDim2.new(0.48, 0, 0, lib.HueSelectionPosition)
callback(color.BackgroundColor3)
wait()
end
elseif not RainbowColorPicker then
fill:TweenPosition(UDim2.new(0, 2, 0.5, 0), "Out", "Linear", 0.2)
currentcolor.BackgroundColor3 = OldToggleColor
color.BackgroundColor3 = OldColor
colorselection.Position = OldColorSelectionPosition
hueselection.Position = OldHueSelectionPosition
callback(currentcolor.BackgroundColor3)
end
end
)
colorpicker.MouseButton1Click:Connect(
function()
if ColorPickerToggled == true then
ColorPickerToggled = not ColorPickerToggled
colorpickerframe.Visible = false
scrollframe.CanvasSize = UDim2.new(0, 0, 0, scrolluilist.AbsoluteContentSize.Y)
else
ColorPickerToggled = not ColorPickerToggled
colorpickerframe.Visible = true
scrollframe.CanvasSize = UDim2.new(0, 0, 0, scrolluilist.AbsoluteContentSize.Y)
end
end
)
confirmbutton.MouseButton1Click:Connect(
function()