-
Notifications
You must be signed in to change notification settings - Fork 0
/
starhook.lua
6037 lines (5285 loc) · 234 KB
/
starhook.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
--[[
]]
local Drawing = loadstring(game:HttpGet("https://raw.githubusercontent.com/linemaster2/storage/main/Drawing.lua"))();
local Library = {};
do
Library = {
Open = true;
Accent = Color3.fromRGB(207, 227, 0);
Pages = {};
Sections = {};
Flags = {};
UnNamedFlags = 0;
ThemeObjects = {};
Instances = {};
Holder = nil;
OldSize = nil;
ScreenGUI = nil;
DropdownOpen = false,
OptionListOpen = false,
Keys = {
[Enum.KeyCode.Space] = "Space",
[Enum.KeyCode.Return] = "Return",
[Enum.KeyCode.LeftShift] = "LShift",
[Enum.KeyCode.RightShift] = "RShift",
[Enum.KeyCode.LeftControl] = "LCtrl",
[Enum.KeyCode.RightControl] = "RCtrl",
[Enum.KeyCode.LeftAlt] = "LAlt",
[Enum.KeyCode.RightAlt] = "RAlt",
[Enum.KeyCode.CapsLock] = "CAPS",
[Enum.KeyCode.One] = "1",
[Enum.KeyCode.Two] = "2",
[Enum.KeyCode.Three] = "3",
[Enum.KeyCode.Four] = "4",
[Enum.KeyCode.Five] = "5",
[Enum.KeyCode.Six] = "6",
[Enum.KeyCode.Seven] = "7",
[Enum.KeyCode.Eight] = "8",
[Enum.KeyCode.Nine] = "9",
[Enum.KeyCode.Zero] = "0",
[Enum.KeyCode.KeypadOne] = "Num1",
[Enum.KeyCode.KeypadTwo] = "Num2",
[Enum.KeyCode.KeypadThree] = "Num3",
[Enum.KeyCode.KeypadFour] = "Num4",
[Enum.KeyCode.KeypadFive] = "Num5",
[Enum.KeyCode.KeypadSix] = "Num6",
[Enum.KeyCode.KeypadSeven] = "Num7",
[Enum.KeyCode.KeypadEight] = "Num8",
[Enum.KeyCode.KeypadNine] = "Num9",
[Enum.KeyCode.KeypadZero] = "Num0",
[Enum.KeyCode.Minus] = "-",
[Enum.KeyCode.Equals] = "=",
[Enum.KeyCode.Tilde] = "~",
[Enum.KeyCode.LeftBracket] = "[",
[Enum.KeyCode.RightBracket] = "]",
[Enum.KeyCode.RightParenthesis] = ")",
[Enum.KeyCode.LeftParenthesis] = "(",
[Enum.KeyCode.Semicolon] = ",",
[Enum.KeyCode.Quote] = "'",
[Enum.KeyCode.BackSlash] = "\\",
[Enum.KeyCode.Comma] = ",",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Slash] = "/",
[Enum.KeyCode.Asterisk] = "*",
[Enum.KeyCode.Plus] = "+",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Backquote] = "`",
[Enum.UserInputType.MouseButton1] = "MB1",
[Enum.UserInputType.MouseButton2] = "MB2",
[Enum.UserInputType.MouseButton3] = "MB3"
};
Connections = {};
FontSize = 12;
VisValues = {};
UIKey = Enum.KeyCode.Insert;
Notifs = {};
}
-- // Ignores
local Flags = {} -- Ignore
local ColorHolders = {}
-- // Extension
Library.__index = Library
Library.Pages.__index = Library.Pages
Library.Sections.__index = Library.Sections
local LocalPlayer = game:GetService('Players').LocalPlayer;
local Mouse = LocalPlayer:GetMouse();
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
-- // Misc Functions
do
function Library:Connection(signal, Callback)
local Con = signal:Connect(Callback)
return Con
end
--
function Library:Disconnect(Connection)
Connection:Disconnect()
end
--
function Library:Round(Number, Float)
return Float * math.floor(Number / Float)
end
--
function Library.NextFlag()
Library.UnNamedFlags = Library.UnNamedFlags + 1
return string.format("%.14g", Library.UnNamedFlags)
end
--
function Library:GetConfig()
local Config = ""
for Index, Value in pairs(self.Flags) do
if
Index ~= "ConfigConfig_List"
and Index ~= "ConfigConfig_Load"
and Index ~= "ConfigConfig_Save"
then
local Value2 = Value
local Final = ""
--
if typeof(Value2) == "Color3" then
local hue, sat, val = Value2:ToHSV()
--
Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat, val, 1)
elseif typeof(Value2) == "table" and Value2.Color and Value2.Transparency then
local hue, sat, val = Value2.Color:ToHSV()
--
Final = ("rgb(%s,%s,%s,%s)"):format(hue, sat, val, Value2.Transparency)
elseif typeof(Value2) == "table" and Value.Mode then
local Values = Value.current
--
Final = ("key(%s,%s,%s)"):format(Values[1] or "nil", Values[2] or "nil", Value.Mode)
elseif Value2 ~= nil then
if typeof(Value2) == "boolean" then
Value2 = ("bool(%s)"):format(tostring(Value2))
elseif typeof(Value2) == "table" then
local New = "table("
--
for Index2, Value3 in pairs(Value2) do
New = New .. Value3 .. ","
end
--
if New:sub(#New) == "," then
New = New:sub(0, #New - 1)
end
--
Value2 = New .. ")"
elseif typeof(Value2) == "string" then
Value2 = ("string(%s)"):format(Value2)
elseif typeof(Value2) == "number" then
Value2 = ("number(%s)"):format(Value2)
end
--
Final = Value2
end
--
Config = Config .. Index .. ": " .. tostring(Final) .. "\n"
end
end
--
return Config
end
--
function Library:LoadConfig(Config)
local Table = string.split(Config, "\n")
local Table2 = {}
for Index, Value in pairs(Table) do
local Table3 = string.split(Value, ":")
--
if Table3[1] ~= "ConfigConfig_List" and #Table3 >= 2 then
local Value = Table3[2]:sub(2, #Table3[2])
--
if Value:sub(1, 3) == "rgb" then
local Table4 = string.split(Value:sub(5, #Value - 1), ",")
--
Value = Table4
elseif Value:sub(1, 3) == "key" then
local Table4 = string.split(Value:sub(5, #Value - 1), ",")
--
if Table4[1] == "nil" and Table4[2] == "nil" then
Table4[1] = nil
Table4[2] = nil
end
--
Value = Table4
elseif Value:sub(1, 4) == "bool" then
local Bool = Value:sub(6, #Value - 1)
--
Value = Bool == "true"
elseif Value:sub(1, 5) == "table" then
local Table4 = string.split(Value:sub(7, #Value - 1), ",")
--
Value = Table4
elseif Value:sub(1, 6) == "string" then
local String = Value:sub(8, #Value - 1)
--
Value = String
elseif Value:sub(1, 6) == "number" then
local Number = tonumber(Value:sub(8, #Value - 1))
--
Value = Number
end
--
Table2[Table3[1]] = Value
end
end
--
for i, v in pairs(Table2) do
if Flags[i] then
if typeof(Flags[i]) == "table" then
Flags[i]:Set(v)
else
Flags[i](v)
end
end
end
end
--
function Library:SetOpen(bool)
if typeof(bool) == 'boolean' then
Library.Open = bool;
if Library.Open then
Library.Holder.Visible = true
--game:GetService("TweenService"):Create(Library.Holder, TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Library.OldSize.X.Offset,0,40)}):Play()
game:GetService("TweenService"):Create(Library.Holder, TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Library.OldSize.X.Offset,0,Library.OldSize.Y.Offset)}):Play()
else
--game:GetService("TweenService"):Create(Library.Holder, TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Library.OldSize.X.Offset,0,40)}):Play()
game:GetService("TweenService"):Create(Library.Holder, TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, 0,0,20)}):Play()
task.wait(0.25)
Library.Holder.Visible = false
end
end
end;
--
function Library:ChangeAccent(Color)
Library.Accent = Color
for obj, theme in next, Library.ThemeObjects do
if theme:IsA("Frame") or theme:IsA("TextButton") then
theme.BackgroundColor3 = Color
elseif theme:IsA("TextLabel") then
theme.TextColor3 = Color
elseif theme:IsA("ScrollingFrame") then
theme.ScrollBarImageColor3 = Library.Accent
end
end
end
--
function Library:IsMouseOverFrame(Frame)
local AbsPos, AbsSize = Frame.AbsolutePosition, Frame.AbsoluteSize;
if Mouse.X >= AbsPos.X and Mouse.X <= AbsPos.X + AbsSize.X
and Mouse.Y >= AbsPos.Y and Mouse.Y <= AbsPos.Y + AbsSize.Y then
return true;
end;
return false;
end;
end
-- // Colorpicker Element
do
function Library:NewPicker(name, default, parent, count, flag, callback)
-- // Instances
local ColorpickerFrame = Instance.new("TextButton")
ColorpickerFrame.Name = "Colorpicker_frame"
ColorpickerFrame.BackgroundColor3 = default
ColorpickerFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
ColorpickerFrame.BorderSizePixel = 0
if count == 1 then
ColorpickerFrame.Position = UDim2.new(1, - (count * 20),0.5,0)
else
ColorpickerFrame.Position = UDim2.new(1, - (count * 20) - (count * 4),0.5,0)
end
ColorpickerFrame.Size = UDim2.new(0, 20, 0, 20)
ColorpickerFrame.AnchorPoint = Vector2.new(0,0.5)
ColorpickerFrame.Text = ""
ColorpickerFrame.AutoButtonColor = false
local UICorner = Instance.new("UICorner")
UICorner.Name = "UICorner"
UICorner.CornerRadius = UDim.new(0, 4)
UICorner.Parent = ColorpickerFrame
local UIStroke = Instance.new("UIStroke")
UIStroke.Name = "UIStroke"
UIStroke.Color = Color3.fromRGB(40, 40, 40)
UIStroke.Parent = ColorpickerFrame
ColorpickerFrame.Parent = parent
local Colorpicker = Instance.new("TextButton")
Colorpicker.Name = "Colorpicker"
Colorpicker.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Colorpicker.BorderColor3 = Color3.fromRGB(0, 0, 0)
Colorpicker.BorderSizePixel = 0
Colorpicker.Position = UDim2.new(0, ColorpickerFrame.AbsolutePosition.X - 100, 0, ColorpickerFrame.AbsolutePosition.Y - 50)
Colorpicker.Size = UDim2.new(0, 180, 0, 180)
Colorpicker.Parent = Library.ScreenGUI
Colorpicker.ZIndex = 100
Colorpicker.Visible = false
Colorpicker.Text = ""
Colorpicker.AutoButtonColor = false
local H,S,V = default:ToHSV()
local ImageLabel = Instance.new("ImageLabel")
ImageLabel.Name = "ImageLabel"
ImageLabel.Image = "rbxassetid://11970108040"
ImageLabel.BackgroundColor3 = Color3.fromHSV(H, 1, 1)
ImageLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
ImageLabel.BorderSizePixel = 0
ImageLabel.Position = UDim2.new(0.0556, 0, 0.026, 0)
ImageLabel.Size = UDim2.new(0, 160, 0, 154)
ImageLabel.Parent = Colorpicker
local UICorner = Instance.new("UICorner")
UICorner.Name = "UICorner"
UICorner.CornerRadius = UDim.new(0, 6)
UICorner.Parent = Colorpicker
local ImageButton = Instance.new("ImageButton")
ImageButton.Name = "ImageButton"
ImageButton.Image = "rbxassetid://14684562507"
ImageButton.BackgroundColor3 = Color3.fromHSV(H, 1, 1)
ImageButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
ImageButton.BorderSizePixel = 0
ImageButton.Position = UDim2.new(0.056, 0, 0.026, 0)
ImageButton.Size = UDim2.new(0, 160, 0, 154)
ImageButton.AutoButtonColor = false
local SVSlider = Instance.new("Frame")
SVSlider.Name = "SV_slider"
SVSlider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
SVSlider.BackgroundTransparency = 1
SVSlider.ClipsDescendants = true
SVSlider.Position = UDim2.new(0.855, 0, 0.0966, 0)
SVSlider.Size = UDim2.new(0,7,0,7)
SVSlider.ZIndex = 3
local Val = Instance.new("ImageLabel")
Val.Name = "Val"
Val.Image = "http://www.roblox.com/asset/?id=14684563800"
Val.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Val.BackgroundTransparency = 1
Val.BorderColor3 = Color3.fromRGB(0, 0, 0)
Val.BorderSizePixel = 0
Val.Size = UDim2.new(1, 0, 1, 0)
Val.Parent = ImageButton
local UICorner1 = Instance.new("UICorner")
UICorner1.Name = "UICorner"
UICorner1.CornerRadius = UDim.new(0, 100)
UICorner1.Parent = SVSlider
local UIStroke = Instance.new("UIStroke")
UIStroke.Name = "UIStroke"
UIStroke.Color = Color3.fromRGB(255, 255, 255)
UIStroke.Parent = SVSlider
SVSlider.Parent = ImageButton
ImageButton.Parent = Colorpicker
local ImageButton1 = Instance.new("ImageButton")
ImageButton1.Name = "ImageButton"
ImageButton1.Image = "http://www.roblox.com/asset/?id=16789872274"
ImageButton1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
ImageButton1.BorderColor3 = Color3.fromRGB(0, 0, 0)
ImageButton1.BorderSizePixel = 0
ImageButton1.Position = UDim2.new(0.5, 0,0, 165)
ImageButton1.Size = UDim2.new(0, 160,0, 8)
ImageButton1.AutoButtonColor = false
ImageButton1.AnchorPoint = Vector2.new(0.5,0)
ImageButton1.BackgroundTransparency = 1
local Frame = Instance.new("Frame")
Frame.Name = "Frame"
Frame.BackgroundColor3 = Color3.fromRGB(254, 254, 254)
Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
Frame.BorderSizePixel = 0
Frame.Position = UDim2.new(0.926, 0,0.5, 0)
Frame.Size = UDim2.new(0, 12,0, 12)
Frame.AnchorPoint = Vector2.new(0,0.5)
Frame.ZIndex = 45
local UICorner2 = Instance.new("UICorner")
UICorner2.Name = "UICorner"
UICorner2.Parent = Frame
UICorner2.CornerRadius = UDim.new(1,0)
local UICorner3 = Instance.new("UICorner")
UICorner3.Name = "UICorner"
UICorner3.Parent = ImageButton1
Frame.Parent = ImageButton1
ImageButton1.Parent = Colorpicker
-- // Connections
local mouseover = false
local hue, sat, val = default:ToHSV()
local hsv = default:ToHSV()
local oldcolor = hsv
local slidingsaturation = false
local slidinghue = false
local slidingalpha = false
local function update()
local real_pos = game:GetService("UserInputService"):GetMouseLocation()
local mouse_position = Vector2.new(real_pos.X, real_pos.Y - 30)
local relative_palette = (mouse_position - ImageButton.AbsolutePosition)
local relative_hue = (mouse_position - ImageButton1.AbsolutePosition)
--
if slidingsaturation then
sat = math.clamp(1 - relative_palette.X / ImageButton.AbsoluteSize.X, 0, 1)
val = math.clamp(1 - relative_palette.Y / ImageButton.AbsoluteSize.Y, 0, 1)
elseif slidinghue then
hue = math.clamp(relative_hue.X / ImageButton.AbsoluteSize.X, 0, 1)
end
hsv = Color3.fromHSV(hue, sat, val)
TweenService:Create(SVSlider, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(math.clamp(1 - sat, 0.000, 1 - 0.055), 0, math.clamp(1 - val, 0.000, 1 - 0.045), 0)}):Play()
ImageButton.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
ColorpickerFrame.BackgroundColor3 = hsv
TweenService:Create(Frame, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(math.clamp(hue, 0.000, 0.982),-5,0.5,0)}):Play()
if flag then
Library.Flags[flag] = Color3.fromRGB(hsv.r * 255, hsv.g * 255, hsv.b * 255)
end
callback(Color3.fromRGB(hsv.r * 255, hsv.g * 255, hsv.b * 255))
end
local function set(color)
if type(color) == "table" then
color = Color3.fromHSV(color[1], color[2], color[3])
end
if type(color) == "string" then
color = Color3.fromHex(color)
end
local oldcolor = hsv
hue, sat, val = color:ToHSV()
hsv = Color3.fromHSV(hue, sat, val)
if hsv ~= oldcolor then
ColorpickerFrame.BackgroundColor3 = hsv
TweenService:Create(SVSlider, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(math.clamp(1 - sat, 0.000, 1 - 0.055), 0, math.clamp(1 - val, 0.000, 1 - 0.045), 0)}):Play()
ImageButton.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
TweenService:Create(Frame, TweenInfo.new(0.05, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(math.clamp(hue, 0.000, 0.982),-5,0.5,0)}):Play()
if flag then
Library.Flags[flag] = Color3.fromRGB(hsv.r * 255, hsv.g * 255, hsv.b * 255)
end
callback(Color3.fromRGB(hsv.r * 255, hsv.g * 255, hsv.b * 255))
end
end
Flags[flag] = set
set(default)
ImageButton.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
slidingsaturation = true
update()
end
end)
ImageButton.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
slidingsaturation = false
update()
end
end)
ImageButton1.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
slidinghue = true
update()
end
end)
ImageButton1.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
slidinghue = false
update()
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged, function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement then
if slidinghue then
update()
end
if slidingsaturation then
update()
end
end
end)
local colorpickertypes = {}
function colorpickertypes:Set(color, newalpha)
set(color, newalpha)
end
Library:Connection(game:GetService("UserInputService").InputBegan, function(Input)
if Colorpicker.Visible and Input.UserInputType == Enum.UserInputType.MouseButton1 then
if not Library:IsMouseOverFrame(Colorpicker) and not Library:IsMouseOverFrame(ColorpickerFrame) then
Colorpicker.Position = UDim2.new(0, ColorpickerFrame.AbsolutePosition.X - 100, 0, ColorpickerFrame.AbsolutePosition.Y + 25)
TweenService:Create(Colorpicker, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
TweenService:Create(Colorpicker, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Position = UDim2.new(0, ColorpickerFrame.AbsolutePosition.X - 100, 0, ColorpickerFrame.AbsolutePosition.Y)}):Play()
task.spawn(function()
task.wait(0.1)
Colorpicker.Visible = false
parent.ZIndex = 1
Library.Cooldown = false
end)
for _,V in next, Colorpicker:GetDescendants() do
if V:IsA("Frame") or V:IsA("TextButton") or V:IsA("ScrollingFrame") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
Library.VisValues[V] = V.BackgroundTransparency
elseif V:IsA("TextLabel") or V:IsA("TextBox") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
Library.VisValues[V] = V.TextTransparency
elseif V:IsA("ImageLabel") or V:IsA("ImageButton") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play();
Library.VisValues[V] = V.ImageTransparency
elseif V:IsA("UIStroke") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Transparency = 1}):Play()
Library.VisValues[V] = V.Transparency
end
end
end
end
end)
ColorpickerFrame.MouseButton1Down:Connect(function()
if Colorpicker.Visible == false then
Colorpicker.Position = UDim2.new(0, ColorpickerFrame.AbsolutePosition.X - 100, 0, ColorpickerFrame.AbsolutePosition.Y)
TweenService:Create(Colorpicker, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0, ColorpickerFrame.AbsolutePosition.X - 100, 0, ColorpickerFrame.AbsolutePosition.Y + 25)}):Play()
end
Colorpicker.Visible = true
parent.ZIndex = 100
Library.Cooldown = true
TweenService:Create(Colorpicker, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
for _,V in next, Colorpicker:GetDescendants() do
if V:IsA("Frame") or V:IsA("TextButton") or V:IsA("ScrollingFrame") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {BackgroundTransparency = Library.VisValues[V]}):Play()
elseif V:IsA("TextLabel") or V:IsA("TextBox") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextTransparency = Library.VisValues[V]}):Play()
elseif V:IsA("ImageLabel") or V:IsA("ImageButton") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {ImageTransparency = Library.VisValues[V]}):Play();
elseif V:IsA("UIStroke") then
TweenService:Create(V, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Transparency = 0}):Play()
end
end
if slidinghue then
slidinghue = false
end
if slidingsaturation then
slidingsaturation = false
end
end)
return colorpickertypes, Colorpicker
end
end
function Library:updateNotifsPositions(position)
for i, v in pairs(Library.Notifs) do
local Position = Vector2.new(20, 20)
game:GetService("TweenService"):Create(v.Container, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Position = UDim2.new(0,Position.X,0,Position.Y + (i * 25))}):Play()
end
end
function Library:Notification(message, duration)
local notification = {Container = nil, Objects = {}}
--
local Position = Vector2.new(20, 20)
--
local NewInd = Instance.new("Frame")
NewInd.Name = "NewInd"
NewInd.AutomaticSize = Enum.AutomaticSize.X
NewInd.Position = UDim2.new(0,20,0,20)
NewInd.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
NewInd.BackgroundTransparency = 1
NewInd.BorderColor3 = Color3.fromRGB(0, 0, 0)
NewInd.Size = UDim2.fromOffset(0, 20)
NewInd.Parent = Library.ScreenGUI
notification.Container = NewInd
local Outline = Instance.new("Frame")
Outline.Name = "Outline"
Outline.AnchorPoint = Vector2.new(0, 0)
Outline.AutomaticSize = Enum.AutomaticSize.X
Outline.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Outline.BorderColor3 = Color3.fromRGB(0, 0, 0)
Outline.BorderSizePixel = 1
Outline.Position = UDim2.new(0,0,0,0)
Outline.Size = UDim2.fromOffset(0, 20)
Outline.Visible = true
Outline.ZIndex = 50
Outline.Parent = NewInd
Outline.BackgroundTransparency = 1
local UICorner = Instance.new("UICorner")
UICorner.Name = "UICorner"
UICorner.CornerRadius = UDim.new(0, 4)
UICorner.Parent = Outline
local UIStroke = Instance.new("UIStroke")
UIStroke.Name = "UIStroke"
UIStroke.Parent = Outline
UIStroke.Transparency = 1
local Inline = Instance.new("Frame")
Inline.Name = "Inline"
Inline.BackgroundColor3 = Color3.fromRGB(13, 13, 13)
Inline.BorderColor3 = Color3.fromRGB(0, 0, 0)
Inline.BorderSizePixel = 0
Inline.Position = UDim2.fromOffset(1, 1)
Inline.Size = UDim2.new(1, -2, 1, -2)
Inline.ZIndex = 51
Inline.BackgroundTransparency = 1
local UICorner2 = Instance.new("UICorner")
UICorner2.Name = "UICorner_2"
UICorner2.CornerRadius = UDim.new(0, 4)
UICorner2.Parent = Inline
local Title = Instance.new("TextLabel")
Title.Name = "Title"
Title.FontFace = Font.new("rbxasset://fonts/families/GothamSSm.json")
Title.RichText = true
Title.Text = message
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.TextSize = 13
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.AutomaticSize = Enum.AutomaticSize.X
Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Title.BackgroundTransparency = 1
Title.BorderColor3 = Color3.fromRGB(0, 0, 0)
Title.BorderSizePixel = 0
Title.Position = UDim2.fromOffset(5, 0)
Title.Size = UDim2.fromScale(0, 1)
Title.Parent = Inline
Title.TextTransparency = 1
local UIPadding = Instance.new("UIPadding")
UIPadding.Name = "UIPadding"
UIPadding.PaddingRight = UDim.new(0, 6)
UIPadding.Parent = Inline
Inline.Parent = Outline
function notification:remove()
table.remove(Library.Notifs, table.find(Library.Notifs, notification))
Library:updateNotifsPositions(Position)
task.wait(0.5)
NewInd:Destroy()
end
task.spawn(function()
Outline.AnchorPoint = Vector2.new(1,0)
for i,v in next, NewInd:GetDescendants() do
if v:IsA("Frame") then
game:GetService("TweenService"):Create(v, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
elseif v:IsA("UIStroke") then
game:GetService("TweenService"):Create(v, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Transparency = 0}):Play()
end
end
local Tween1 = game:GetService("TweenService"):Create(Outline, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {AnchorPoint = Vector2.new(0,0)}):Play()
game:GetService("TweenService"):Create(Title, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
task.wait(duration)
--game:GetService("TweenService"):Create(ActualInd, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {AnchorPoint = Vector2.new(1,0)}):Play()
for i,v in next, NewInd:GetDescendants() do
if v:IsA("Frame") then
game:GetService("TweenService"):Create(v, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
elseif v:IsA("UIStroke") then
game:GetService("TweenService"):Create(v, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Transparency = 1}):Play()
end
end
game:GetService("TweenService"):Create(Title, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
end)
task.delay(duration + 0.1, function()
notification:remove()
end)
table.insert(Library.Notifs, notification)
Library:updateNotifsPositions(Position)
NewInd.Position = UDim2.new(0,Position.X,0,Position.Y + (table.find(Library.Notifs, notification) * 25))
return notification
end
-- // Main
do
local Pages = Library.Pages;
local Sections = Library.Sections;
--
function Library:New(Properties)
if not Properties then
Properties = {}
end
--
local Window = {
Size = Properties.Size or UDim2.new(0,600,0,450),
Pages = {},
PageAxis = 0,
Dragging = { false, UDim2.new(0, 0, 0, 0) },
Resized = nil,
Elements = {},
}
--
local ScreenGui = Instance.new('ScreenGui', game:GetService("RunService"):IsStudio() and game.Players.LocalPlayer.PlayerGui or game.CoreGui)
local Outline = Instance.new('Frame', ScreenGui)
local UICorner = Instance.new('UICorner', Outline)
local UIStroke = Instance.new('UIStroke', Outline)
local Inline = Instance.new('Frame', Outline)
local UICorner_2 = Instance.new('UICorner', Inline)
local Holder = Instance.new('Frame', Inline)
local UICorner = Instance.new('UICorner', Holder)
local Frame = Instance.new('Frame', Holder)
local Tabs = Instance.new('Frame', Inline)
local UIListLayout = Instance.new('UIListLayout', Tabs)
local TextButton = Instance.new('TextButton', Inline)
--
ScreenGui.DisplayOrder = 100
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
Library.ScreenGUI = ScreenGui
--
Outline.Name = "Outline"
Outline.Position = UDim2.new(0.5,0,0.5,0)
Outline.Size = UDim2.new(0,0,0,40)
Outline.BackgroundColor3 = Color3.new(0.1961,0.1961,0.1961)
Outline.BorderColor3 = Color3.new(0,0,0)
Outline.AnchorPoint = Vector2.new(0.5,0.5)
Outline.ZIndex = 50
Outline.ClipsDescendants = false
Library.Holder = Outline
Library.OldSize = Window.Size
--
local Logo = Instance.new("ImageLabel")
Logo.Name = "Logo"
Logo.Image = "http://www.roblox.com/asset/?id=17673929618"
Logo.ScaleType = Enum.ScaleType.Fit
Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Logo.BackgroundTransparency = 1
Logo.BorderColor3 = Color3.fromRGB(0, 0, 0)
Logo.BorderSizePixel = 0
Logo.Position = UDim2.fromOffset(10, -20)
Logo.Size = UDim2.fromOffset(90, 90)
Logo.Parent = Holder
--
Inline.Name = "Inline"
Inline.Position = UDim2.new(0,1,0,1)
Inline.Size = UDim2.new(1,-2,1,-2)
Inline.BackgroundColor3 = Color3.new(0.051,0.051,0.051)
Inline.BorderSizePixel = 0
Inline.BorderColor3 = Color3.new(0,0,0)
Inline.ZIndex = 51
--
Holder.Name = "Holder"
Holder.Position = UDim2.new(0,150,0,0)
Holder.Size = UDim2.new(1,-150,1,0)
Holder.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
Holder.BorderSizePixel = 0
Holder.BorderColor3 = Color3.new(0,0,0)
Holder.ZIndex = 52
--
Frame.Size = UDim2.new(0,5,1,0)
Frame.BackgroundColor3 = Color3.new(0.0588235, 0.0588235, 0.0588235)
Frame.BorderSizePixel = 0
Frame.BorderColor3 = Color3.new(0,0,0)
--
Tabs.Name = "Tabs"
Tabs.Position = UDim2.new(0,5,0,10)
Tabs.Size = UDim2.new(0,140,1,-20)
Tabs.BackgroundColor3 = Color3.new(1,1,1)
Tabs.BackgroundTransparency = 1.01
Tabs.BorderSizePixel = 0
Tabs.BorderColor3 = Color3.new(0,0,0)
--
UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIListLayout.Padding = UDim.new(0,4)
--
TextButton.Size = UDim2.new(1,0,0,20)
TextButton.BackgroundColor3 = Color3.new(1,1,1)
TextButton.BackgroundTransparency = 1
TextButton.BorderSizePixel = 0
TextButton.BorderColor3 = Color3.new(0,0,0)
TextButton.Text = ""
TextButton.TextColor3 = Color3.new(0,0,0)
TextButton.AutoButtonColor = false
TextButton.Font = Enum.Font.SourceSans
TextButton.TextSize = 14
TextButton.ZIndex = 100
local Line1 = Instance.new("Frame")
Line1.Name = "Line1"
Line1.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Line1.BorderColor3 = Color3.fromRGB(0, 0, 0)
Line1.BorderSizePixel = 0
Line1.Position = UDim2.fromOffset(0, 50)
Line1.Size = UDim2.new(1, 0, 0, 1)
Line1.Parent = Holder
local Line2 = Instance.new("Frame")
Line2.Name = "Line2"
Line2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
Line2.BorderColor3 = Color3.fromRGB(0, 0, 0)
Line2.BorderSizePixel = 0
Line2.Size = UDim2.new(0, 1, 1, 0)
Line2.Parent = Holder
local Logo = Instance.new("ImageLabel")
Logo.Name = "Logo"
Logo.Image = "http://www.roblox.com/asset/?id=17669613413"
Logo.ScaleType = Enum.ScaleType.Fit
Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
Logo.BackgroundTransparency = 1
Logo.BorderColor3 = Color3.fromRGB(0, 0, 0)
Logo.BorderSizePixel = 0
Logo.Position = UDim2.fromOffset(10, -20)
Logo.Size = UDim2.fromOffset(90, 90)
Logo.Parent = Holder
local FadeThing = Instance.new("Frame")
FadeThing.Name = "FadeThing"
FadeThing.BackgroundColor3 = Color3.fromRGB(15, 15, 15)
FadeThing.BorderColor3 = Color3.fromRGB(0, 0, 0)
FadeThing.BorderSizePixel = 0
FadeThing.Position = UDim2.fromOffset(9, 59)
FadeThing.Size = UDim2.new(1, -18, 1, -63)
FadeThing.ZIndex = 55
FadeThing.Parent = Holder
FadeThing.Visible = false
-- // Elements
Window.Elements = {
TabHolder = Tabs,
Holder = Holder,
FadeThing = FadeThing
}
-- // Dragging
Library:Connection(TextButton.MouseButton1Down, function()
local Location = game:GetService("UserInputService"):GetMouseLocation()
Window.Dragging[1] = true
Window.Dragging[2] =
UDim2.new(0, Location.X - Outline.AbsolutePosition.X, 0, Location.Y - Outline.AbsolutePosition.Y)
end)
Library:Connection(game:GetService("UserInputService").InputEnded, function(Input, IsTyping)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Window.Dragging[1] = false
Window.Dragging[2] = UDim2.new(0, 0, 0, 0)
end
end)
Library:Connection(game:GetService("UserInputService").InputChanged, function(Input)
local Location = game:GetService("UserInputService"):GetMouseLocation()
local ActualLocation = nil
-- Dragging
if Window.Dragging[1] then
game:GetService("TweenService"):Create(Outline, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0,Location.X - Window.Dragging[2].X.Offset + (Outline.Size.X.Offset * Outline.AnchorPoint.X),0,Location.Y - Window.Dragging[2].Y.Offset + (Outline.Size.Y.Offset * Outline.AnchorPoint.Y))}):Play()
end
end)
-- // Functions
function Window:UpdateTabs()
for Index, Page in pairs(Window.Pages) do
Page:Turn(Page.Open)
end
end
Library:Connection(game:GetService("UserInputService").InputBegan, function(Inp)
if Inp.KeyCode == Library.UIKey then
Library:SetOpen(not Library.Open)
end
end)
game:GetService("TweenService"):Create(Library.Holder, TweenInfo.new(0.25, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Window.Size.X.Offset,0,Window.Size.Y.Offset)}):Play()
-- // Returns
Library.Holder = Outline
return setmetatable(Window, Library)
end
--
function Library:Seperator(Properties)
if not Properties then
Properties = {}
end
--
local Page = {
Name = Properties.Name or "Page",
Window = self,
Elements = {},
}
--
local TextSep = Instance.new('Frame', Page.Window.Elements.TabHolder)
local TextLabel = Instance.new('TextLabel', TextSep)
--
TextSep.Name = "TextSep"
TextSep.Size = UDim2.new(1,0,0,20)
TextSep.BackgroundColor3 = Color3.new(1,1,1)
TextSep.BackgroundTransparency = 1
TextSep.BorderSizePixel = 0
TextSep.BorderColor3 = Color3.new(0,0,0)
--
TextLabel.Position = UDim2.new(0,8,0,0)
TextLabel.Size = UDim2.new(1,-10,1,0)
TextLabel.BackgroundColor3 = Color3.new(1,1,1)
TextLabel.BackgroundTransparency = 1
TextLabel.BorderSizePixel = 0
TextLabel.BorderColor3 = Color3.new(0,0,0)
TextLabel.Text = Page.Name
TextLabel.TextColor3 = Color3.new(0.7059,0.7059,0.7059)
TextLabel.Font = Enum.Font.Gotham
TextLabel.TextSize = Library.FontSize
TextLabel.TextXAlignment = Enum.TextXAlignment.Left
end
--
function Library:Page(Properties)
if not Properties then
Properties = {}
end
--
local Page = {
Name = Properties.Name or "Page",
Icon = Properties.Icon or "http://www.roblox.com/asset/?id=6022668955",
Window = self,
Open = false,
Sections = {},
Elements = {},
}
--
local TabButton = Instance.new('TextButton', Page.Window.Elements.TabHolder)
local UICorner_3 = Instance.new('UICorner', TabButton)
local Accent = Instance.new('Frame', TabButton)
local UICorner = Instance.new('UICorner', Accent)
local Title = Instance.new('TextLabel', TabButton)
local Icon = Instance.new('ImageLabel', TabButton)
local NewPage = Instance.new('Frame', Page.Window.Elements.Holder)
local Left = Instance.new('Frame', NewPage)
local LeftLayout = Instance.new('UIListLayout', Left)
local Right = Instance.new('Frame', NewPage)
local RightLayout = Instance.new('UIListLayout', Right)
--
TabButton.Name = "TabButton"
TabButton.Size = UDim2.new(1,0,0,30)
TabButton.BackgroundColor3 = Color3.new(0.0784,0.0784,0.0784)
TabButton.BorderSizePixel = 0
TabButton.BackgroundTransparency = 1
TabButton.BorderColor3 = Color3.new(0,0,0)
TabButton.Text = ""
TabButton.TextColor3 = Color3.new(0,0,0)
TabButton.AutoButtonColor = false
TabButton.Font = Enum.Font.SourceSans
TabButton.TextSize = 14
TabButton.ClipsDescendants = true
--
Accent.Name = "Accent"
Accent.Position = UDim2.new(0,-8,0,5)
Accent.Size = UDim2.new(0,10,1,-10)
Accent.BackgroundColor3 = Library.Accent
Accent.BorderSizePixel = 0
Accent.BorderColor3 = Color3.new(0,0,0)
Accent.BackgroundTransparency = 0
table.insert(Library.ThemeObjects, Accent)
--
Title.Name = "Title"
Title.Position = UDim2.new(0,35,0,0)
Title.Size = UDim2.new(1,-10,1,0)
Title.BackgroundColor3 = Color3.new(1,1,1)
Title.BackgroundTransparency = 1
Title.BorderSizePixel = 0
Title.BorderColor3 = Color3.new(0,0,0)
Title.Text = Page.Name
Title.TextColor3 = Color3.fromRGB(120,120,120)
Title.Font = Enum.Font.Gotham
Title.TextSize = Library.FontSize
Title.TextXAlignment = Enum.TextXAlignment.Left