-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathKinetic
2083 lines (1653 loc) · 110 KB
/
Kinetic
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
--[[ KINETIC UI
Author : Blissful#4492
Finish Date : 26/2/22
Documentation : https://blissful.gitbook.io/kinetic/
GitRepo : https://github.com/Blissful4992/Kinetic
]]--
--
local CLAMP = math.clamp
local ROUND = math.round
local HUGE = math.huge
local RANDOM = math.random
local FLOOR = math.floor
local FMOD = math.fmod
local SEED = math.randomseed
local MAX = math.max
local MIN = math.min
--
local FIND = string.find
local SUB = string.sub
local CHAR = string.char
local LEN = string.len
local WAIT = task.wait
--
local RGB = Color3.fromRGB
local HSV = Color3.fromHSV
--
local V2 = Vector2.new
local U2 = UDim2.new
local U1 = UDim.new
local CF = CFrame.new
--
local WRAP = coroutine.wrap
local NEW = Instance.new
local TBINSERT = table.insert
--
local COLOR_SEQUENCE = ColorSequence.new
local COLOR_KEYPOINT = ColorSequenceKeypoint.new
--
local TIME = os.time
local TWEEN = TweenInfo.new
--
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
--
local UIS = game:GetService("UserInputService")
local RS = game:GetService("RunService")
local RStepped = RS.RenderStepped
local TS = game:GetService("TweenService")
--
local charset = {}
for i = 48, 57 do TBINSERT(charset, CHAR(i)) end
for i = 65, 90 do TBINSERT(charset, CHAR(i)) end
for i = 97, 122 do TBINSERT(charset, CHAR(i)) end
local function random_string(length)
SEED(TIME())
if length > 0 then
return random_string(length - 1) .. charset[RANDOM(1, #charset)]
else
return ""
end
end
--
local Library = {}
local DESTROY_UI = false
--
local UI_Inset = game:GetService("GuiService"):GetGuiInset()
local MUTEX = false -- Mutual Exclusion VARIABLE
-- Cached Enums
local UIT = Enum.UserInputType
local MB1 = UIT.MouseButton1
local MB2 = UIT.MouseButton2
local KBD = UIT.Keyboard
local BSP = Enum.KeyCode.Backspace
local DLT = Enum.KeyCode.Delete
local GTHM = Enum.Font.Gotham
local TXAL = Enum.TextXAlignment.Left
local SOLO = Enum.SortOrder.LayoutOrder
local EDO = Enum.EasingDirection.Out
local ESS = Enum.EasingStyle.Sine
--
local HorizontalSizeId = 'rbxassetid://8943647369'
local VerticalSizeId = 'rbxassetid://8943646025'
local ColorModule = {}
function ColorModule:rgbToHsv(r, g, b)
r, g, b = r / 255, g / 255, b / 255
local max, min = MAX(r, g, b), MIN(r, g, b)
local h, s, v
v = max
local d = max - min
if max == 0 then
s = 0
else
s = d / max
end
if max == min then
h = 0
else
if max == r then
h = (g - b) / d
if g < b then
h = h + 6
end
elseif max == g then
h = (b - r) / d + 2
elseif max == b then
h = (r - g) / d + 4
end
h = h / 6
end
return h, s, v
end
function ColorModule:hsvToRgb(h, s, v)
local r, g, b
local i = FLOOR(h * 6);
local f = h * 6 - i;
local p = v * (1 - s);
local q = v * (1 - f * s);
local t = v * (1 - (1 - f) * s);
i = i % 6
if i == 0 then
r, g, b = v, t, p
elseif i == 1 then
r, g, b = q, v, p
elseif i == 2 then
r, g, b = p, v, t
elseif i == 3 then
r, g, b = p, q, v
elseif i == 4 then
r, g, b = t, p, v
elseif i == 5 then
r, g, b = v, p, q
end
return r * 255, g * 255, b * 255
end
function ColorModule:darkenColor(r, g, b, p)
local h, s, v = ColorModule:rgbToHsv(r, g, b)
v = p
local nr, ng, nb = ColorModule:hsvToRgb(h, s, v)
return RGB(nr, ng, nb)
end
local function MouseIn(obj)
if (Mouse.X < obj.AbsolutePosition.X or Mouse.X > obj.AbsolutePosition.X + obj.AbsoluteSize.X) or (Mouse.Y < obj.AbsolutePosition.Y or Mouse.Y > obj.AbsolutePosition.Y + obj.AbsoluteSize.Y) then
return false
end
return true
end
local function rgbToHex(rgb)
rgb = {rgb.R*255, rgb.G*255, rgb.B*255}
local hexadecimal = ''
for key, value in pairs(rgb) do
local hex = ''
while(value > 0)do
local index = FMOD(value, 16) + 1
value = FLOOR(value / 16)
hex = SUB('0123456789ABCDEF', index, index) .. hex
end
if(LEN(hex) == 0)then
hex = '00'
elseif(LEN(hex) == 1)then
hex = '0' .. hex
end
hexadecimal = hexadecimal .. hex
end
return "#"..hexadecimal
end
local function hexToRGB(hex)
hex = hex:gsub("#","")
return RGB(tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)))
end
local function Protect_GUI(UI)
if syn then
print("Synapse X")
syn.protect_gui(UI)
UI.Parent=game:GetService("CoreGui")
elseif getexecutorname and getexecutorname() == "ScriptWare" then
print("Script-Ware")
UI.Parent=gethui()
elseif KRNL_LOADED then
print("KRNL")
UI.Parent=gethui()
else
print("Other Exec")
UI.Parent=game:GetService("CoreGui")
end
end
--
local WinTheme = {
Background = RGB(30, 30, 30),
Dark_Borders = RGB(25, 25, 25),
Light_Borders = RGB(255, 255, 255),
Text_Color = RGB(255, 255, 255),
Text_Size_Big = 14,
Text_Size_Medium = 12,
Text_Size_Small = 10,
Section_Background = RGB(25, 25, 25),
Accent = RGB(0, 255, 0),
Dark_Accent = RGB(0, 100, 0)
}
--
Library.NewWindow = function(window_info)
window_info.CloseCallback = window_info.CloseCallback or function()end
window_info.WindowSizeCallback = window_info.WindowSizeCallback or function(x,y)end
window_info.WindowSize = window_info.WindowSize or V2(557, 500)
window_info.WindowPositionCallback = window_info.WindowPositionCallback or function(x,y)end
window_info.WindowPosition = window_info.WindowPosition or V2(500, 300)
window_info.ThemeOverrides = window_info.ThemeOverrides or {}
window_info.Scalable = (window_info.Scalable == nil and true) or window_info.Scalable
--
for i, v in pairs(window_info.ThemeOverrides) do
if WinTheme[i] and WinTheme[i] ~= v then
WinTheme[i] = v
end
end
--
local UI = NEW("ScreenGui")
local Window = NEW("Frame")
local Top_Bar = NEW("Frame")
local Title = NEW("TextLabel")
local Close = NEW("ImageButton")
local Close_Left = NEW("Frame")
local Close_Right = NEW("Frame")
local Minimize = NEW("ImageButton")
local Minimize_Left = NEW("Frame")
local Minimize_Right = NEW("Frame")
local Minimize_Top= NEW("Frame")
local Minimize_Bottom = NEW("Frame")
local Page_Selector = NEW("ScrollingFrame")
local Page_List_Layout = NEW("UIListLayout")
local Main = NEW("Frame")
local Manager = NEW("Frame")
local Manager_Border = NEW("Frame")
local Feature_Info = NEW("TextLabel")
local Pages = NEW("Frame")
local Picker_Windows = NEW("Frame")
UI.Name="UI"
Protect_GUI(UI)
UI.ZIndexBehavior = Enum.ZIndexBehavior.Global
UI.ResetOnSpawn=false;Window.Name="Window"Window.Parent=UI;Window.BackgroundColor3=RGB(255,255,255)Window.BackgroundTransparency=1.000;Window.Position=U2(0, window_info.WindowPosition.X, 0, window_info.WindowPosition.Y)Window.Size=U2(0,window_info.WindowSize.X,0,window_info.WindowSize.Y)Top_Bar.Name="Top_Bar"Top_Bar.Parent=Window;Top_Bar.Active=true;Top_Bar.BackgroundColor3=RGB(40,40,40)Top_Bar.BackgroundColor3=WinTheme.Background;Top_Bar.BorderColor3=WinTheme.Dark_Borders;Top_Bar.BorderSizePixel=2;Top_Bar.Size=U2(1,0,0,20)Top_Bar.ZIndex=10001;Title.Name="Title"Title.Parent=Top_Bar;Title.BackgroundColor3=RGB(255,255,255)Title.BackgroundTransparency=1.000;Title.Position=U2(0.5,0,0,0)Title.Size=U2(0,1,1,0)Title.ZIndex=10002;Title.Font=GTHM;Title.Text=window_info.Text or"Test Title"Title.TextColor3=WinTheme.Text_Color;Title.TextSize=WinTheme.Text_Size_Medium;Close.Name="Close"Close.Parent=Top_Bar;Close.BackgroundTransparency=1;Close.BackgroundColor3=WinTheme.Background;Close.BorderColor3=WinTheme.Accent;Close.BorderSizePixel=1;Close.Position=U2(1,-20,0,0)Close.Size=U2(0,20,0,20)Close.ZIndex=10005;Close.AutoButtonColor=false;Close.Image="rbxassetid://7246920077"Close_Left.Name="Close_Left"Close_Left.Parent=Close;Close_Left.BackgroundColor3=WinTheme.Background;Close_Left.BorderSizePixel=0;Close_Left.Size=U2(0,6,1,0)Close_Left.ZIndex=10006;Close_Right.Name="Close_Right"Close_Right.Parent=Close;Close_Right.BackgroundColor3=WinTheme.Background;Close_Right.BorderSizePixel=0;Close_Right.Position=U2(1,-6,0,0)Close_Right.Size=U2(0,6,1,0)Close_Right.ZIndex=10006;Minimize.Name="Minimize"Minimize.Parent=Top_Bar;Minimize.BackgroundTransparency=1;Minimize.BackgroundColor3=WinTheme.Background;Minimize.BorderColor3=WinTheme.Accent;Minimize.BorderSizePixel=1;Minimize.Position=U2(1,-41,0,0)Minimize.Size=U2(0,20,0,20)Minimize.ZIndex=10005;Minimize.AutoButtonColor=false;Minimize.Image="rbxassetid://7247993381"Minimize_Left.Name="Minimize_Left"Minimize_Left.Parent=Minimize;Minimize_Left.BackgroundColor3=WinTheme.Background;Minimize_Left.BorderSizePixel=0;Minimize_Left.Size=U2(0,6,1,0)Minimize_Left.ZIndex=10006;Minimize_Right.Name="Minimize_Right"Minimize_Right.Parent=Minimize;Minimize_Right.BackgroundColor3=WinTheme.Background;Minimize_Right.BorderSizePixel=0;Minimize_Right.Position=U2(1,-6,0,0)Minimize_Right.Size=U2(0,6,1,0)Minimize_Right.ZIndex=10006;Minimize_Top.Name="Minimize_Top"Minimize_Top.Parent=Minimize;Minimize_Top.BackgroundColor3=WinTheme.Background;Minimize_Top.BorderSizePixel=0;Minimize_Top.Size=U2(1,0,0,6)Minimize_Top.ZIndex=10006;Minimize_Bottom.Name="Minimize_Bottom"Minimize_Bottom.Parent=Minimize;Minimize_Bottom.BackgroundColor3=WinTheme.Background;Minimize_Bottom.BorderSizePixel=0;Minimize_Bottom.Position=U2(0,0,1,-6)Minimize_Bottom.Size=U2(1,0,0,6)Minimize_Bottom.ZIndex=10006;Page_Selector.Name="Page_Selector"Page_Selector.Parent=Window;Page_Selector.Active=true;Page_Selector.BackgroundColor3=WinTheme.Background;Page_Selector.BorderColor3=WinTheme.Dark_Borders;Page_Selector.BorderSizePixel=2;Page_Selector.Position=U2(0,0,0,22)Page_Selector.Size=U2(1,0,0,32)Page_Selector.ZIndex=10000;Page_Selector.CanvasSize=U2(0,0,0,0)Page_Selector.AutomaticCanvasSize=Enum.AutomaticSize.X;Page_Selector.ScrollBarThickness=0;Page_List_Layout.Name="Page_List_Layout"Page_List_Layout.Parent=Page_Selector;Page_List_Layout.Padding=U1(0,0)Page_List_Layout.FillDirection=Enum.FillDirection.Horizontal;Page_List_Layout.HorizontalAlignment=Enum.HorizontalAlignment.Center;Page_List_Layout.SortOrder=SOLO;Main.Name="Main"Main.Parent=Window;Main.BackgroundColor3=WinTheme.Background;Main.BorderColor3=WinTheme.Dark_Borders;Main.BorderSizePixel=2;Main.Position=U2(0,0,0,55)Main.Size=U2(1,0,1,-55)Manager.Name="Manager"Manager.Parent=Main;Manager.BackgroundColor3=RGB(255,255,255)Manager.BackgroundTransparency=1.000;Manager.Position=U2(0,0,1,-60)Manager.Size=U2(1,0,0,60)Manager_Border.Name="Manager_Border"Manager_Border.Parent=Manager;Manager_Border.BackgroundColor3=WinTheme.Dark_Borders;Manager_Border.BorderSizePixel=0;Manager_Border.Position=U2(0,9,0,-1)Manager_Border.Size=U2(1,-18,0,2)Picker_Windows.Name="Picker_Windows"Picker_Windows.Parent=UI;Picker_Windows.BackgroundColor3=RGB(255,255,255)Picker_Windows.BackgroundTransparency=1.000;Picker_Windows.Size=U2(1,0,1,0)Feature_Info.Name="Feature_Info"Feature_Info.Parent=Manager;Feature_Info.BackgroundColor3=WinTheme.Dark_Borders;Feature_Info.BorderColor3=WinTheme.Dark_Borders;Feature_Info.BorderSizePixel=4;Feature_Info.Position=U2(0,9,1,-25)Feature_Info.Size=U2(1,-18,0,16)Feature_Info.Font=GTHM;Feature_Info.Text="This will turn ESP on/off"Feature_Info.TextColor3=WinTheme.Text_Color;Feature_Info.TextSize=WinTheme.Text_Size_Medium;Feature_Info.TextTruncate=Enum.TextTruncate.AtEnd;Feature_Info.TextXAlignment=TXAL
Pages.Name = "Pages"Pages.Parent = Main;Pages.BackgroundColor3 = RGB(255, 255, 255);Pages.BackgroundTransparency = 1.000;Pages.Size = U2(1, 0, 1, -60)
local root = {}
function root.InfoMessage(text)
RStepped:Wait()
Feature_Info.Text = text
end
function root.ResetMessage()
root.InfoMessage("")
end
local prompt_Active = false
local UI_Toggled = true
function root.Toggle(state)
if not prompt_Active then
UI_Toggled = state or not UI_Toggled
Window.Visible = state or UI_Toggled
Picker_Windows.Visible = state or UI_Toggled
end
end
function root.Destroy()
DESTROY_UI = true
UI:Destroy()
end
local Custom_Cursor = {}
do -- CURSOR
local Cursor = NEW("ImageLabel")
Cursor = NEW("ImageLabel")
Cursor.Name = "Cursor"
Cursor.Parent = UI
Cursor.Size = U2(0, 64, 0, 64)
Cursor.ZIndex = 1000001
Cursor.Visible = false
Cursor.BackgroundTransparency = 1
--
local Cursor_Lock = function()
if DESTROY_UI then
RS:UnbindFromRenderStep("CursorLock")
else
Cursor.Position = U2(0, Mouse.X-Cursor.AbsoluteSize.X/2, 0, Mouse.Y-Cursor.AbsoluteSize.Y/2)
end
end
function Custom_Cursor.Show_Custom_Cursor(CursorId)
UIS.MouseIconEnabled = false
Cursor.Image = CursorId
Cursor.Visible = true
RS:BindToRenderStep("CursorLock", 1, Cursor_Lock)
end
function Custom_Cursor.Hide_Custom_Cursor()
UIS.MouseIconEnabled = true
Cursor.Visible = false
RS:UnbindFromRenderStep("CursorLock")
end
end
local Minimized = false
do -- MINIMIZE
local function Minimize_UI()
Minimized = not Minimized
Page_Selector.Visible = not Minimized
Main.Visible = not Minimized
if Main.Visible then
Minimize.Image = "rbxassetid://7247993381"
else
Minimize.Image = "rbxassetid://7275743788"
end
end
Minimize.MouseButton1Click:Connect(Minimize_UI)
Minimize.MouseEnter:Connect(function()
Minimize.ZIndex = 10006
Minimize.BackgroundTransparency = 0
Minimize.ImageColor3 = WinTheme.Accent;
root.InfoMessage("Minimizes the Window")
end)
Minimize.MouseLeave:Connect(function()
root.ResetMessage()
Minimize.ZIndex = 10005
Minimize.BackgroundTransparency = 1
Minimize.ImageColor3 = RGB(255, 255, 255)
end)
root.Minimize = Minimize_UI
end
do -- CLOSE
Close.MouseButton1Click:Connect(function()
window_info.CloseCallback()
root.Destroy()
end)
Close.MouseEnter:Connect(function()
Close.ZIndex = 10006
Close.BackgroundTransparency = 0
Close.ImageColor3 = WinTheme.Accent;
root.InfoMessage("Kills the Window")
end)
Close.MouseLeave:Connect(function()
root.ResetMessage()
Close.ZIndex = 10005
Close.BackgroundTransparency = 1
Close.ImageColor3 = RGB(255, 255, 255)
end)
end
do -- WINDOW DRAGGING
local Dragging_UI
local Previous_Offset
local dragTween = false;
local drag; drag = UIS.InputChanged:Connect(function(input)
if DESTROY_UI then
drag:Disconnect()
elseif Dragging_UI and input.UserInputType == UIT.MouseMovement then
if dragTween then dragTween:Cancel() end
dragTween = TS:Create(Window, TWEEN(0.04, ESS, EDO), {Position = U2(0, Mouse.X + Previous_Offset.X, 0, Mouse.Y + Previous_Offset.Y)})
dragTween:Play()
window_info.WindowPositionCallback(V2(Window.AbsolutePosition.X, Window.AbsolutePosition.Y))
end
end)
local inp; inp = UIS.InputBegan:Connect(function(input)
if DESTROY_UI then
inp:Disconnect()
elseif input.UserInputType == MB1 and MouseIn(Top_Bar) and not MouseIn(Close) and not MouseIn(Minimize) then
Previous_Offset = V2(Window.AbsolutePosition.X, Window.AbsolutePosition.Y) - V2(Mouse.X, Mouse.Y)
Dragging_UI = true
end
end)
local outp; outp = UIS.InputEnded:Connect(function(input)
if DESTROY_UI then
outp:Disconnect()
elseif input.UserInputType == MB1 then
Dragging_UI = false
end
end)
end
if (window_info.Scalable) then
do -- WINDOW SCALING
local ResizeX = NEW("TextButton")
local ResizeY = NEW("TextButton")
ResizeX.Name="ResizeX"ResizeX.Parent=Window;ResizeX.AutoButtonColor=false;ResizeX.BackgroundColor3=WinTheme.Dark_Accent;ResizeX.BackgroundTransparency=0;ResizeX.Position=U2(1,-2,0,27)ResizeX.BorderSizePixel=0;ResizeX.Size=U2(0,2,1,-32)ResizeX.ZIndex=100000;ResizeX.Font=GTHM;ResizeX.Text=""ResizeX.TextColor3=RGB(0,0,0)ResizeX.TextSize=WinTheme.Text_Size_Medium;ResizeX.Visible=true;ResizeY.Name="ResizeY"ResizeY.Parent=Window;ResizeY.AutoButtonColor=false;ResizeY.BackgroundColor3=WinTheme.Dark_Accent;ResizeY.BorderSizePixel=0;ResizeY.BackgroundTransparency=0;ResizeY.Position=U2(0,5,1,-2)ResizeY.Size=U2(1,-10,0,2)ResizeY.ZIndex=100000;ResizeY.Font=GTHM;ResizeY.Text=""ResizeY.TextColor3=RGB(0,0,0)ResizeY.TextSize=WinTheme.Text_Size_Big;ResizeY.Visible=true
local Mouse_Scaling_X = false
local Mouse_Scaling_Y = false
ResizeX.MouseEnter:Connect(function()
ResizeX.BackgroundColor3 = WinTheme.Accent;
Custom_Cursor.Show_Custom_Cursor(HorizontalSizeId)
root.InfoMessage("Scales the Window (Horizontal)")
end)
ResizeX.MouseLeave:Connect(function()
if not Mouse_Scaling_X then
ResizeX.BackgroundColor3 = WinTheme.Dark_Accent
Custom_Cursor.Hide_Custom_Cursor()
root.ResetMessage()
end
end)
ResizeY.MouseEnter:Connect(function()
ResizeY.BackgroundColor3 = WinTheme.Accent;
Custom_Cursor.Show_Custom_Cursor(VerticalSizeId)
root.InfoMessage("Scales the Window (Vertical)")
end)
ResizeY.MouseLeave:Connect(function()
if not Mouse_Scaling_Y then
ResizeY.BackgroundColor3 = WinTheme.Dark_Accent
Custom_Cursor.Hide_Custom_Cursor()
root.ResetMessage()
end
end)
ResizeX.MouseButton1Down:Connect(function()
if not Mouse_Scaling_Y then
Mouse_Scaling_X = true
end
end)
ResizeY.MouseButton1Down:Connect(function()
if not Mouse_Scaling_X then
Mouse_Scaling_Y = true
end
end)
local Mouse_Connection; Mouse_Connection = UIS.InputEnded:Connect(function(input)
if DESTROY_UI then
Mouse_Connection:Disconnect()
elseif input.UserInputType == MB1 then
if (Mouse_Scaling_X or Mouse_Scaling_Y) and not MouseIn(ResizeX) and not MouseIn(ResizeY) then
root.ResetMessage()
end
if MouseIn(ResizeX) then
ResizeX.BackgroundColor3 = WinTheme.Accent;
root.InfoMessage("Scales the Window (Horizontal)")
else
Custom_Cursor.Hide_Custom_Cursor()
ResizeX.BackgroundColor3 = WinTheme.Dark_Accent
root.ResetMessage()
end
if MouseIn(ResizeY) then
ResizeY.BackgroundColor3 = WinTheme.Accent;
root.InfoMessage("Scales the Window (Vertical)")
else
Custom_Cursor.Hide_Custom_Cursor()
ResizeY.BackgroundColor3 = WinTheme.Dark_Accent
root.ResetMessage()
end
Mouse_Scaling_X = false
Mouse_Scaling_Y = false
end
end)
local scalingBind = "CScaling"..random_string(10)
local Scaling_Connection = function()
if DESTROY_UI then
RS:UnbindFromRenderStep(scalingBind)
elseif UI_Toggled and Minimized == false and Mouse_Scaling_Y then
local offset_mouse = Mouse.Y - Window.AbsolutePosition.Y
TS:Create(Window, TWEEN(0.05, ESS, EDO), {Size = U2(0, Window.AbsoluteSize.X, 0, CLAMP(offset_mouse, 300, HUGE))}):Play()
window_info.WindowSizeCallback(V2(Window.AbsoluteSize.X, Window.AbsoluteSize.Y))
elseif UI_Toggled and Minimized == false and Mouse_Scaling_X then
local offset_mouse = Mouse.X - Window.AbsolutePosition.X
TS:Create(Window, TWEEN(0.05, ESS, EDO), {Size = U2(0, CLAMP(offset_mouse, 144, HUGE), 0, Window.AbsoluteSize.Y)}):Play()
window_info.WindowSizeCallback(V2(Window.AbsoluteSize.X, Window.AbsoluteSize.Y))
else
if UI_Toggled == false or Minimized then
ResizeY.Visible = false
ResizeX.Visible = false
WRAP(function()
repeat WAIT() until UI_Toggled and Minimized == false
RS:BindToRenderStep(scalingBind, 1, Scaling_Connection)
end)()
RS:UnbindFromRenderStep(scalingBind)
else
ResizeY.Visible = true
ResizeX.Visible = true
end
end
end
RS:BindToRenderStep(scalingBind, 1, Scaling_Connection)
end
end
do -- SAVE BUTTON
if window_info.SaveCallback ~= nil and type(window_info.SaveCallback) == "function" then
local Save_Button = NEW("TextButton")
Save_Button.Name="Save_Button"Save_Button.Parent=Manager;Save_Button.BackgroundColor3=WinTheme.Dark_Borders;Save_Button.BorderColor3=WinTheme.Light_Borders;Save_Button.Position=U2(1,-56,0,7)Save_Button.Size=U2(0,50,0,18)Save_Button.AutoButtonColor=false;Save_Button.Font=GTHM;Save_Button.Text="Save"Save_Button.TextColor3=WinTheme.Text_Color;Save_Button.TextSize=WinTheme.Text_Size_Medium;Save_Button.TextWrapped=true
Save_Button.MouseButton1Click:Connect(function()
window_info.SaveCallback()
end)
Save_Button.MouseEnter:Connect(function()
Save_Button.BorderColor3 = WinTheme.Accent;
Save_Button.TextColor3 = WinTheme.Accent;
root.InfoMessage("Saves Global Settings")
end)
Save_Button.MouseLeave:Connect(function()
root.ResetMessage()
Save_Button.BorderColor3 = WinTheme.Light_Borders;
Save_Button.TextColor3 = WinTheme.Text_Color;
end)
end
end
do -- PROMPTS
local Prompt = NEW("Folder")
local Prompt_Blur = NEW("Frame")
local Prompt_Window = NEW("Frame")
local Prompt_Top_Bar = NEW("Frame")
local Prompt_Title = NEW("TextLabel")
local Prompt_Main = NEW("Frame")
local Prompt_Body = NEW("TextLabel")
local Prompt_Countdown = NEW("TextLabel")
local Accept_Button = NEW("TextButton")
local Prompt_Border = NEW("Frame")
local Reject_Button = NEW("TextButton")
Prompt.Name="Prompt"Prompt.Parent=UI;Prompt_Blur.Name="Prompt_Blur"Prompt_Blur.Parent=Prompt;Prompt_Blur.BackgroundColor3=RGB(100,100,100)Prompt_Blur.BackgroundTransparency=0.8;Prompt_Blur.Size=U2(1,0,1,UI_Inset.Y)Prompt_Blur.Position=U2(0,0,0,-UI_Inset.Y)Prompt_Blur.BorderSizePixel=0;Prompt_Blur.ZIndex=1000000;Prompt_Blur.Visible=false;Prompt_Window.Name="Prompt_Window"Prompt_Window.Parent=Prompt;Prompt_Window.BackgroundColor3=RGB(255,255,255)Prompt_Window.BackgroundTransparency=1.000;Prompt_Window.BorderColor3=RGB(27,42,53)Prompt_Window.Position=U2(0.5,-180,0.5,-80)Prompt_Window.Size=U2(0,360,0,162)Prompt_Window.ZIndex=1000000;Prompt_Window.Visible=false;Prompt_Top_Bar.Name="Prompt_Top_Bar"Prompt_Top_Bar.Parent=Prompt_Window;Prompt_Top_Bar.BackgroundColor3=WinTheme.Background;Prompt_Top_Bar.BorderColor3=WinTheme.Dark_Borders;Prompt_Top_Bar.BorderSizePixel=2;Prompt_Top_Bar.Size=U2(1,0,0,20)Prompt_Top_Bar.ZIndex=1000001;Prompt_Title.Name="Prompt_Title"Prompt_Title.Parent=Prompt_Top_Bar;Prompt_Title.BackgroundColor3=RGB(255,255,255)Prompt_Title.BackgroundTransparency=1.000;Prompt_Title.Position=U2(0,5,0,0)Prompt_Title.Size=U2(0,1,1,0)Prompt_Title.ZIndex=1000002;Prompt_Title.Font=GTHM;Prompt_Title.Text="Prompt"Prompt_Title.TextColor3=WinTheme.Text_Color;Prompt_Title.TextSize=WinTheme.Text_Size_Medium;Prompt_Title.TextXAlignment=TXAL;Prompt_Main.Name="Prompt_Main"Prompt_Main.Parent=Prompt_Window;Prompt_Main.BackgroundColor3=WinTheme.Background;Prompt_Main.BorderColor3=WinTheme.Dark_Borders;Prompt_Main.BorderSizePixel=2;Prompt_Main.Position=U2(0,0,0,22)Prompt_Main.Size=U2(1,0,1,-22)Prompt_Main.ZIndex=1000001;Prompt_Body.Name="Prompt_Body"Prompt_Body.Parent=Prompt_Main;Prompt_Body.BackgroundColor3=WinTheme.Background;Prompt_Body.BorderSizePixel=0;Prompt_Body.Position=U2(0,5,0,10)Prompt_Body.Size=U2(1,-10,1,-44)Prompt_Body.ZIndex=1000002;Prompt_Body.Font=GTHM;Prompt_Body.RichText=true;Prompt_Body.Text=""Prompt_Body.TextColor3=WinTheme.Text_Color;Prompt_Body.TextSize=WinTheme.Text_Size_Medium;Prompt_Body.TextWrapped=true;Prompt_Body.TextXAlignment=TXAL;Prompt_Body.TextYAlignment=Enum.TextYAlignment.Top;Prompt_Countdown.Name="Prompt_Countdown"Prompt_Countdown.Parent=Prompt_Main;Prompt_Countdown.BackgroundColor3=RGB(255,255,255)Prompt_Countdown.BackgroundTransparency=1.000;Prompt_Countdown.Position=U2(0,5,1,-24)Prompt_Countdown.Size=U2(0,1,0,18)Prompt_Countdown.ZIndex=1000002;Prompt_Countdown.Font=GTHM;Prompt_Countdown.Text="Time Remaining:"Prompt_Countdown.TextColor3=WinTheme.Text_Color;Prompt_Countdown.TextSize=WinTheme.Text_Size_Medium;Prompt_Countdown.TextXAlignment=TXAL;Accept_Button.Name="Accept_Button"Accept_Button.Parent=Prompt_Main;Accept_Button.BackgroundColor3=WinTheme.Dark_Borders;Accept_Button.BorderColor3=WinTheme.Light_Borders;Accept_Button.Position=U2(1,-72,1,-24)Accept_Button.Size=U2(0,30,0,18)Accept_Button.ZIndex=1000002;Accept_Button.AutoButtonColor=false;Accept_Button.Font=GTHM;Accept_Button.Text="Yes"Accept_Button.TextColor3=WinTheme.Text_Color;Accept_Button.TextSize=WinTheme.Text_Size_Medium;Accept_Button.TextWrapped=true;Prompt_Border.Name="Prompt_Border"Prompt_Border.Parent=Prompt_Main;Prompt_Border.BackgroundColor3=WinTheme.Dark_Borders;Prompt_Border.BorderSizePixel=0;Prompt_Border.Position=U2(0,5,1,-30)Prompt_Border.Size=U2(1,-10,0,1)Prompt_Border.ZIndex=1000002;Reject_Button.Name="Reject_Button"Reject_Button.Parent=Prompt_Main;Reject_Button.BackgroundColor3=WinTheme.Dark_Borders;Reject_Button.BorderColor3=WinTheme.Light_Borders;Reject_Button.Position=U2(1,-36,1,-24)Reject_Button.Size=U2(0,30,0,18)Reject_Button.ZIndex=1000002;Reject_Button.AutoButtonColor=false;Reject_Button.Font=GTHM;Reject_Button.Text="No"Reject_Button.TextColor3=WinTheme.Text_Color;Reject_Button.TextSize=WinTheme.Text_Size_Medium;Reject_Button.TextWrapped=true
local prompt_Accept_Callback = function()end
local prompt_Reject_Callback = function()end
Accept_Button.MouseButton1Click:Connect(function()
Prompt_Blur.Visible = false
Prompt_Window.Visible = false
prompt_Active = false
Window.Visible = true
prompt_Accept_Callback()
end)
Accept_Button.MouseEnter:Connect(function()
Accept_Button.BorderColor3 = WinTheme.Accent;
Accept_Button.TextColor3 = WinTheme.Accent;
end)
Accept_Button.MouseLeave:Connect(function()
Accept_Button.BorderColor3 = WinTheme.Light_Borders;
Accept_Button.TextColor3 = WinTheme.Text_Color;
end)
Reject_Button.MouseButton1Click:Connect(function()
Prompt_Blur.Visible = false
Prompt_Window.Visible = false
prompt_Active = false
Window.Visible = true
prompt_Reject_Callback()
end)
Reject_Button.MouseEnter:Connect(function()
Reject_Button.BorderColor3 = WinTheme.Accent;
Reject_Button.TextColor3 = WinTheme.Accent;
end)
Reject_Button.MouseLeave:Connect(function()
Reject_Button.BorderColor3 = WinTheme.Light_Borders;
Reject_Button.TextColor3 = WinTheme.Text_Color;
end)
function root.NewPrompt(prompt_info)
prompt_info.Name = prompt_info.Name or "Def Prompt"
prompt_info.Text = prompt_info.Text or "I am a prompt"
prompt_Active = true
Window.Visible = false
prompt_Accept_Callback = prompt_info.Accept or function()end
prompt_Reject_Callback = prompt_info.Reject or function()end
Prompt_Countdown.Text = ""
local Countdown = 0
if prompt_info.Countdown and tonumber(prompt_info.Countdown) then
Countdown = tonumber(prompt_info.Countdown)
Prompt_Countdown.Text = "Time Remaining: "..Countdown.." s"
spawn(function()
repeat
WAIT(1)
Countdown = Countdown - 1
Prompt_Countdown.Text = "Time Remaining: "..Countdown.." s"
until Countdown <= 0 or not prompt_Active
Prompt_Blur.Visible = false
Prompt_Window.Visible = false
prompt_Active = false
Window.Visible = true
prompt_Reject_Callback()
end)
end
Prompt_Body.Text = prompt_info.Text
Prompt_Title.Text = "Prompt: "..prompt_info.Name
Prompt_Blur.Visible = true
Prompt_Window.Visible = true
local prompt_funcs = {}
function prompt_funcs.GetName()
return prompt_info.Name
end
function prompt_funcs.GetText()
return prompt_info.Text
end
function prompt_funcs.GetTimeLeft()
return Countdown
end
function prompt_funcs.Destroy()
Prompt_Blur.Visible = false
Prompt_Window.Visible = false
prompt_Active = false
Window.Visible = true
prompt_Reject_Callback()
end
return prompt_funcs
end
end
do -- NOTIFICATIONS
local Notifications_Folder = NEW("Folder")
local Container = NEW("Frame")
local NotificationLayout = NEW("UIListLayout")
Notifications_Folder.Name="Notifications"Notifications_Folder.Parent=UI;Container.Name="Container"Container.Parent=Notifications_Folder;Container.BackgroundColor3=RGB(255,255,255)Container.BackgroundTransparency=1.000;Container.BorderSizePixel=0;Container.Position=U2(1,-210,0,-10)Container.Size=U2(0,200,1,0)Container.ZIndex=10000;NotificationLayout.Name="NotificationLayout"NotificationLayout.Parent=Container;NotificationLayout.SortOrder=Enum.SortOrder.LayoutOrder;NotificationLayout.VerticalAlignment=Enum.VerticalAlignment.Bottom;NotificationLayout.Padding=UDim.new(0,5)
function root.NewNotification(notification_info)
notification_info.Title = notification_info.Title or "Notification"
notification_info.Body = notification_info.Body or "This is a notification !"
notification_info.Time = notification_info.Time or 2 -- Seconds
local Notification = NEW("Frame")
local Notif_Title = NEW("TextLabel")
local Border = NEW("Frame")
local Body = NEW("TextLabel")
local Progress = NEW("Frame")
Notification.Name="Notification"Notification.Parent=Container;Notification.BackgroundColor3=WinTheme.Background;Notification.BorderColor3=WinTheme.Dark_Borders;Notification.ClipsDescendants=true;Notification.Size=U2(1,0,0,0)Notification.ZIndex=10001;Notif_Title.Name="Notif_Title"Notif_Title.Parent=Notification;Notif_Title.BackgroundTransparency=1.000;Notif_Title.Position=U2(0,5,0,0)Notif_Title.Size=U2(1,-5,0,20)Notif_Title.ZIndex=10002;Notif_Title.Font=Enum.Font.GothamSemibold;Notif_Title.Text=notification_info.Title;Notif_Title.TextColor3=WinTheme.Text_Color;Notif_Title.TextSize=12.000;Notif_Title.TextXAlignment=Enum.TextXAlignment.Left;Border.Name="Border"Border.Parent=Notification;Border.BackgroundColor3=WinTheme.Dark_Borders;Border.BorderSizePixel=0;Border.Position=U2(0,0,0,20)Border.Size=U2(1,0,0,1)Border.ZIndex=10002;Body.Name="Body"Body.Parent=Notification;Body.BackgroundColor3=RGB(255,255,255)Body.BackgroundTransparency=1.000;Body.Position=U2(0,5,0,25)Body.Size=U2(1,-10,1,-30)Body.ZIndex=10002;Body.Font=GTHM;Body.Text=notification_info.Body;Body.TextWrapped=true;Body.TextColor3=RGB(255,255,255)Body.TextSize=12.000;Body.TextXAlignment=Enum.TextXAlignment.Left;Body.TextYAlignment=Enum.TextYAlignment.Top;Progress.Name="Progress"Progress.Parent=Notification;Progress.BackgroundColor3=WinTheme.Accent;Progress.BorderSizePixel=0;Progress.Position=U2(0,0,1,-1)Progress.Size=U2(0,0,0,1)Progress.ZIndex=10002
--
WRAP(function()
-- FADE IN
do
local Fade = TS:Create(Notification, TWEEN(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = U2(1, 0, 0, 70)})
Fade:Play()
Fade.Completed:Wait()
end
-- PROGRESS BAR
do
local Progress_Tween = TS:Create(
Progress,
TWEEN(notification_info.Time, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut),
{Size = U2(1, 0, 0, 1)}
)
Progress_Tween:Play()
Progress_Tween.Completed:Wait()
end
-- FADE OUT
do
local Fade = TS:Create(Notification, TWEEN(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = U2(1, 0, 0, 0)})
Fade:Play()
Fade.Completed:Wait()
Notification:Destroy()
end
end)()
end
end
function root.NewPage(page_info)
local Page = NEW("ScrollingFrame")
local Page_Grid_Layout = NEW("UIGridLayout")
local Page_Option = NEW("TextButton")
local Page_Option_Right = NEW("Frame")
local Page_Option_Left = NEW("Frame")
Page.Name="Page"Page.Parent=Pages;Page.Active=true;Page.BackgroundColor3=RGB(255,255,255)Page.BackgroundTransparency=1.000;Page.BorderColor3=RGB(255,0,4)Page.BorderSizePixel=0;Page.Position=U2(0,5,0,10)Page.Size=U2(1,-10,1,-10)Page.Visible=false;Page.CanvasSize=U2(1,0,20,0)Page.ScrollBarImageColor3=WinTheme.Dark_Accent;Page.ScrollBarThickness=1;Page.ScrollingDirection=Enum.ScrollingDirection.Y;Page_Grid_Layout.Name="Page_Grid_Layout"Page_Grid_Layout.Parent=Page;Page_Grid_Layout.FillDirection=Enum.FillDirection.Horizontal;Page_Grid_Layout.SortOrder=SOLO;Page_Grid_Layout.HorizontalAlignment=Enum.HorizontalAlignment.Left;Page_Grid_Layout.CellPadding=U2(0,6,0,6)Page_Grid_Layout.CellSize=U2(0,0,0,0)Page_Option.Name="Page_Option"Page_Option.Parent=Page_Selector;Page_Option.BackgroundColor3=WinTheme.Accent;Page_Option.BackgroundTransparency=1;Page_Option.BorderSizePixel=0;Page_Option.ZIndex=10001;Page_Option.AutoButtonColor=false;Page_Option.Font=GTHM;Page_Option.Text=page_info.Text or"Page"Page_Option.TextColor3=WinTheme.Text_Color;Page_Option.TextSize=WinTheme.Text_Size_Big;Page_Option.Size=U2(0,Page_Option.TextBounds.X+40,1,0)Page_Option_Right.Name="Page_Option_Right"Page_Option_Right.Parent=Page_Option;Page_Option_Right.BackgroundColor3=WinTheme.Dark_Borders;Page_Option_Right.BorderSizePixel=0;Page_Option_Right.Position=U2(1,-1,0,4)Page_Option_Right.Size=U2(0,2,1,-8)Page_Option_Right.ZIndex=10002;Page_Option_Left.Name="Page_Option_Left"Page_Option_Left.Parent=Page_Option;Page_Option_Left.BackgroundColor3=WinTheme.Dark_Borders;Page_Option_Left.BorderSizePixel=0;Page_Option_Left.Position=U2(0,-1,0,4)Page_Option_Left.Size=U2(0,2,1,-8)Page_Option_Left.ZIndex=10002
do
Page_Option.MouseButton1Click:Connect(function()
local t_selector = Page_Selector:GetChildren()
for i = 1, #t_selector do
local v = t_selector[i]
if not v:IsA("UIListLayout") then
v.BackgroundTransparency = 1
end
end
local t_pages = Pages:GetChildren()
for i = 1, #t_pages do
t_pages[i].Visible = false
end
Page.Visible = true
Page_Option.BackgroundTransparency = 0.45
end)
Page_Option.MouseEnter:Connect(function()
Page_Option_Right.ZIndex = 10003
Page_Option_Left.ZIndex = 10003
Page_Option_Left.BackgroundColor3 = WinTheme.Accent;
Page_Option_Right.BackgroundColor3 = WinTheme.Accent;
Page_Option.TextColor3 = WinTheme.Accent;
root.InfoMessage(page_info.Description or "")
end)
Page_Option.MouseLeave:Connect(function()
root.ResetMessage()
Page_Option_Right.ZIndex = 10002
Page_Option_Left.ZIndex = 10002
Page_Option_Left.BackgroundColor3 = WinTheme.Dark_Borders
Page_Option_Right.BackgroundColor3 = WinTheme.Dark_Borders
Page_Option.TextColor3 = WinTheme.Text_Color;
end)
end
local page_funcs = {}
function page_funcs.NewSection(section_info)
local section_funcs = {}
local Section = NEW("Frame")
local Section_Size = NEW("UISizeConstraint")
local Section_Title = NEW("TextLabel")
local Item_Container = NEW("Frame")
local Section_Item_List = NEW("UIListLayout")
--Properties:
Section.Name="Section"Section.Parent=Page;Section.BackgroundColor3=WinTheme.Section_Background;Section.BackgroundTransparency=0;Section.BorderSizePixel=0;Section.BorderMode=Enum.BorderMode.Inset;Section.BorderColor3=WinTheme.Dark_Borders;Section.BorderSizePixel=1;Section.Size=U2(0,100,0,100)Section_Size.Name="Section_Size"Section_Size.Parent=Section;Section_Size.MinSize=V2(131,90)Section_Title.Name="Section_Title"Section_Title.Parent=Section;Section_Title.BackgroundColor3=RGB(255,255,255)Section_Title.BackgroundTransparency=1.000;Section_Title.Size=U2(1,0,0,24)Section_Title.Font=GTHM;Section_Title.Text=section_info.Text or"Section"Section_Title.TextColor3=WinTheme.Text_Color;Section_Title.TextSize=WinTheme.Text_Size_Medium;Item_Container.Name="Item_Container"Item_Container.Parent=Section;Item_Container.BackgroundColor3=RGB(255,255,255)Item_Container.BackgroundTransparency=1.000;Item_Container.Position=U2(0,0,0,24)Item_Container.Size=U2(1,0,1,-24)Section_Item_List.Name="Section_Item_List"Section_Item_List.Parent=Item_Container;Section_Item_List.SortOrder=SOLO;Section_Item_List.Padding=U1(0,8)
local function updateSectionSize()
local offsety = 0
local offsetx = 0
local t_container = Item_Container:GetChildren()
for i = 1, #t_container do
local v = t_container[i]
if not v:IsA("UIListLayout") then
offsety = offsety + v.AbsoluteSize.Y + 8
if v.AbsoluteSize.X > offsetx then
offsetx = v.AbsoluteSize.Y
end
end
end
Section_Size.MinSize = V2(160, Section_Title.AbsoluteSize.Y+offsety)
end
updateSectionSize()
function section_funcs.NewButton(info)
info.Callback = info.Callback or function()end
info.Text = info.Text or "Button"
info.Description = info.Description or ""
local Button = NEW("Frame")
local Button_Detector = NEW("TextButton")
Button.Name="Button"Button.Parent=Item_Container;Button.BackgroundColor3=RGB(255,255,255)Button.BackgroundTransparency=1.000;Button.BorderSizePixel=0;Button.Size=U2(1,-10,0,16)Button_Detector.Name="Button_Detector"Button_Detector.Parent=Button;Button_Detector.BackgroundColor3=RGB(0,0,0)Button_Detector.AutoButtonColor=false;Button_Detector.BorderColor3=WinTheme.Light_Borders;Button_Detector.Position=U2(0,5,0,0)Button_Detector.Size=U2(1,0,1,0)Button_Detector.Font=GTHM;Button_Detector.TextColor3=WinTheme.Text_Color;Button_Detector.Text=info.Text or"Button"Button_Detector.TextSize=WinTheme.Text_Size_Medium;Button_Detector.TextWrapped=true
Button_Detector.MouseButton1Click:Connect(function()
info.Callback()
end)
Button_Detector.MouseEnter:Connect(function()
Button_Detector.BorderColor3 = WinTheme.Accent;
Button_Detector.TextColor3 = WinTheme.Accent;
root.InfoMessage(info.Description or "")
end)
Button_Detector.MouseLeave:Connect(function()
root.ResetMessage()
Button_Detector.BorderColor3 = WinTheme.Light_Borders;
Button_Detector.TextColor3 = WinTheme.Text_Color;
end)
updateSectionSize()
local button_funcs = {}
function button_funcs.Fire(times)
for i = 1, times or 1 do
info.Callback()
end
end
function button_funcs.SetText(text)
Button_Detector.Text = text or "Button"
end
function button_funcs.GetText()
return Button_Detector.Text
end
function button_funcs.ReplaceCallback(newfunc)
info.Callback = newfunc
end
return button_funcs
end
function section_funcs.NewToggle(info)
local isToggled = info.Default or false
info.Callback = info.Callback or function()end
info.Text = info.Text or "Toggle"
info.Description = info.Description or ""
local Toggle = NEW("Frame")
local Toggle_Detector = NEW("ImageButton")
local Toggle_Right = NEW("Frame")
local Toggle_Left = NEW("Frame")
local Toggle_Title = NEW("TextLabel")
Toggle.Name="Toggle"Toggle.Parent=Item_Container;Toggle.BackgroundColor3=RGB(255,255,255)Toggle.BackgroundTransparency=1.000;Toggle.BorderSizePixel=0;Toggle.Size=U2(0,120,0,16)Toggle_Detector.Name="Toggle_Detector"Toggle_Detector.Parent=Toggle;Toggle_Detector.BackgroundColor3=RGB(0,0,0)Toggle_Detector.BorderColor3=WinTheme.Light_Borders;Toggle_Detector.Position=U2(0,5,0,0)Toggle_Detector.Size=U2(0,16,0,16)Toggle_Detector.AutoButtonColor=false;Toggle_Detector.Image="rbxassetid://7248316188"Toggle_Detector.ImageColor3=WinTheme.Accent;Toggle_Right.Name="Toggle_Right"Toggle_Right.Parent=Toggle_Detector;Toggle_Right.BackgroundColor3=RGB(0,0,0)Toggle_Right.BorderSizePixel=0;Toggle_Right.Position=U2(1,-2,0,0)Toggle_Right.Size=U2(0,2,1,0)Toggle_Left.Name="Toggle_Left"Toggle_Left.Parent=Toggle_Detector;Toggle_Left.BackgroundColor3=RGB(0,0,0)Toggle_Left.BorderSizePixel=0;Toggle_Left.Size=U2(0,2,1,0)Toggle_Title.Name="Toggle_Title"Toggle_Title.Parent=Toggle;Toggle_Title.BackgroundColor3=RGB(255,255,255)Toggle_Title.BackgroundTransparency=1.000;Toggle_Title.Position=U2(0,31,0,0)Toggle_Title.Size=U2(0,1,1,0)Toggle_Title.Font=GTHM;Toggle_Title.Text=info.Text or"Toggle"Toggle_Title.TextColor3=WinTheme.Text_Color;Toggle_Title.TextSize=WinTheme.Text_Size_Medium;Toggle_Title.TextXAlignment=TXAL
if isToggled then
Toggle_Detector.ImageTransparency = 0
else
Toggle_Detector.ImageTransparency = 1
end
Toggle_Detector.MouseButton1Click:Connect(function()
isToggled = not isToggled
if isToggled then
Toggle_Detector.ImageTransparency = 0
else
Toggle_Detector.ImageTransparency = 1
end
info.Callback(isToggled)
end)
Toggle_Detector.MouseEnter:Connect(function()
Toggle_Detector.BorderColor3 = WinTheme.Accent;
root.InfoMessage(info.Description or "")
end)
Toggle_Detector.MouseLeave:Connect(function()
root.ResetMessage()
Toggle_Detector.BorderColor3 = WinTheme.Light_Borders;
end)
updateSectionSize()
local toggle_funcs = {}
function toggle_funcs.Toggle(state)
isToggled = state or not isToggled
if isToggled then
Toggle_Detector.ImageTransparency = 0
else
Toggle_Detector.ImageTransparency = 1
end
info.Callback(isToggled)
end
function toggle_funcs.SetText(text)
Toggle_Title.Text = text or "Toggle"
end
function toggle_funcs.GetText()
return Toggle_Title.Text
end
function toggle_funcs.GetValue()
return isToggled
end
function toggle_funcs.ReplaceCallback(newfunc)
info.Callback = newfunc
end
return toggle_funcs
end
function section_funcs.NewTextBox(info)
info.Callback = info.Callback or function()end
info.Default = info.Default or ""
info.Text = info.Text or "Text Box"
info.PlaceHolderText = info.PlaceHolderText or "Type..."
info.Description = info.Description or ""
info.OnlyAlphabetic = info.OnlyAlphabetic or false
info.OnlyNumeric = info.OnlyNumeric or false
local TextBox = NEW("Frame")
local TextBox_Title = NEW("TextLabel")
local TextBox_Detector = NEW("TextBox")
TextBox.Name="TextBox"TextBox.Parent=Item_Container;TextBox.BackgroundColor3=RGB(255,255,255)TextBox.BackgroundTransparency=1.000;TextBox.BorderSizePixel=0;TextBox.Size=U2(1,0,0,16)TextBox_Title.Name="TextBox_Title"TextBox_Title.Parent=TextBox;TextBox_Title.BackgroundColor3=RGB(255,255,255)TextBox_Title.BackgroundTransparency=1.000;TextBox_Title.Position=U2(0,5,0,0)TextBox_Title.Size=U2(0,1,1,0)TextBox_Title.Font=GTHM;TextBox_Title.Text=info.Text;TextBox_Title.TextColor3=WinTheme.Text_Color;TextBox_Title.TextSize=WinTheme.Text_Size_Medium;TextBox_Title.TextXAlignment=TXAL;TextBox_Detector.Name="TextBox_Detector"TextBox_Detector.Parent=TextBox;TextBox_Detector.BackgroundColor3=RGB(0,0,0)TextBox_Detector.BorderColor3=WinTheme.Light_Borders;TextBox_Detector.Position=U2(1,-51,0,0)TextBox_Detector.Size=U2(0,46,1,0)TextBox_Detector.Font=GTHM;TextBox_Detector.PlaceholderColor3=RGB(178,178,178)TextBox_Detector.PlaceholderText=info.PlaceHolderText;TextBox_Detector.Text=info.Default;TextBox_Detector.TextColor3=WinTheme.Text_Color;TextBox_Detector.TextSize=WinTheme.Text_Size_Small;TextBox_Detector.ClearTextOnFocus=false;TextBox_Detector.MultiLine=false;TextBox_Detector.ClipsDescendants=true
updateSectionSize()
TextBox_Detector.MouseEnter:Connect(function()