-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathUI.lua
7850 lines (6474 loc) · 360 KB
/
UI.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
-- DOLLARWARE UI LIBRARY
-- MADE BY TOPIT
-- warning: comments are mostly retarded / useless
-- some shit makes no sense but idc enough to fix it
-- started on 5/18/22
local inputService = game:GetService('UserInputService')
local renderService = game:GetService('RunService')
local tweenService = game:GetService('TweenService')
local guiService = game:GetService('GuiService')
-- tween(object, {Property = 'value'}, 0.2, 1)
local tween
do
local styleEnum = Enum.EasingStyle
local dirEnum = Enum.EasingDirection
local direction = dirEnum.Out
local styles = {styleEnum.Exponential, styleEnum.Linear}
function tween(object, shit, duration, style)
local tweenInfo = TweenInfo.new(duration, styles[style], direction)
local tween = tweenService:Create(object, tweenInfo, shit)
tween:Play()
return tween
end
end
-- ui config shit
local args = {...}
local theme
local rounding
local animSpeed = 1e-12
-- theme
do
if (#args > 0 and typeof(args[1]) == 'table') then
local settings = args[1]
theme = settings.theme
rounding = settings.rounding
if (settings.smoothDragging == nil) then
settings.smoothDragging = true
end
animSpeed = settings.smoothDragging and 1e-12 or 0
if (typeof(theme) == 'string') then
if (theme == 'cherry') then -- red
theme = {
Primary = Color3.fromRGB(249, 22, 52);
Secondary = Color3.fromRGB(247, 22, 149);
Window1 = Color3.fromRGB(11, 11, 11);
Window2 = Color3.fromRGB(5, 5, 5);
Window3 = Color3.fromRGB(8, 8, 8);
Button1 = Color3.fromRGB(12, 12, 12);
Button2 = Color3.fromRGB(15, 15, 15);
Button3 = Color3.fromRGB(21, 21, 21);
Button4 = Color3.fromRGB(24, 24, 24);
Stroke = Color3.fromRGB(30, 30, 30);
StrokeHover = Color3.fromRGB(83, 23, 31);
Inset1 = Color3.fromRGB(3, 3, 3);
Inset2 = Color3.fromRGB(1, 1, 1);
Inset3 = Color3.fromRGB(2, 2, 2);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(164, 164, 164);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(200, 200, 200);
}
elseif (theme == 'orange') then -- orange
theme = {
Primary = Color3.fromRGB(244, 148, 22);
Secondary = Color3.fromRGB(247, 37, 22);
Window1 = Color3.fromRGB(20, 20, 22);
Window2 = Color3.fromRGB(10, 10, 12);
Window3 = Color3.fromRGB(15, 15, 17);
Button1 = Color3.fromRGB(18, 18, 20);
Button2 = Color3.fromRGB(20, 20, 22);
Button3 = Color3.fromRGB(28, 28, 30);
Button4 = Color3.fromRGB(30, 30, 32);
Stroke = Color3.fromRGB(60, 60, 60);
StrokeHover = Color3.fromRGB(110, 110, 110);
Inset1 = Color3.fromRGB(10, 10, 12);
Inset2 = Color3.fromRGB(0, 0, 2);
Inset3 = Color3.fromRGB(5, 5, 7);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(192, 192, 192);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'lemon') then -- yellow
theme = {
Primary = Color3.fromRGB(220, 255, 66);
Secondary = Color3.fromRGB(232, 173, 25);
Window1 = Color3.fromRGB(30, 30, 30);
Window2 = Color3.fromRGB(20, 20, 20);
Window3 = Color3.fromRGB(25, 25, 25);
Button1 = Color3.fromRGB(35, 35, 35);
Button2 = Color3.fromRGB(40, 40, 40);
Button3 = Color3.fromRGB(50, 50, 50);
Button4 = Color3.fromRGB(55, 55, 55);
Stroke = Color3.fromRGB(55, 55, 55);
StrokeHover = Color3.fromRGB(80, 80, 80);
Inset1 = Color3.fromRGB(18, 18, 18);
Inset2 = Color3.fromRGB(8, 8, 8);
Inset3 = Color3.fromRGB(13, 13, 13);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(192, 192, 192);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'lime') then -- green
theme = {
Primary = Color3.fromRGB(33, 255, 120);
Secondary = Color3.fromRGB(120, 255, 33);
Window1 = Color3.fromRGB(30, 30, 32);
Window2 = Color3.fromRGB(24, 24, 26);
Window3 = Color3.fromRGB(28, 28, 30);
Button1 = Color3.fromRGB(36, 36, 38);
Button2 = Color3.fromRGB(40, 40, 42);
Button3 = Color3.fromRGB(46, 46, 48);
Button4 = Color3.fromRGB(50, 50, 52);
Stroke = Color3.fromRGB(60, 60, 60);
StrokeHover = Color3.fromRGB(110, 110, 110);
Inset1 = Color3.fromRGB(20, 20, 22);
Inset2 = Color3.fromRGB(14, 14, 16);
Inset3 = Color3.fromRGB(18, 18, 20);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(192, 192, 192);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'raspberry') then -- cyan
theme = {
Primary = Color3.fromRGB(0, 190, 255);
Secondary = Color3.fromRGB(0, 255, 190);
Window1 = Color3.fromRGB(25, 25, 27);
Window2 = Color3.fromRGB(19, 19, 21);
Window3 = Color3.fromRGB(23, 23, 25);
Button1 = Color3.fromRGB(24, 24, 26);
Button2 = Color3.fromRGB(28, 28, 30);
Button3 = Color3.fromRGB(34, 40, 42);
Button4 = Color3.fromRGB(38, 44, 46);
Stroke = Color3.fromRGB(60, 60, 60);
StrokeHover = Color3.fromRGB(110, 110, 110);
Inset1 = Color3.fromRGB(20, 20, 22);
Inset2 = Color3.fromRGB(14, 14, 16);
Inset3 = Color3.fromRGB(18, 18, 20);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(192, 192, 192);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'blueberry') then -- blue
theme = {
Primary = Color3.fromRGB(91, 77, 249);
Secondary = Color3.fromRGB(130, 76, 247);
Window1 = Color3.fromRGB(20, 20, 23);
Window2 = Color3.fromRGB(12, 12, 15);
Window3 = Color3.fromRGB(15, 15, 18);
Button1 = Color3.fromRGB(18, 18, 21);
Button2 = Color3.fromRGB(21, 21, 24);
Button3 = Color3.fromRGB(38, 38, 41);
Button4 = Color3.fromRGB(41, 41, 44);
Stroke = Color3.fromRGB(50, 50, 53);
StrokeHover = Color3.fromRGB(60, 60, 63);
Inset1 = Color3.fromRGB(15, 15, 18);
Inset2 = Color3.fromRGB(7, 7, 10);
Inset3 = Color3.fromRGB(13, 13, 16);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(168, 168, 168);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'grape') then -- purple
theme = {
Primary = Color3.fromRGB(134, 53, 255);
Secondary = Color3.fromRGB(211, 53, 255);
Window1 = Color3.fromRGB(20, 20, 20);
Window2 = Color3.fromRGB(10, 10, 10);
Window3 = Color3.fromRGB(15, 15, 15);
Button1 = Color3.fromRGB(15, 15, 15);
Button2 = Color3.fromRGB(20, 20, 20);
Button3 = Color3.fromRGB(35, 35, 35);
Button4 = Color3.fromRGB(40, 40, 40);
Stroke = Color3.fromRGB(34, 34, 34);
StrokeHover = Color3.fromRGB(89, 49, 150);
Inset1 = Color3.fromRGB(5, 5, 5);
Inset2 = Color3.fromRGB(0, 0, 0);
Inset3 = Color3.fromRGB(3, 3, 3);
TextPrimary = Color3.fromRGB(255, 255, 255);
TextStroke = Color3.fromRGB(0, 0, 0);
TextDim = Color3.fromRGB(74, 42, 122);
ControlGradient1 = Color3.fromRGB(255, 255, 255);
ControlGradient2 = Color3.fromRGB(192, 192, 192);
}
elseif (theme == 'watermelon') then -- legacy red-aqua
theme = nil
end
end
end
if (rounding == nil) then
rounding = true
end
if (typeof(theme) ~= 'table') then
theme = {
Primary = Color3.fromRGB(38, 233, 195); -- primary accent
Secondary = Color3.fromRGB(233, 38, 115); -- secondary accent
Window1 = Color3.fromRGB(30, 30, 35); -- window headers (the tool bar w/ title and min/max buttons)
Window2 = Color3.fromRGB(20, 20, 25); -- window background
Window3 = Color3.fromRGB(25, 25, 30); -- sidebar, section header, tooltip header
Button1 = Color3.fromRGB(35, 35, 40); -- idle disabled button
Button2 = Color3.fromRGB(45, 45, 50); -- disabled button focused
Button3 = Color3.fromRGB(65, 65, 70); -- idle enabled button
Button4 = Color3.fromRGB(75, 75, 80); -- enabled button focused
Stroke = Color3.fromRGB(50, 50, 55); -- stroke for everything
StrokeHover = Color3.fromRGB(70, 70, 75); -- stroke for everything
Inset1 = Color3.fromRGB(20, 20, 25); -- inner stroke of Window1
Inset2 = Color3.fromRGB(10, 10, 15); -- inner stroke of Window2
Inset3 = Color3.fromRGB(15, 15, 20); -- inner stroke of Window3
TextPrimary = Color3.fromRGB(255, 255, 255); -- primary text color
TextStroke = Color3.fromRGB(0, 0, 0); -- text stroke
TextDim = Color3.fromRGB(164, 164, 164); -- dim text color
ControlGradient1 = Color3.fromRGB(255, 255, 255); -- top color for extra gradient effects
ControlGradient2 = Color3.fromRGB(192, 192, 192); -- bottom color for extra gradient effects
}
end
end
-- screen gui
local uiScreen = Instance.new('ScreenGui') do
uiScreen.OnTopOfCoreBlur = true
uiScreen.DisplayOrder = 9e9
uiScreen.ZIndexBehavior = 'Global'
local str = ''
for i = 1, 8 do
str = str .. utf8.char(math.random(97, 2500))
end
uiScreen.Name = str
str = nil
if (typeof(syn) == 'table' and typeof(syn.protect_gui) == 'function') then
--syn.protect_gui(uiScreen)
end
if (gethui) then
uiScreen.Parent = gethui()
else
uiScreen.Parent = game:GetService('CoreGui')
end
local notifContainer = Instance.new('Frame') do
notifContainer.Active = false
notifContainer.BackgroundTransparency = 1
notifContainer.Name = '#notif-container'
notifContainer.Position = UDim2.new(1, -250, 0, -50)
notifContainer.Size = UDim2.new(0, 200, 1, 0)
notifContainer.ZIndex = 0
notifContainer.Parent = uiScreen
end
end
-- tooltip
local tooltip = {} do
do
local instances = {}
local main = Instance.new('Frame')
main.BackgroundColor3 = theme.Window2
main.BorderColor3 = theme.Inset2
main.BorderMode = 'Inset'
main.Name = '#main'
main.Size = UDim2.fromOffset(140, 60)
main.Visible = false
main.ZIndex = 3800
main.Parent = uiScreen
do
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Thickness = 1
stroke.Name = '#stroke'
stroke.Parent = main
end
local shadow = Instance.new('ImageLabel') do
shadow.AnchorPoint = Vector2.new(0.5, 0.5)
shadow.BackgroundTransparency = 1
shadow.BorderSizePixel = 0
shadow.Image = 'rbxassetid://7331400934'
shadow.ImageColor3 = Color3.fromRGB(0, 0, 5)
shadow.Name = '#shadow'
shadow.Position = UDim2.fromScale(0.5, 0.5)
shadow.ScaleType = 'Slice'
shadow.Size = UDim2.new(1, 50, 1, 50)
shadow.SliceCenter = Rect.new(40, 40, 260, 260)
shadow.SliceScale = 1
shadow.ZIndex = 3799
shadow.Parent = main
end
local trim = Instance.new('Frame') do
trim.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
trim.BackgroundTransparency = 0
trim.BorderSizePixel = 0
trim.Name = '#trim'
trim.Position = UDim2.fromOffset(0, -2)
trim.Size = UDim2.new(1, 0, 0, 1)
trim.ZIndex = 3805
trim.Parent = main
local gradient = Instance.new('UIGradient') do
gradient.Color = ColorSequence.new(
theme.Primary,
theme.Secondary
)
gradient.Enabled = true
gradient.Name = '#gradient'
gradient.Rotation = 0
gradient.Parent = trim
end
end
local titleBar = Instance.new('Frame') do
titleBar.BackgroundColor3 = theme.Window3
titleBar.BackgroundTransparency = 0
titleBar.BorderColor3 = theme.Inset3
titleBar.BorderSizePixel = 1
titleBar.BorderMode = 'Inset'
titleBar.Name = '#title-bar'
titleBar.Size = UDim2.new(1, 2, 0, 16)
titleBar.Position = UDim2.fromOffset(-1, 0)
titleBar.Visible = true
titleBar.ZIndex = 3801
titleBar.Parent = main
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Thickness = 1
stroke.Name = '#stroke'
stroke.Parent = titleBar
end
local title = Instance.new('TextLabel') do
title.BackgroundTransparency = 1
title.Font = 'SourceSans'
title.Name = '#title'
title.RichText = true
title.Size = UDim2.fromScale(1, 1)
title.Text = 'tooltip'
title.TextColor3 = theme.TextPrimary
title.TextSize = 14
title.TextStrokeColor3 = theme.TextStroke
title.TextStrokeTransparency = 0.8
title.TextTransparency = 0
title.TextWrapped = false
title.TextXAlignment = 'Left'
title.TextYAlignment = 'Center'
title.Visible = true
title.ZIndex = 3801
title.Parent = titleBar
local padding = Instance.new('UIPadding') do
padding.Name = '#padding'
padding.PaddingLeft = UDim.new(0, 4)
padding.Parent = title
end
instances.title = title
end
end
local menu = Instance.new('Frame') do
menu.BackgroundColor3 = theme.Window2
menu.BorderColor3 = theme.Inset2
menu.BorderMode = 'Inset'
menu.BorderSizePixel = 1
menu.ClipsDescendants = true
menu.Name = '#menu'
menu.Position = UDim2.fromOffset(-1, 17)
menu.Size = UDim2.new(1, 2, 1, -16)
menu.Visible = true
menu.ZIndex = 3801
menu.Parent = main
local desc = Instance.new('TextLabel') do
desc.BackgroundTransparency = 1
desc.Font = 'SourceSans'
desc.Name = '#desc'
desc.RichText = true
desc.Size = UDim2.fromScale(1, 1)
desc.Text = 'tooltip description'
desc.TextColor3 = theme.TextPrimary
desc.TextSize = 14
desc.TextStrokeColor3 = theme.TextStroke
desc.TextStrokeTransparency = 0.8
desc.TextTransparency = 0
desc.TextWrapped = true
desc.TextXAlignment = 'Left'
desc.TextYAlignment = 'Top'
desc.Visible = true
desc.ZIndex = 3801
desc.Parent = menu
local padding = Instance.new('UIPadding') do
padding.Name = '#padding'
padding.PaddingLeft = UDim.new(0, 4)
padding.PaddingTop = UDim.new(0, 2)
padding.Parent = desc
end
instances.desc = desc
end
end
end
instances.main = main
tooltip.instances = instances
end
tooltip.handle = nil
tooltip.showing = false
tooltip.update = nil
end
-- hint
local hint = {} do
do
local instances = {}
local main = Instance.new('Frame')
main.BackgroundColor3 = theme.Window2
main.BorderColor3 = theme.Inset2
main.BorderMode = 'Inset'
main.Name = '#main'
main.Size = UDim2.fromOffset(140, 84)
main.Visible = false
main.ZIndex = 3900
main.Parent = uiScreen
do
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Thickness = 1
stroke.Name = '#stroke'
stroke.Parent = main
end
local shadow = Instance.new('ImageLabel') do
shadow.AnchorPoint = Vector2.new(0.5, 0.5)
shadow.BackgroundTransparency = 1
shadow.BorderSizePixel = 0
shadow.Image = 'rbxassetid://7331400934'
shadow.ImageColor3 = Color3.fromRGB(0, 0, 5)
shadow.Name = '#shadow'
shadow.Position = UDim2.fromScale(0.5, 0.5)
shadow.ScaleType = 'Slice'
shadow.Size = UDim2.new(1, 50, 1, 50)
shadow.SliceCenter = Rect.new(40, 40, 260, 260)
shadow.SliceScale = 1
shadow.ZIndex = 3899
shadow.Parent = main
end
local trim = Instance.new('Frame') do
trim.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
trim.BackgroundTransparency = 0
trim.BorderSizePixel = 0
trim.Name = '#trim'
trim.Position = UDim2.fromOffset(0, -2)
trim.Size = UDim2.new(1, 0, 0, 1)
trim.ZIndex = 3905
trim.Parent = main
local gradient = Instance.new('UIGradient') do
gradient.Color = ColorSequence.new(
theme.Primary,
theme.Secondary
)
gradient.Enabled = true
gradient.Name = '#gradient'
gradient.Rotation = 0
gradient.Parent = trim
end
end
local menu = Instance.new('Frame') do
menu.BackgroundColor3 = theme.Window2
menu.BorderColor3 = theme.Inset2
menu.BorderMode = 'Inset'
menu.BorderSizePixel = 1
menu.ClipsDescendants = true
menu.Name = '#menu'
menu.Position = UDim2.fromOffset(0, 0)
menu.Size = UDim2.fromScale(1, 1)
menu.Visible = true
menu.ZIndex = 3901
menu.Parent = main
do
local selectionFrame = Instance.new('Frame') do
selectionFrame.BackgroundColor3 = theme.Button2
selectionFrame.BorderSizePixel = 0
selectionFrame.Name = '#select'
selectionFrame.Size = UDim2.new(1, 0, 0, 16)
selectionFrame.Visible = true
selectionFrame.ZIndex = 3902
selectionFrame.Parent = menu
instances.optionHighlight = selectionFrame
end
local hintContainer = Instance.new('ScrollingFrame') do
hintContainer.AutomaticCanvasSize = 'Y'
hintContainer.BackgroundTransparency = 1
hintContainer.BorderSizePixel = 0
hintContainer.Name = '#container'
hintContainer.ScrollBarImageTransparency = 1
hintContainer.ScrollingEnabled = false
hintContainer.Size = UDim2.fromScale(1, 1)
hintContainer.Visible = true
hintContainer.ZIndex = 3902
hintContainer.Parent = menu
do
local layout = Instance.new('UIListLayout') do
layout.FillDirection = 'Vertical'
layout.HorizontalAlignment = 'Left'
layout.SortOrder = 'Name'
layout.VerticalAlignment = 'Top'
layout.Parent = hintContainer
end
local hintOption = Instance.new('TextLabel') do
hintOption.BackgroundTransparency = 1
--hintOption.Font = 'SourceSansItalic'
hintOption.Name = '#hint'
hintOption.RichText = true
hintOption.Size = UDim2.new(1, 0, 0, 16)
hintOption.Text = 'no suggestions'
hintOption.TextColor3 = theme.TextPrimary
hintOption.TextSize = 14
hintOption.TextStrokeColor3 = theme.TextStroke
hintOption.TextStrokeTransparency = 0.8
hintOption.TextWrapped = false
hintOption.TextXAlignment = 'Left'
hintOption.TextYAlignment = 'Center'
hintOption.Visible = false
hintOption.ZIndex = 3902
hintOption.Parent = hintContainer
local padding = Instance.new('UIPadding') do
padding.Name = '#padding'
padding.PaddingLeft = UDim.new(0, 4)
padding.PaddingBottom = UDim.new(0, 2)
padding.Parent = hintOption
end
instances.hintTemplate = hintOption
end
end
end
end
end
end
instances.main = main
hint.instances = instances
end
hint.selection = 1
hint.handle = nil
hint.hintCount = 0
hint.showing = false
hint.updateCn = nil
hint.inputCn = nil
hint.previousHint = ''
hint.hints = {}
end
local defaultWinPos = UDim2.fromScale(0.6, 0.6)
local ui = {}
-- classes
local elemClasses = {}
do
-- GLOBAL
do
local baseElement = {} do
baseElement.__index = baseElement
baseElement.bindToEvent = function(self, event, callback)
self.binds[event] = callback
return self
end
baseElement.fireEvent = function(self, event, ...)
local t = self.binds[event]
if (t) then task.spawn(t, ...) end
return self
end
baseElement.name = ''
baseElement.tooltip = nil
baseElement.setTooltip = function(self, tooltip)
self.tooltip = tostring(tooltip)
return self
end
baseElement.showTooltip = function(self)
if (self.tooltip) then
tooltip.showing = true
tooltip.handle = self
local desc, title, main = tooltip.instances.desc, tooltip.instances.title, tooltip.instances.main
title.Text = self.name
main.Size = UDim2.fromOffset(140, 20)
desc.Text = self.tooltip
local c = 0
while (true) do
c += 1
main.Size += UDim2.fromOffset(0, 20)
if (c > 30) then
desc.Text = 'stop fucking spamming the tooltip jesus christ'
main.Size = UDim2.fromOffset(140, 60)
break
end
local _ = desc.TextFits -- for some fucking reason this is needed or else tooltips won't resize properly
if (desc.TextFits == true) then break end
end
main.Visible = true
tooltip.update = renderService.RenderStepped:Connect(function()
local mpos = inputService:GetMouseLocation()
main.Position = UDim2.fromOffset(mpos.X,mpos.Y)
end)
end
return self
end
baseElement.hideTooltip = function(self)
if (tooltip.handle == self) then
tooltip.showing = false
tooltip.handle = nil
tooltip.update:Disconnect()
tooltip.instances.main.Visible = false
end
return self
end
end
elemClasses.baseElement = baseElement
end
-- WINDOW
do
-- init window class
local window = {} do
window.__index = window
setmetatable(window, elemClasses.baseElement)
window.class = 'window'
window.minimized = false -- is minimized
window.size = UDim2.fromOffset(450, 350) -- current win size
window.icon = nil--'rbxassetid://9651932657'
window.minFocused = false
local instances = {} do
local mainFrame = Instance.new('Frame') do
mainFrame.BackgroundColor3 = theme.Window2
mainFrame.BackgroundTransparency = 0
mainFrame.BorderSizePixel = 0
mainFrame.Name = '#main_frame'
mainFrame.Position = UDim2.fromScale(0.6, 0.6)
mainFrame.Size = UDim2.fromOffset(500, 350)
mainFrame.Visible = true
mainFrame.ZIndex = 5
--mainFrame.Parent = uiScreen
end
local scale = Instance.new('UIScale') do
scale.Scale = 1
scale.Name = '#scale'
scale.Parent = mainFrame
end
local backgroundFrame = Instance.new('Frame') do
backgroundFrame.BackgroundTransparency = 0
backgroundFrame.BackgroundColor3 = theme.Window2
backgroundFrame.BorderSizePixel = 0
backgroundFrame.Name = '#background'
backgroundFrame.Position = UDim2.fromOffset(0, 0)
backgroundFrame.Size = UDim2.fromScale(1, 1)
backgroundFrame.Visible = true
backgroundFrame.ZIndex = 4
backgroundFrame.Parent = mainFrame
end
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Thickness = 1
stroke.Name = '#stroke'
stroke.Parent = mainFrame
end
local shadow = Instance.new('ImageLabel') do
shadow.AnchorPoint = Vector2.new(0.5, 0.5)
shadow.BackgroundTransparency = 1
shadow.BorderSizePixel = 0
shadow.Image = 'rbxassetid://7331400934'
shadow.ImageColor3 = Color3.fromRGB(0, 0, 5)
shadow.Name = '#shadow'
shadow.Position = UDim2.fromScale(0.5, 0.5)
shadow.ScaleType = 'Slice'
shadow.Size = UDim2.new(1, 50, 1, 50)
shadow.SliceCenter = Rect.new(40, 40, 260, 260)
shadow.SliceScale = 1
shadow.ZIndex = 4
shadow.Parent = mainFrame
end
-- the shitty line at the top
local trimLine = Instance.new('Frame') do
trimLine.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
trimLine.BackgroundTransparency = 0
trimLine.BorderSizePixel = 0
trimLine.Name = '#trim'
trimLine.Position = UDim2.fromOffset(0, -1)
trimLine.Size = UDim2.new(1, 0, 0, 1)
trimLine.ZIndex = 64
trimLine.Parent = mainFrame
local gradient = Instance.new('UIGradient') do
gradient.Color = ColorSequence.new(
theme.Primary,
theme.Secondary
)
gradient.Enabled = true
gradient.Name = '#gradient'
gradient.Rotation = 0
gradient.Parent = trimLine
end
end
-- title bar
local titleBar = Instance.new('Frame') do
titleBar.Active = true
titleBar.BackgroundColor3 = theme.Window1
titleBar.BackgroundTransparency = 0
titleBar.BorderColor3 = theme.Inset1
titleBar.BorderMode = 'Inset'
titleBar.BorderSizePixel = 1
titleBar.ClipsDescendants = true
titleBar.Name = '#title-bar'
titleBar.Selectable = true
titleBar.Size = UDim2.new(1, 0, 0, 26)
titleBar.ZIndex = 50
titleBar.Parent = mainFrame
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Thickness = 1
stroke.Name = '#stroke'
stroke.Parent = titleBar
end
local fade = Instance.new('Frame') do
fade.BackgroundColor3 = theme.Window1
fade.BackgroundTransparency = 1
fade.BorderColor3 = theme.Inset1
fade.BorderMode = 'Inset'
fade.BorderSizePixel = 1
fade.Name = '#fade'
fade.Size = UDim2.new(1, 4, 1, 4)
fade.Position = UDim2.fromOffset(-2, -2)
fade.Visible = false
fade.ZIndex = 60
fade.Parent = titleBar
end
local buttonClose = Instance.new('TextButton') do
buttonClose.AnchorPoint = Vector2.new(1, 0)
buttonClose.AutoButtonColor = false
buttonClose.BackgroundColor3 = theme.Button1
buttonClose.BorderSizePixel = 0
buttonClose.Name = '#button-close'
buttonClose.Position = UDim2.new(1, -3, 0, 2)
buttonClose.Size = UDim2.fromOffset(20, 20)
buttonClose.Visible = true
buttonClose.ZIndex = 52
buttonClose.Text = ''
buttonClose.Parent = titleBar
local round = Instance.new('UICorner') do
round.CornerRadius = UDim.new(0, rounding and 2 or 0)
round.Name = '#round'
round.Parent = buttonClose
end
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Name = '#stroke'
stroke.Thickness = 1
stroke.Parent = buttonClose
end
local icon = Instance.new('ImageLabel') do
icon.Active = false
icon.BackgroundTransparency = 1
icon.BorderSizePixel = 0
icon.Image = 'rbxassetid://9801460300'
icon.ImageColor3 = Color3.fromRGB(255, 255, 255)
icon.Name = '#icon'
icon.Position = UDim2.fromOffset(0, 0)
icon.Size = UDim2.fromScale(1, 1)
icon.Visible = true
icon.ZIndex = 52
icon.Parent = buttonClose
local gradient = Instance.new('UIGradient') do
gradient.Color = ColorSequence.new(
theme.ControlGradient1,
theme.ControlGradient2
)
gradient.Rotation = 90
gradient.Enabled = true
gradient.Name = '#gradient'
gradient.Parent = icon
end
end
end
local buttonMin = Instance.new('TextButton') do
buttonMin.AnchorPoint = Vector2.new(1, 0)
buttonMin.AutoButtonColor = false
buttonMin.BackgroundColor3 = theme.Button1
buttonMin.BorderSizePixel = 0
buttonMin.Name = '#button-min'
buttonMin.Position = UDim2.new(1, -27, 0, 2)
buttonMin.Size = UDim2.fromOffset(20, 20)
buttonMin.Visible = true
buttonMin.ZIndex = 52
buttonMin.Text = ''
buttonMin.Parent = titleBar
local round = Instance.new('UICorner') do
round.CornerRadius = UDim.new(0, rounding and 2 or 0)
round.Name = '#round'
round.Parent = buttonMin
end
local stroke = Instance.new('UIStroke') do
stroke.ApplyStrokeMode = 'Border'
stroke.Color = theme.Stroke
stroke.LineJoinMode = 'Round'
stroke.Name = '#stroke'
stroke.Thickness = 1
stroke.Parent = buttonMin
end
local icon = Instance.new('ImageLabel') do
icon.Active = false
icon.BackgroundTransparency = 1
icon.BorderSizePixel = 0
icon.Image = 'rbxassetid://9801458532'
icon.ImageColor3 = Color3.fromRGB(255, 255, 255)
icon.Name = '#icon'
icon.Position = UDim2.fromOffset(0, 0)
icon.Size = UDim2.fromScale(1, 1)
icon.Visible = true
icon.ZIndex = 52
icon.Parent = buttonMin
local gradient = Instance.new('UIGradient') do
gradient.Color = ColorSequence.new(
theme.ControlGradient1,
theme.ControlGradient2
)
gradient.Rotation = 90
gradient.Enabled = true
gradient.Name = '#gradient'
gradient.Parent = icon
end