forked from 7GrandDadPGN/VapeV4ForRoblox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NewGuiLibrary.lua
6498 lines (6331 loc) · 284 KB
/
NewGuiLibrary.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
if shared.VapeExecuted then
local VERSION = "4.08"..(shared.VapePrivate and " PRIVATE" or "")
local customdir = (shared.VapePrivate and "vapeprivate/" or "vape/")
local rainbowvalue = 0
local cam = game:GetService("Workspace").CurrentCamera
local getasset = getsynasset or getcustomasset or function(location) return "rbxasset://"..location end
local requestfunc = syn and syn.request or http and http.request or http_request or fluxus and fluxus.request or request or function(tab)
if tab.Method == "GET" then
return {
Body = game:HttpGet(tab.Url, true),
Headers = {},
StatusCode = 200
}
else
return {
Body = "bad exploit",
Headers = {},
StatusCode = 404
}
end
end
local betterisfile = function(file)
local suc, res = pcall(function() return readfile(file) end)
return suc and res ~= nil
end
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
local loadedsuccessfully = false
local api = {
["Settings"] = {["GUIObject"] = {["Type"] = "Custom", ["Color"] = 0.64}, ["SearchObject"] = {["Type"] = "Custom", ["List"] = {}}},
["Profiles"] = {
["default"] = {["Keybind"] = "", ["Selected"] = true}
},
["RainbowSpeed"] = 0.6,
["Language"] = betterisfile("vape/language.dat") and readfile("vape/language.dat") or "en-us",
["GUIKeybind"] = "RightShift",
["CurrentProfile"] = "default",
["KeybindCaptured"] = false,
["PressedKeybindKey"] = "",
["ToggleNotifications"] = false,
["Notifications"] = false,
["ToggleTooltips"] = false,
["ObjectsThatCanBeSaved"] = {},
}
local function GetURL(scripturl)
if shared.VapeDeveloper then
if not betterisfile("vape/"..scripturl) then
error("File not found : vape/"..scripturl)
end
return readfile("vape/"..scripturl)
else
local res = game:HttpGet("https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/"..scripturl, true)
assert(res ~= "404: Not Found", "File not found")
return res
end
end
local translations = {}--loadstring(GetURL("translations/"..api["Language"]..".vapetranslation") or GetURL("translations/en-us.vapetranslation"))()
--local translatedlogo, res = pcall(function() return GetURL("translations/"..api["Language"].."/VapeLogo1.png") end)
local translatedlogo = false
local function getprofile()
for i,v in pairs(api["Profiles"]) do
if v["Selected"] then
api["CurrentProfile"] = i
end
end
end
coroutine.resume(coroutine.create(function()
repeat
task.wait(0.01)
rainbowvalue = rainbowvalue + 0.005 * api["RainbowSpeed"]
if rainbowvalue > 1 then
rainbowvalue = rainbowvalue - 1
end
until not shared.VapeExecuted
end))
local capturedslider = nil
local clickgui = {["Visible"] = true}
local function randomString()
local randomlength = math.random(10,100)
local array = {}
for i = 1, randomlength do
array[i] = string.char(math.random(32, 126))
end
return table.concat(array)
end
local function RelativeXY(GuiObject, location)
local x, y = location.X - GuiObject.AbsolutePosition.X, location.Y - GuiObject.AbsolutePosition.Y
local x2 = 0
local xm, ym = GuiObject.AbsoluteSize.X, GuiObject.AbsoluteSize.Y
x2 = math.clamp(x, 4, xm - 6)
x = math.clamp(x, 0, xm)
y = math.clamp(y, 0, ym)
return x, y, x/xm, y/ym, x2/xm
end
if not game:IsLoaded() then
game.Loaded:Wait()
end
local gui = Instance.new("ScreenGui")
gui.Name = randomString()
gui.DisplayOrder = 999
gui.ZIndexBehavior = Enum.ZIndexBehavior.Global
gui.OnTopOfCoreBlur = true
if gethui and (not KRNL_LOADED) then
gui.Parent = gethui()
elseif not is_sirhurt_closure and syn and syn.protect_gui then
syn.protect_gui(gui)
gui.Parent = game:GetService("CoreGui")
else
gui.Parent = game:GetService("CoreGui")
end
api["MainGui"] = gui
local cachedassets = {}
local function getcustomassetfunc(path)
if not betterisfile(path) then
spawn(function()
local textlabel = Instance.new("TextLabel")
textlabel.Size = UDim2.new(1, 0, 0, 36)
textlabel.Text = "Downloading "..path
textlabel.BackgroundTransparency = 1
textlabel.TextStrokeTransparency = 0
textlabel.TextSize = 30
textlabel.Font = Enum.Font.SourceSans
textlabel.TextColor3 = Color3.new(1, 1, 1)
textlabel.Position = UDim2.new(0, 0, 0, -36)
textlabel.Parent = api["MainGui"]
repeat wait() until betterisfile(path)
textlabel:Remove()
end)
local req = requestfunc({
Url = "https://raw.githubusercontent.com/7GrandDadPGN/VapeV4ForRoblox/main/"..path:gsub("vape/assets", "assets"),
Method = "GET"
})
writefile(path, req.Body)
end
if cachedassets[path] == nil then
cachedassets[path] = getasset(path)
end
return cachedassets[path]
end
api["UpdateHudEvent"] = Instance.new("BindableEvent")
api["SelfDestructEvent"] = Instance.new("BindableEvent")
api["LoadSettingsEvent"] = Instance.new("BindableEvent")
local scaledgui = Instance.new("Frame")
scaledgui.Name = "ScaledGui"
scaledgui.Size = UDim2.new(1, 0, 1, 0)
scaledgui.BackgroundTransparency = 1
scaledgui.Parent = api["MainGui"]
local clickgui = Instance.new("Frame")
clickgui.Name = "ClickGui"
clickgui.Size = UDim2.new(1, 0, 1, 0)
clickgui.BackgroundTransparency = 1
clickgui.BorderSizePixel = 0
clickgui.BackgroundColor3 = Color3.fromRGB(79, 83, 166)
clickgui.Visible = false
clickgui.Parent = scaledgui
local searchbarmain = Instance.new("Frame")
searchbarmain.Size = UDim2.new(0, 220, 0, 45)
searchbarmain.Position = UDim2.new(0.5, -110, 0, -23)
searchbarmain.ClipsDescendants = false
searchbarmain.ZIndex = 10
searchbarmain.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
searchbarmain.Parent = clickgui
local searchbarchildren = Instance.new("Frame")
searchbarchildren.Size = UDim2.new(1, 0, 1, -45)
searchbarchildren.Position = UDim2.new(0, 0, 0, 45)
searchbarchildren.BackgroundTransparency = 1
searchbarchildren.ZIndex = 10
searchbarchildren.Parent = searchbarmain
local searchbaricon = Instance.new("ImageLabel")
searchbaricon.BackgroundTransparency = 1
searchbaricon.ZIndex = 10
searchbaricon.Image = getcustomassetfunc("vape/assets/SearchBarIcon.png")
searchbaricon.Size = UDim2.new(0, 14, 0, 14)
searchbaricon.Position = UDim2.new(1, -32, 0, 14)
searchbaricon.Parent = searchbarmain
local searchbar = Instance.new("TextBox")
searchbar.PlaceholderText = ""
searchbar.Text = ""
searchbar.ZIndex = 10
searchbar.TextColor3 = Color3.fromRGB(121, 121, 121)
searchbar.Size = UDim2.new(1, -13, 0, 43)
searchbar.Font = Enum.Font.Gotham
searchbar.TextXAlignment = Enum.TextXAlignment.Left
searchbar.TextSize = 15
searchbar.Position = UDim2.new(0, 13, 0, 0)
searchbar.BackgroundTransparency = 1
searchbar.Parent = searchbarmain
local searchbarshadow = Instance.new("ImageLabel")
searchbarshadow.AnchorPoint = Vector2.new(0.5, 0.5)
searchbarshadow.Position = UDim2.new(0.5, 0, 0.5, 0)
searchbarshadow.Image = getcustomassetfunc("vape/assets/WindowBlur.png")
searchbarshadow.BackgroundTransparency = 1
searchbarshadow.ZIndex = -1
searchbarshadow.Size = UDim2.new(1, 6, 1, 6)
searchbarshadow.ImageColor3 = Color3.new(0, 0, 0)
searchbarshadow.ScaleType = Enum.ScaleType.Slice
searchbarshadow.SliceCenter = Rect.new(10, 10, 118, 118)
searchbarshadow.Parent = searchbarmain
local searchbarround = Instance.new("UICorner")
searchbarround.CornerRadius = UDim.new(0, 5)
searchbarround.Parent = searchbarmain
local OnlineProfilesBigFrame = Instance.new("Frame")
OnlineProfilesBigFrame.Size = UDim2.new(1, 0, 1, 0)
OnlineProfilesBigFrame.Name = "OnlineProfiles"
OnlineProfilesBigFrame.BackgroundTransparency = 1
OnlineProfilesBigFrame.Visible = false
OnlineProfilesBigFrame.Parent = scaledgui
local notificationwindow = Instance.new("Frame")
notificationwindow.BackgroundTransparency = 1
notificationwindow.Active = false
notificationwindow.Size = UDim2.new(1, 0, 1, 0)
notificationwindow.Parent = api["MainGui"]
local hoverbox = Instance.new("TextLabel")
hoverbox.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
hoverbox.Active = false
hoverbox.Text = " ".."Placeholder"
hoverbox.ZIndex = 11
hoverbox.TextColor3 = Color3.fromRGB(162, 162, 162)
hoverbox.Font = Enum.Font.SourceSans
hoverbox.TextXAlignment = Enum.TextXAlignment.Left
hoverbox.TextSize = 15
hoverbox.Visible = false
hoverbox.Parent = clickgui
local hoverround = Instance.new("UICorner")
hoverround.CornerRadius = UDim.new(0, 5)
hoverround.Parent = hoverbox
local hoverbox2 = hoverbox:Clone()
hoverbox2.ZIndex = -1
hoverbox2.Size = UDim2.new(1, 2, 1, 2)
hoverbox2.Text = ""
hoverbox2.Visible = true
hoverbox2.BackgroundColor3 = Color3.fromRGB(32, 35, 36)
hoverbox2.Position = UDim2.new(0, -1, 0, -1)
hoverbox2.Parent = hoverbox
local hoverboxshadow = Instance.new("ImageLabel")
hoverboxshadow.AnchorPoint = Vector2.new(0.5, 0.5)
hoverboxshadow.Position = UDim2.new(0.5, 0, 0.5, 0)
hoverboxshadow.Image = getcustomassetfunc("vape/assets/WindowBlur.png")
hoverboxshadow.BackgroundTransparency = 1
hoverboxshadow.ZIndex = -1
hoverboxshadow.Visible = true
hoverboxshadow.Size = UDim2.new(1, 6, 1, 6)
hoverboxshadow.ImageColor3 = Color3.new(0, 0, 0)
hoverboxshadow.ScaleType = Enum.ScaleType.Slice
hoverboxshadow.SliceCenter = Rect.new(10, 10, 118, 118)
hoverboxshadow.Parent = hoverbox
local vertextsize = game:GetService("TextService"):GetTextSize("v"..VERSION, 25, Enum.Font.SourceSans, Vector2.new(99999, 99999))
local vertext = Instance.new("TextLabel")
vertext.Name = "Version"
vertext.Size = UDim2.new(0, vertextsize.X, 0, 20)
vertext.Font = Enum.Font.SourceSans
vertext.TextColor3 = Color3.new(1, 1, 1)
vertext.Active = false
vertext.TextSize = 25
vertext.BackgroundTransparency = 1
vertext.Text = "v"..VERSION
vertext.TextXAlignment = Enum.TextXAlignment.Left
vertext.TextYAlignment = Enum.TextYAlignment.Top
vertext.Position = UDim2.new(1, -(vertextsize.X) - 20, 1, -25)
vertext.Parent = clickgui
local vertext2 = vertext:Clone()
vertext2.Position = UDim2.new(0, 1, 0, 1)
vertext2.TextColor3 = Color3.new(0.42, 0.42, 0.42)
vertext2.ZIndex = 0
vertext2.Parent = vertext
local modal = Instance.new("TextButton")
modal.Size = UDim2.new(0, 0, 0, 0)
modal.BorderSizePixel = 0
modal.Text = ""
modal.Modal = true
modal.Parent = clickgui
local hudgui = Instance.new("Frame")
hudgui.Name = "HudGui"
hudgui.Size = UDim2.new(1, 0, 1, 0)
hudgui.BackgroundTransparency = 1
hudgui.Visible = true
hudgui.Parent = scaledgui
api["MainBlur"] = {Size = 25}
api["MainRescale"] = Instance.new("UIScale")
api["MainRescale"].Parent = scaledgui
api["MainRescale"]:GetPropertyChangedSignal("Scale"):Connect(function()
vertext.Position = UDim2.new(1 / api["MainRescale"].Scale, -(vertextsize.X) - 20, 1 / api["MainRescale"].Scale, -25)
end)
local function dragGUI(gui)
spawn(function()
local dragging
local dragInput
local dragStart = Vector3.new(0,0,0)
local startPos
local function update(input)
local delta = input.Position - dragStart
local Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + (delta.X * (1 / api["MainRescale"].Scale)), startPos.Y.Scale, startPos.Y.Offset + (delta.Y * (1 / api["MainRescale"].Scale)))
game:GetService("TweenService"):Create(gui, TweenInfo.new(.20), {Position = Position}):Play()
end
gui.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch and dragging == false then
dragStart = input.Position
local delta = (dragStart - Vector3.new(gui.AbsolutePosition.X, gui.AbsolutePosition.Y, 0)) * (1 / api["MainRescale"].Scale)
if delta.Y <= 40 then
dragging = clickgui.Visible
startPos = gui.Position
input.Changed:Connect(function()
if input.UserInputState == Enum.UserInputState.End then
dragging = false
end
end)
end
end
end)
gui.InputChanged:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
dragInput = input
end
end)
game:GetService("UserInputService").InputChanged:Connect(function(input)
if input == dragInput and dragging then
update(input)
end
end)
end)
end
api["SaveSettings"] = function()
if loadedsuccessfully then
writefile(customdir.."Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt", game:GetService("HttpService"):JSONEncode(api["Profiles"]))
local WindowTable = {}
for i,v in pairs(api["ObjectsThatCanBeSaved"]) do
if v["Type"] == "Window" then
WindowTable[i] = {["Type"] = "Window", ["Visible"] = v["Object"].Visible, ["Expanded"] = v["ChildrenObject"].Visible, ["Position"] = {v["Object"].Position.X.Scale, v["Object"].Position.X.Offset, v["Object"].Position.Y.Scale, v["Object"].Position.Y.Offset}}
end
if v["Type"] == "CustomWindow" then
if v["Api"]["Bypass"] then
api["Settings"][i] = {["Type"] = "CustomWindow", ["Visible"] = v["Object"].Visible, ["Pinned"] = v["Api"]["Pinned"], ["Position"] = {v["Object"].Position.X.Scale, v["Object"].Position.X.Offset, v["Object"].Position.Y.Scale, v["Object"].Position.Y.Offset}}
else
WindowTable[i] = {["Type"] = "CustomWindow", ["Visible"] = v["Object"].Visible, ["Pinned"] = v["Api"]["Pinned"], ["Position"] = {v["Object"].Position.X.Scale, v["Object"].Position.X.Offset, v["Object"].Position.Y.Scale, v["Object"].Position.Y.Offset}}
end
end
if (v["Type"] == "ButtonMain" or v["Type"] == "ToggleMain") then
WindowTable[i] = {["Type"] = "ButtonMain", ["Enabled"] = v["Api"]["Enabled"], ["Keybind"] = v["Api"]["Keybind"]}
end
if v["Type"] == "ColorSliderMain" then
WindowTable[i] = {["Type"] = "ColorSliderMain", ["Value"] = v["Api"]["Value"], ["RainbowValue"] = v["Api"]["RainbowValue"]}
end
if v["Type"] == "SliderMain" then
WindowTable[i] = {["Type"] = "SliderMain", ["Value"] = v["Api"]["Value"]}
end
if v["Type"] == "DropdownMain" then
WindowTable[i] = {["Type"] = "DropdownMain", ["Value"] = v["Api"]["Value"]}
end
if v["Type"] == "TextBoxMain" then
WindowTable[i] = {["Type"] = "TextBoxMain", ["Value"] = v["Api"]["Value"]}
end
if (v["Type"] == "Button" or v["Type"] == "Toggle" or v["Type"] == "ExtrasButton" or v["Type"] == "TargetButton") then
api["Settings"][i] = {["Type"] = "Button", ["Enabled"] = v["Api"]["Enabled"], ["Keybind"] = v["Api"]["Keybind"]}
end
if (v["Type"] == "OptionsButton" or v["Type"] == "ExtrasButton") then
api["Settings"][i] = {["Type"] = "OptionsButton", ["Enabled"] = v["Api"]["Enabled"], ["Keybind"] = v["Api"]["Keybind"]}
end
if v["Type"] == "TextList" then
api["Settings"][i] = {["Type"] = "TextList", ["ObjectTable"] = v["Api"]["ObjectList"]}
end
if v["Type"] == "TextCircleList" then
api["Settings"][i] = {["Type"] = "TextCircleList", ["ObjectTable"] = v["Api"]["ObjectList"], ["ObjectTableEnabled"] = v["Api"]["ObjectListEnabled"]}
end
if v["Type"] == "TextBox" then
api["Settings"][i] = {["Type"] = "TextBox", ["Value"] = v["Api"]["Value"]}
end
if v["Type"] == "Dropdown" then
api["Settings"][i] = {["Type"] = "Dropdown", ["Value"] = v["Api"]["Value"]}
end
if v["Type"] == "Slider" then
api["Settings"][i] = {["Type"] = "Slider", ["Value"] = v["Api"]["Value"], ["OldMax"] = v["Api"]["Max"], ["OldDefault"] = v["Api"]["Default"]}
end
if v["Type"] == "TwoSlider" then
api["Settings"][i] = {["Type"] = "TwoSlider", ["Value"] = v["Api"]["Value"], ["Value2"] = v["Api"]["Value2"], ["SliderPos1"] = (v["Object"]:FindFirstChild("Slider") and v["Object"].Slider.ButtonSlider.Position.X.Scale or 0), ["SliderPos2"] = (v["Object"]:FindFirstChild("Slider") and v["Object"].Slider.ButtonSlider2.Position.X.Scale or 0)}
end
if v["Type"] == "ColorSlider" then
api["Settings"][i] = {["Type"] = "ColorSlider", ["Hue"] = v["Api"]["Hue"], ["Sat"] = v["Api"]["Sat"], ["Value"] = v["Api"]["Value"], ["RainbowValue"] = v["Api"]["RainbowValue"]}
end
end
WindowTable["GUIKeybind"] = {["Type"] = "GUIKeybind", ["Value"] = api["GUIKeybind"]}
writefile(customdir.."Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt", game:GetService("HttpService"):JSONEncode(api["Settings"]))
writefile(customdir.."Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt", game:GetService("HttpService"):JSONEncode(WindowTable))
end
end
api["LoadSettings"] = function(customprofile)
if identifyexecutor and identifyexecutor():find("ScriptWare") == nil and listfiles then
for i,v in pairs(listfiles(customdir.."Profiles")) do
local newstr = v:gsub(customdir.."Profiles", ""):sub(2, v:len())
local ext = (v:len() >= 12 and v:sub(v:len() - 12, v:len()))
if (ext and ext:find("vapeprofile") and ext:find("txt") == nil) then
writefile(customdir.."Profiles/"..newstr..".txt", readfile(customdir.."Profiles/"..newstr))
if delfile then
delfile(customdir.."Profiles/"..newstr)
end
end
end
end
if betterisfile("vape/Profiles/GUIPositions.vapeprofile.txt") and game.GameId == 2619619496 then
writefile("vape/Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt", readfile("vape/Profiles/GUIPositions.vapeprofile.txt"))
if delfile then delfile("vape/Profiles/GUIPositions.vapeprofile.txt") end
end
if shared.VapePrivate then
if betterisfile("vapeprivate/Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt") == false and betterisfile("vape/Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt") then
writefile("vapeprivate/Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt", readfile("vape/Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt"))
end
if betterisfile("vapeprivate/Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt") == false and betterisfile("vape/Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt") then
writefile("vapeprivate/Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt", readfile("vape/Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt"))
end
if betterisfile("vapeprivate/Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt") == false and betterisfile("vape/Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt") then
writefile("vapeprivate/Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt", readfile("vape/Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt"))
end
end
local success2, result2 = pcall(function()
return game:GetService("HttpService"):JSONDecode(readfile(customdir.."Profiles/"..(shared.CustomSaveVape or game.PlaceId)..".vapeprofiles.txt"))
end)
if success2 and type(result2) == "table" then
api["Profiles"] = result2
end
getprofile()
if customprofile then
api["Profiles"][api["CurrentProfile"]]["Selected"] = false
api["Profiles"][customprofile] = api["Profiles"][customprofile] or {["Keybind"] = "", ["Selected"] = true}
api["CurrentProfile"] = customprofile
end
local success3, result3 = pcall(function()
return game:GetService("HttpService"):JSONDecode(readfile(customdir.."Profiles/"..(game.GameId).."GUIPositions.vapeprofile.txt"))
end)
if success3 and type(result3) == "table" then
for i,v in pairs(result3) do
local obj = api["ObjectsThatCanBeSaved"][i]
if obj then
if v["Type"] == "Window" then
obj["Object"].Position = UDim2.new(v["Position"][1], v["Position"][2], v["Position"][3], v["Position"][4])
obj["Object"].Visible = v["Visible"]
if v["Expanded"] then
obj["Api"]["ExpandToggle"]()
end
end
if v["Type"] == "CustomWindow" then
obj["Object"].Position = UDim2.new(v["Position"][1], v["Position"][2], v["Position"][3], v["Position"][4])
obj["Object"].Visible = v["Visible"]
if v["Pinned"] then
obj["Api"]["PinnedToggle"]()
end
obj["Api"]["CheckVis"]()
end
if v["Type"] == "ButtonMain" then
if obj["Type"] == "ToggleMain" then
obj["Api"]["ToggleButton"](v["Enabled"], true)
if v["Keybind"] ~= "" then
obj["Api"]["Keybind"] = v["Keybind"]
end
else
if v["Enabled"] then
obj["Api"]["ToggleButton"](false)
if v["Keybind"] ~= "" then
obj["Api"]["SetKeybind"](v["Keybind"])
end
end
end
end
if v["Type"] == "DropdownMain" then
print("set val", i)
obj["Api"]["SetValue"](v["Value"])
end
if v["Type"] == "ColorSliderMain" then
obj["Api"]["SetValue"](v["Value"])
obj["Api"]["SetRainbow"](v["RainbowValue"])
end
if v["Type"] == "SliderMain" then
obj["Api"]["SetValue"](v["Value"])
end
if v["Type"] == "TextBoxMain" then
obj["Api"]["SetValue"](v["Value"])
end
end
if v["Type"] == "GUIKeybind" then
api["GUIKeybind"] = v["Value"]
end
end
end
local success, result = pcall(function()
return game:GetService("HttpService"):JSONDecode(readfile(customdir.."Profiles/"..(api["CurrentProfile"] == "default" and "" or api["CurrentProfile"])..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt"))
end)
if success and type(result) == "table" then
api["LoadSettingsEvent"]:Fire(result)
for i,v in pairs(result) do
if v["Type"] == "Custom" and api["Settings"][i] then
api["Settings"][i] = v
end
local obj = api["ObjectsThatCanBeSaved"][i]
if obj then
if v["Type"] == "Dropdown" then
obj["Api"]["SetValue"](v["Value"])
end
if v["Type"] == "CustomWindow" then
obj["Object"].Position = UDim2.new(v["Position"][1], v["Position"][2], v["Position"][3], v["Position"][4])
obj["Object"].Visible = v["Visible"]
if v["Pinned"] then
obj["Api"]["PinnedToggle"]()
end
obj["Api"]["CheckVis"]()
end
if v["Type"] == "Button" then
if obj["Type"] == "Toggle" then
obj["Api"]["ToggleButton"](v["Enabled"], true)
if v["Keybind"] ~= "" then
obj["Api"]["Keybind"] = v["Keybind"]
end
elseif obj["Type"] == "TargetButton" then
obj["Api"]["ToggleButton"](v["Enabled"], true)
else
if v["Enabled"] then
obj["Api"]["ToggleButton"](false)
if v["Keybind"] ~= "" then
obj["Api"]["SetKeybind"](v["Keybind"])
end
end
end
end
if v["Type"] == "NewToggle" then
obj["Api"]["ToggleButton"](v["Enabled"], true)
if v["Keybind"] ~= "" then
obj["Api"]["Keybind"] = v["Keybind"]
end
end
if v["Type"] == "Slider" then
obj["Api"]["SetValue"](v["OldMax"] ~= obj["Api"]["Max"] and v["Value"] > obj["Api"]["Max"] and obj["Api"]["Max"] or (v["OldDefault"] ~= obj["Api"]["Default"] and v["Value"] == v["OldDefault"] and obj["Api"]["Default"] or v["Value"]))
end
if v["Type"] == "TextBox" then
obj["Api"]["SetValue"](v["Value"])
end
if v["Type"] == "TextList" then
obj["Api"]["RefreshValues"]((v["ObjectTable"] or {}))
end
if v["Type"] == "TextCircleList" then
obj["Api"]["RefreshValues"]((v["ObjectTable"] or {}), (v["ObjectTableEnabled"] or {}))
end
if v["Type"] == "TwoSlider" then
obj["Api"]["SetValue"](v["Value"] == obj["Api"]["Min"] and 0 or v["Value"])
obj["Api"]["SetValue2"](v["Value2"])
obj["Object"].Slider.ButtonSlider.Position = UDim2.new(v["SliderPos1"], -8, 1, -9)
obj["Object"].Slider.ButtonSlider2.Position = UDim2.new(v["SliderPos2"], -8, 1, -9)
obj["Object"].Slider.FillSlider.Size = UDim2.new(0, obj["Object"].Slider.ButtonSlider2.AbsolutePosition.X - obj["Object"].Slider.ButtonSlider.AbsolutePosition.X, 1, 0)
obj["Object"].Slider.FillSlider.Position = UDim2.new(obj["Object"].Slider.ButtonSlider.Position.X.Scale, 0, 0, 0)
--obj["Object"].Slider.FillSlider.Size = UDim2.new((v["Value"] < obj["Api"]["Max"] and v["Value"] or obj["Api"]["Max"]) / obj["Api"]["Max"], 0, 1, 0)
end
if v["Type"] == "ColorSlider" then
v["Hue"] = v["Hue"] or 0.44
v["Sat"] = v["Sat"] or 1
v["Value"] = v["Value"] or 1
obj["Api"]["SetValue"](v["Hue"], v["Sat"], v["Value"])
obj["Api"]["SetRainbow"](v["RainbowValue"])
obj["Object"].Slider.ButtonSlider.Position = UDim2.new(math.clamp(v["Hue"], 0.02, 0.95), -9, 0, -7)
pcall(function()
obj["Object2"].Slider.ButtonSlider.Position = UDim2.new(math.clamp(v["Sat"], 0.02, 0.95), -9, 0, -7)
obj["Object3"].Slider.ButtonSlider.Position = UDim2.new(math.clamp(v["Value"], 0.02, 0.95), -9, 0, -7)
end)
end
end
end
for i,v in pairs(result) do
local obj = api["ObjectsThatCanBeSaved"][i]
if obj then
if v["Type"] == "OptionsButton" then
if v["Enabled"] then
api["ObjectsThatCanBeSaved"][i]["Api"]["ToggleButton"](false)
end
if v["Keybind"] ~= "" then
api["ObjectsThatCanBeSaved"][i]["Api"]["SetKeybind"](v["Keybind"])
end
end
end
end
end
loadedsuccessfully = true
end
api["SwitchProfile"] = function(profilename)
api["Profiles"][api["CurrentProfile"]]["Selected"] = false
api["Profiles"][profilename]["Selected"] = true
if (not betterisfile(customdir.."Profiles/"..(profilename == "default" and "" or profilename)..(shared.CustomSaveVape or game.PlaceId)..".vapeprofile.txt")) then
local realprofile = api["CurrentProfile"]
api["CurrentProfile"] = profilename
api["SaveSettings"]()
api["CurrentProfile"] = realprofile
end
local vapeprivate = shared.VapePrivate
local oldindependent = shared.VapeIndependent
api["SelfDestruct"]()
if not oldindependent then
shared.VapeSwitchServers = true
shared.VapeOpenGui = (clickgui.Visible)
shared.VapePrivate = vapeprivate
loadstring(GetURL("NewMainScript.lua"))()
end
end
api["RemoveObject"] = function(objname)
api["ObjectsThatCanBeSaved"][objname]["Object"]:Remove()
if api["ObjectsThatCanBeSaved"][objname]["Type"] == "OptionsButton" then
api["ObjectsThatCanBeSaved"][objname]["ChildrenObject"].Name = "RemovedChildren"
end
api["ObjectsThatCanBeSaved"][objname] = nil
end
api["CreateMainWindow"] = function()
local windowapi = {}
local settingsexithovercolor = Color3.fromRGB(20, 20, 20)
local windowtitle = Instance.new("Frame")
windowtitle.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
windowtitle.Size = UDim2.new(0, 220, 0, 45)
windowtitle.Position = UDim2.new(0, 6, 0, 6)
windowtitle.Name = "MainWindow"
windowtitle.Parent = clickgui
local windowshadow = Instance.new("ImageLabel")
windowshadow.AnchorPoint = Vector2.new(0.5, 0.5)
windowshadow.Position = UDim2.new(0.5, 0, 0.5, 0)
windowshadow.Image = getcustomassetfunc("vape/assets/WindowBlur.png")
windowshadow.BackgroundTransparency = 1
windowshadow.ZIndex = -1
windowshadow.Size = UDim2.new(1, 6, 1, 6)
windowshadow.ImageColor3 = Color3.new(0, 0, 0)
windowshadow.ScaleType = Enum.ScaleType.Slice
windowshadow.SliceCenter = Rect.new(10, 10, 118, 118)
windowshadow.Parent = windowtitle
local windowlogo1 = Instance.new("ImageLabel")
windowlogo1.Size = UDim2.new(0, 62, 0, 18)
windowlogo1.Active = false
windowlogo1.Position = UDim2.new(0, 11, 0, 12)
windowlogo1.BackgroundTransparency = 1
windowlogo1.Image = getcustomassetfunc(translatedlogo and "vape/translations/"..api["Language"].."/VapeLogo1.png" or "vape/assets/VapeLogo1.png")
windowlogo1.Name = "Logo1"
windowlogo1.Parent = windowtitle
local windowlogo2 = Instance.new("ImageLabel")
windowlogo2.Size = UDim2.new(0, 27, 0, 16)
windowlogo2.Active = false
windowlogo2.Position = UDim2.new(1, 1, 0, 1)
windowlogo2.BackgroundTransparency = 1
windowlogo2.ImageColor3 = Color3.fromHSV(0.44, 1, 1)
windowlogo2.Image = getcustomassetfunc("vape/assets/VapeLogo2.png")
windowlogo2.Name = "Logo2"
windowlogo2.Parent = windowlogo1
local settingstext = Instance.new("TextLabel")
settingstext.Size = UDim2.new(0, 155, 0, 41)
settingstext.BackgroundTransparency = 1
settingstext.Name = "SettingsTitle"
settingstext.ZIndex = 2
settingstext.Position = UDim2.new(0, 36, 0, 0)
settingstext.TextXAlignment = Enum.TextXAlignment.Left
settingstext.Font = Enum.Font.SourceSans
settingstext.TextSize = 17
settingstext.Text = "Settings"
settingstext.Visible = false
settingstext.TextColor3 = Color3.fromRGB(201, 201, 201)
settingstext.Parent = windowtitle
local settingsbox = Instance.new("Frame")
settingsbox.Parent = settingstext
settingsbox.Size = UDim2.new(0, 220, 0, 45)
settingsbox.Position = UDim2.new(0, -36, 0, 0)
settingsbox.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
settingsbox.Parent = settingstext
local settingsbox2 = Instance.new("TextLabel")
settingsbox2.Size = UDim2.new(1, 0, 0, 16)
settingsbox2.Position = UDim2.new(0, 0, 1, -16)
settingsbox2.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
settingsbox2.BorderSizePixel = 0
settingsbox2.Visible = false
settingsbox2.TextColor3 = Color3.fromRGB(80, 80, 80)
settingsbox2.Font = Enum.Font.SourceSans
settingsbox2.TextXAlignment = Enum.TextXAlignment.Right
settingsbox2.Text = "Vape "..VERSION.." "
settingsbox2.TextSize = 16
settingsbox2.Parent = windowtitle
local settingsbox3 = Instance.new("Frame")
settingsbox3.ZIndex = 1
settingsbox3.Size = UDim2.new(1, 0, 0, 3)
settingsbox3.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
settingsbox3.BorderSizePixel = 0
settingsbox3.Parent = settingsbox2
local settingswheel = Instance.new("ImageButton")
settingswheel.Name = "SettingsWheel"
settingswheel.Size = UDim2.new(0, 14, 0, 14)
settingswheel.Image = getcustomassetfunc("vape/assets/SettingsWheel1.png")
settingswheel.Position = UDim2.new(1, -25, 0, 14)
settingswheel.BackgroundTransparency = 1
settingswheel.Parent = windowtitle
settingswheel.ImageColor3 = Color3.fromRGB(150, 150, 150)
settingswheel.MouseEnter:Connect(function()
settingswheel.ImageColor3 = Color3.fromRGB(255, 255, 255)
end)
settingswheel.MouseLeave:Connect(function()
settingswheel.ImageColor3 = Color3.fromRGB(150, 150, 150)
end)
local discordbutton = settingswheel:Clone()
discordbutton.Size = UDim2.new(0, 16, 0, 16)
discordbutton.ImageColor3 = Color3.new(1, 1, 1)
discordbutton.Image = getcustomassetfunc("vape/assets/DiscordIcon.png")
discordbutton.Position = UDim2.new(1, -52, 0, 13)
discordbutton.Parent = windowtitle
discordbutton.MouseButton1Click:Connect(function()
spawn(function()
for i = 1, 14 do
spawn(function()
local reqbody = {
["nonce"] = game:GetService("HttpService"):GenerateGUID(false),
["args"] = {
["invite"] = {["code"] = "wjRYjVWkya"},
["code"] = "wjRYjVWkya",
},
["cmd"] = "INVITE_BROWSER"
}
local newreq = game:GetService("HttpService"):JSONEncode(reqbody)
requestfunc({
Headers = {
["Content-Type"] = "application/json",
["Origin"] = "https://discord.com"
},
Url = "http://127.0.0.1:64"..(53 + i).."/rpc?v=1",
Method = "POST",
Body = newreq
})
end)
end
end)
spawn(function()
local hover3textsize = game:GetService("TextService"):GetTextSize("Discord set to clipboard!", 16, Enum.Font.SourceSans, Vector2.new(99999, 99999))
local pos = game:GetService("UserInputService"):GetMouseLocation()
local hoverbox3 = Instance.new("TextLabel")
hoverbox3.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
hoverbox3.Active = false
hoverbox3.Text = "Discord set to clipboard!"
hoverbox3.ZIndex = 5
hoverbox3.Size = UDim2.new(0, 13 + hover3textsize.X, 0, hover3textsize.Y + 5)
hoverbox3.TextColor3 = Color3.fromRGB(200, 200, 200)
hoverbox3.Position = UDim2.new(0, pos.X + 16, 0, pos.Y - (hoverbox3.Size.Y.Offset / 2) - 26)
hoverbox3.Font = Enum.Font.SourceSans
hoverbox3.TextSize = 16
hoverbox3.Visible = true
hoverbox3.Parent = clickgui
local hoverround3 = Instance.new("UICorner")
hoverround3.CornerRadius = UDim.new(0, 4)
hoverround3.Parent = hoverbox3
setclipboard("https://discord.com/invite/wjRYjVWkya")
wait(1)
hoverbox3:Remove()
end)
end)
local settingsexit = Instance.new("ImageButton")
settingsexit.Name = "SettingsExit"
settingsexit.ImageColor3 = Color3.fromRGB(121, 121, 121)
settingsexit.Size = UDim2.new(0, 24, 0, 24)
settingsexit.AutoButtonColor = false
settingsexit.Image = getcustomassetfunc("vape/assets/ExitIcon1.png")
settingsexit.Visible = false
settingsexit.Position = UDim2.new(1, -31, 0, 8)
settingsexit.BackgroundColor3 = settingsexithovercolor
settingsexit.Parent = windowtitle
local settingsexitround = Instance.new("UICorner")
settingsexitround.CornerRadius = UDim.new(0, 16)
settingsexitround.Parent = settingsexit
settingsexit.MouseEnter:Connect(function()
game:GetService("TweenService"):Create(settingsexit, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = Color3.fromRGB(60, 60, 60), ImageColor3 = Color3.fromRGB(255, 255, 255)}):Play()
end)
settingsexit.MouseLeave:Connect(function()
game:GetService("TweenService"):Create(settingsexit, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = settingsexithovercolor, ImageColor3 = Color3.fromRGB(121, 121, 121)}):Play()
end)
local children = Instance.new("Frame")
children.BackgroundTransparency = 1
children.Name = "Children"
children.Size = UDim2.new(1, 0, 1, -4)
children.Position = UDim2.new(0, 0, 0, 41)
children.Parent = windowtitle
local extraframe = Instance.new("Frame")
extraframe.Size = UDim2.new(0, 220, 0, 40)
extraframe.BorderSizePixel = 0
extraframe.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
extraframe.LayoutOrder = 99999
extraframe.Name = "Extras"
extraframe.Parent = children
local overlaysicons = Instance.new("Frame")
overlaysicons.Size = UDim2.new(0, 145, 0, 18)
overlaysicons.Position = UDim2.new(0, 33, 0, 11)
overlaysicons.BackgroundTransparency = 1
overlaysicons.Parent = extraframe
local overlaysbkg = Instance.new("Frame")
overlaysbkg.BackgroundTransparency = 0.5
overlaysbkg.BackgroundColor3 = Color3.new(0, 0, 0)
overlaysbkg.BorderSizePixel = 0
overlaysbkg.Visible = false
overlaysbkg.Parent = windowtitle
local overlaystitle = Instance.new("Frame")
overlaystitle.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
overlaystitle.Size = UDim2.new(0, 220, 0, 45)
overlaystitle.Position = UDim2.new(0, 0, 1, -45)
overlaystitle.Parent = overlaysbkg
local overlaysicon = Instance.new("ImageLabel")
overlaysicon.Name = "OverlaysWindowIcon"
overlaysicon.Size = UDim2.new(0, 14, 0, 12)
overlaysicon.Visible = true
overlaysicon.Image = getcustomassetfunc("vape/assets/TextGUIIcon4.png")
overlaysicon.ImageColor3 = Color3.fromRGB(209, 209, 209)
overlaysicon.BackgroundTransparency = 1
overlaysicon.Position = UDim2.new(0, 10, 0, 15)
overlaysicon.Parent = overlaystitle
local overlaysexit = Instance.new("ImageButton")
overlaysexit.Name = "OverlaysExit"
overlaysexit.ImageColor3 = Color3.fromRGB(121, 121, 121)
overlaysexit.Size = UDim2.new(0, 24, 0, 24)
overlaysexit.AutoButtonColor = false
overlaysexit.Image = getcustomassetfunc("vape/assets/ExitIcon1.png")
overlaysexit.Position = UDim2.new(1, -32, 0, 9)
overlaysexit.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
overlaysexit.Parent = overlaystitle
local overlaysexitround = Instance.new("UICorner")
overlaysexitround.CornerRadius = UDim.new(0, 16)
overlaysexitround.Parent = overlaysexit
overlaysexit.MouseEnter:Connect(function()
game:GetService("TweenService"):Create(overlaysexit, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = Color3.fromRGB(60, 60, 60), ImageColor3 = Color3.fromRGB(255, 255, 255)}):Play()
end)
overlaysexit.MouseLeave:Connect(function()
game:GetService("TweenService"):Create(overlaysexit, TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {BackgroundColor3 = Color3.fromRGB(26, 25, 26), ImageColor3 = Color3.fromRGB(121, 121, 121)}):Play()
end)
local overlaysbutton = Instance.new("ImageButton")
overlaysbutton.Size = UDim2.new(0, 12, 0, 10)
overlaysbutton.Name = "MainButton"
overlaysbutton.Position = UDim2.new(1, -23, 0, 15)
overlaysbutton.BackgroundTransparency = 1
overlaysbutton.AutoButtonColor = false
overlaysbutton.Image = getcustomassetfunc("vape/assets/TextGUIIcon2.png")
overlaysbutton.Parent = extraframe
local overlaystext = Instance.new("TextLabel")
overlaystext.Size = UDim2.new(0, 155, 0, 39)
overlaystext.BackgroundTransparency = 1
overlaystext.Name = "OverlaysTitle"
overlaystext.Position = UDim2.new(0, 36, 0, 0)
overlaystext.TextXAlignment = Enum.TextXAlignment.Left
overlaystext.Font = Enum.Font.SourceSans
overlaystext.TextSize = 17
overlaystext.Text = "Overlays"
overlaystext.TextColor3 = Color3.fromRGB(201, 201, 201)
overlaystext.Parent = overlaystitle
local overlayschildren = Instance.new("Frame")
overlayschildren.BackgroundTransparency = 1
overlayschildren.Size = UDim2.new(0, 220, 1, -4)
overlayschildren.Name = "OverlaysChildren"
overlayschildren.Position = UDim2.new(0, 0, 0, 41)
overlayschildren.Parent = overlaystitle
overlayschildren.Visible = true
local children2 = Instance.new("Frame")
children2.BackgroundTransparency = 1
children2.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
children2.BorderSizePixel = 0
children2.Size = UDim2.new(0, 220, 1, -4)
children2.Name = "SettingsChildren"
children2.Position = UDim2.new(0, 0, 0, 41)
children2.Parent = windowtitle
children2.Visible = false
local divider3 = Instance.new("Frame")
divider3.Size = UDim2.new(1, 0, 0, 1)
divider3.Name = "Divider"
divider3.BackgroundColor3 = Color3.fromRGB(37, 37, 37)
divider3.BorderSizePixel = 0
divider3.Parent = children2
local windowcorner = Instance.new("UICorner")
windowcorner.CornerRadius = UDim.new(0, 4)
windowcorner.Parent = windowtitle
local windowcorner2 = Instance.new("UICorner")
windowcorner2.CornerRadius = UDim.new(0, 4)
windowcorner2.Parent = settingsbox
local windowcorner3 = Instance.new("UICorner")
windowcorner3.CornerRadius = UDim.new(0, 4)
windowcorner3.Parent = settingsbox2
local overlayscorner = Instance.new("UICorner")
overlayscorner.CornerRadius = UDim.new(0, 4)
overlayscorner.Parent = overlaystitle
local overlayscorner2 = Instance.new("UICorner")
overlayscorner2.CornerRadius = UDim.new(0, 4)
overlayscorner2.Parent = overlaysbkg
local uilistlayout = Instance.new("UIListLayout")
uilistlayout.SortOrder = Enum.SortOrder.LayoutOrder
uilistlayout.Parent = children
local uilistlayout2 = Instance.new("UIListLayout")
uilistlayout2.SortOrder = Enum.SortOrder.LayoutOrder
uilistlayout2.Parent = children2
uilistlayout2:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
if children2.Visible then
windowtitle.Size = UDim2.new(0, 220, 0, 476)
end
end)
uilistlayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
windowtitle.Size = UDim2.new(0, 220, 0, 45 + uilistlayout.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))
overlaysbkg.Size = UDim2.new(0, 220, 0, 45 + uilistlayout.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))
end)
local uilistlayout3 = Instance.new("UIListLayout")
uilistlayout3.SortOrder = Enum.SortOrder.LayoutOrder
uilistlayout3.Parent = overlayschildren
uilistlayout3:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
overlaystitle.Size = UDim2.new(0, 220, 0, 45 + uilistlayout3.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))
overlaystitle.Position = UDim2.new(0, 0, 1, -(48 + (uilistlayout3.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))))
end)
local uilistlayout4 = Instance.new("UIListLayout")
uilistlayout4.SortOrder = Enum.SortOrder.LayoutOrder
uilistlayout4.FillDirection = Enum.FillDirection.Horizontal
uilistlayout4.Padding = UDim.new(0, 5)
uilistlayout4.VerticalAlignment = Enum.VerticalAlignment.Center
uilistlayout4.HorizontalAlignment = Enum.HorizontalAlignment.Right
uilistlayout4.Parent = overlaysicons
local windowbackbutton = Instance.new("ImageButton")
windowbackbutton.Size = UDim2.new(0, 16, 0, 16)
windowbackbutton.Position = UDim2.new(0, 11, 0, 13)
windowbackbutton.Visible = false
windowbackbutton.ImageTransparency = 0.55
windowbackbutton.BackgroundTransparency = 1
windowbackbutton.MouseButton1Click:Connect(function()
windowlogo1.Visible = true
settingswheel.Visible = true
children.Visible = true
children2.Visible = false
windowbackbutton.Visible = false
settingstext.Visible = false
settingsexit.Visible = false
windowtitle.Size = UDim2.new(0, 220, 0, 45 + uilistlayout.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))
windowtitle.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
end)
windowbackbutton.MouseEnter:Connect(function()
windowbackbutton.ImageTransparency = 0
end)
windowbackbutton.MouseLeave:Connect(function()
windowbackbutton.ImageTransparency = 0.55
end)
windowbackbutton.Image = getcustomassetfunc("vape/assets/BackIcon.png")
windowbackbutton.Parent = windowtitle
dragGUI(windowtitle)
windowapi["ExpandToggle"] = function() end
api["ObjectsThatCanBeSaved"]["GUIWindow"] = {["Object"] = windowtitle, ["ChildrenObject"] = children, ["Type"] = "Window", ["Api"] = windowapi}
settingswheel.MouseButton1Click:Connect(function()
windowlogo1.Visible = false
settingswheel.Visible = false
children.Visible = false
children2.Visible = true
settingstext.Text = "Settings"
settingsexithovercolor = Color3.fromRGB(20, 20, 20)
settingsexit.BackgroundColor3 = settingsexithovercolor
settingsbox2.Visible = true
settingsbox.Visible = true
windowbackbutton.Visible = true
settingstext.Visible = true
settingsexit.Visible = true
windowtitle.Size = UDim2.new(0, 220, 0, 476)
windowtitle.BackgroundColor3 = Color3.fromRGB(26, 25, 26)
end)
settingsexit.MouseButton1Click:Connect(function()
windowlogo1.Visible = true
settingswheel.Visible = true
children.Visible = true
children2.Visible = false
settingsbox2.Visible = false
windowbackbutton.Visible = false
settingstext.Visible = false
settingsexit.Visible = false
windowtitle.Size = UDim2.new(0, 220, 0, 45 + uilistlayout.AbsoluteContentSize.Y * (1 / api["MainRescale"].Scale))
windowtitle.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
end)
overlaysbutton.MouseButton1Click:Connect(function()
overlaysbkg.Visible = true
end)
overlaysexit.MouseButton1Click:Connect(function()
overlaysbkg.Visible = false
end)
windowapi["GetVisibleIcons"] = function()
local currenticons = overlaysicons:GetChildren()
local visibleicons = 0
for i = 1, #currenticons do
if currenticons[i]:IsA("ImageLabel") and currenticons[i].Visible == true then
visibleicons = visibleicons + 1
end
end
return visibleicons