forked from bloodball/UI-Librarys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pepsi.lua
6461 lines (6461 loc) · 284 KB
/
pepsi.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
--[[ Pepsi's UI Library
Library v0.33 [
CreateWindow: Function (
(table | nil) Options [
(string | nil) Name = "Window Name"
(JSON | nil) DefaultTheme/Theme = "[...]"
(boolean | nil) Themeable/DefaultTheme/Theme = true or false | Options [
(string | number | nil) Image = "rbxassetid://7483871523" | 7483871523
(boolean | nil) Credit = true or false // You're removing my credits? Kinda hurts.
(string | table | nil) Info = "Extra info displayed in designer" | Lines ["line 1", "line 2", "line 3", "and so on..."]
(string | number | table | nil) Background/Backdrop/Grahpic = "rbxassetid://13337" | 13337 | Options [
(string | number | nil) 1/Asset = "rbxassetid://13337" | 13337
(number | nil) 2/Transparency = 0.5 | 50 // Both examples will make the backdrop half visible
(boolean | number | nil) 3/Visible = true or false | 1 or 0 // 1: true, 0: false
]
]
]
) -> Window [
CreateTab: Function (
(table | nil) Options [
(string | nil) Name = "Tab Name"
(string | number | nil) Image = "rbxassetid://133337" | 133337
]
) -> Tab [
CreateSection: Function (
(table) Options [
(string | nil) Name = "Section Name"
(string | nil) Side = "Left" or "Right"
]
) -> Section [
AddLabel: Function (
(table) Options [
(string | nil) Text/Value/Name = "Label Text"
(string | nil) Flag = "FlagName"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
]
) -> Label [
Options: Table
Name: String
Type: String
Default: String
Parent: Section
Instance: Instance
Set: Function (NewText) -> NewText
RawSet: Function (NewText) -> NewText // Same function as Set. For backwards compatibility.
Reset: Function -> DefaultText
Get: Function -> CurrentText
Update: Function -> CurrentText // Same function as Get, exists for compat.
]
AddToggle: Function (
(table) Options [
(string) Name = "Toggle Name"
(boolean | nil) Value/Enabled = true or false
(function | nil) Callback = Function (NewValue, OldValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(boolean | nil) Locked = true or false
(table | boolean | EnumItem | nil) Keybind/Key/KeyBind = Keybind [
(string | nil) Flag = "ToggleKeybindFlag"
(EnumItem | nil) Value = Enum.KeyCode.F
(function | nil) Callback = Function (NewValue, OldValue)
(function | nil) Pressed = Function
(string | nil) Mode = "Dynamic" or "Hold" or "Toggle"
(number | nil) DynamicTime = 0.65
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(table | nil) KeyNames = Table
]
(function | nil) Condition = Function (NewValue, LastValue) // Will only allow the toggle state to be changed, if this function returns true
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> ToggleInfo [
Options: Table
Type: String
Name: String
Default: Boolean
Parent: Section
Instance: Instance
SetLocked: Function (LockedState) -> LockState
Unlock: function
Lock: Function
Update: Function -> CurrentValue
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue, Condition) -> NewValue // Sets the flag without firing the callback
Reset: Function -> DefaultText
Get: Function -> CurrentValue
SetCondition: Function (NewCondition) -> NewCondition
]
AddTextbox: Function (
(table) Options [
(string) Name = "Textbox Name"
(string | number) Value = "String" or 1337
(function | nil) Callback = Function (NewValue, OldValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(string | nil) Placeholder = "Text to display by default"
(string | nil) Type = "number"
(number | nil) Min = 0
(number | nil) Max = 100
(number | nil) Decimals/Precision/Precise = 2
(boolean | nil) Hex = true or false
(boolean | nil) Binary = true or false
(number | nil) Base = 10
(boolean | nil) Rich/RichText/RichTextBox = true or false
(boolean | nil) Lines/MultiLine = true or false
(boolean | nil) Scaled/TextScaled = true or false
(EnumItem | nil) Font/TextFont = Enum.Font.Code
(function | nil) PreFormat = Function (Value)
(function | nil) PostFormat = Function (Value)
(table | nil) CustomProperties = Properties [
TextTruncate = Enum.TextTruncate.None
]
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Textbox [
Options: Table
Name: String
Type: String
Default: String/Number
Parent: Section
Instance: Textbox
Update: Function -> CurrentValue
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Sets the flag without firing the callback
Reset: Function -> DefaultText
Get: Function -> CurrentValue
]
AddSlider: Function (
(table) Options [
(string) Name = "Slider Name"
(number | nil) Value = 0
(function | nil) Callback = Function (Value, OldValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(number) Min = 0
(number) Max = 100
(number | nil) Decimals/Precision/Precise = 2
(string | function | nil) Format = "Value %s" | Function (Value, LastValue)
(boolean | nil) IllegalInput = true or false // Allow textbox to break min & max limits
(boolean | table | nil) Textbox/InputBox/CustomInput = true | Options [
(boolean | nil) Hex = true or false
(boolean | nil) Binary = true or false
(number | nil) Base = 10
(function | nil) PreFormat = Function (Value)
(function | nil) PostFormat = Function (Value)
(boolean | nil) IllegalInput = true or false // Allow textbox to break min & max limits
]
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Slider [
Options: Table
Name: String
Type: String
Default: Number
Parent: Section
Instance: Instance
Update: Function (FromValue) -> CurrentValue
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Changes value without firing callback
Reset: Function -> DefaultText
Get: Function -> CurrentValue
SetConstraints: Function (NewMin, NewMax)
SetMin: Function (NewMin)
SetMax: Function (NewMax)
]
AddButton: Function (
(table) Options [
(string) Name = "Button Name"
(function | nil) Callback = Function (NumPresses)
(boolean | nil) Locked = true or false
(function | nil) Condition = Function (NumPresses) // Will only allow the button to be pressed, if this function returns true
]
(table | nil) Options ...
) -> Buttons [
Options: Table
Name: String
Type: String
Parent: Section
Instance: Instance
Update: Function -> ButtonName
Press: Function (...)
SetLocked: Function (LockedState) -> LockState
Unlock: function
Lock: Function
SetCondition: Function(NewCondition) -> NewCondition
RawPress: Function (...) // Does not update press count
Get: Function -> Callback, NumPresses
SetText: Function (NewText) -> NewText
SetCallback: Function (NewCallback) -> NewCallback
]
AddKeybind: Function (
(table) Options [
(string) Name = "Keybind Name"
(EnumItem | nil) Value = Enum.KeyCode.F
(function | nil) Callback = Function (NewValue, OldValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(function | nil) Pressed = Function (InputObject, GameProcessed)
(table | nil) KeyNames = Table
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Keybind [
Options: Table
Name: String
Type: String
Parent: Section
Instance: Instance
Update: Function
Set: Function (NewValue) -> NewValue
Reset: Function -> DefaultText
Get: Function -> CurrentValue
]
AddDropdown: Function (
(table) Options [
(string) Name = "Dropdown Name"
(any) Value = Value
(function | nil) Callback = Function (NewValue, LastValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(table | Instance | Enum | function) List = Table | workspace | Enum.Font | Function () -> New List
(string | function | table | nil) Filter = "StringToMatch" | Function (ValueToCheck) | Table [
(boolean | nil) [0] = InverseBool
(any) [1] ... = "StringToMatch" | Enum.Font.Code/ValuesToMatch
]
(string | function | table | nil) Method = "GetDescendants" | workspace.GetDescendants | Parameters [
(string | function) [1/Method] = "GetFriendsOnline" | Player.GetFriendsOnline
(any) [1/2/Args/Arguments] ... = 50
]
(string | nil) BlankValue/NoValueString/Nothing = "No Selection"
(boolean | function | nil) Sort = true or false | Function
(boolean | string | nil) Multi/Multiple/MultiSelect = true or false | "Text to display"
(function | nil) ItemAdded/AddedCallback = Function (Item, AllItems)
(function | nil) ItemRemoved/RemovedCallback = Function (Item, AllItems)
(function | nil) ItemChanged/ChangedCallback = Function (Item, SelectedState, Items)
(function | nil) ItemsCleared/ClearedCallback = Function (Items, PreviousItems)
(EnumItem/Keycode | nil) ScrollUpButton = Enum.KeyCode.Up // Default is Enum.KeyCode.Up
(EnumItem/Keycode | nil) ScrollDownButton = Enum.KeyCode.Down // Default is Enum.KeyCode.Down
(number | nil) ScrollButtonRate / ScrollRate = 5 // How fast the scroller goes by pressing the scroll buttons
(bool | nil) DisablePrecisionScrolling = true or false // Dissallows use of keys to control pan
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Dropdown [
Options: Table
Name: String
Type: String
Default: Value
Parent: Section
Instance: Instance
Update: Function
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Sets value without firing callback
Reset: Function -> DefaultValue
Get: Function -> CurrentValue
UpdateList: Function (
(table | Instance | Enum | function) List = Table | workspace | Enum.Font | Function () -> New List
(boolean | nil) ValidateValues = true or false | nil // When set to true, will call Validate() on it
) -> NewList
Validate: Function (
(any | nil) InvalidValue = "Optional value to be set, if the list's current value is no longer in list"
) -> IsValidBool
]
AddSearchBox: Function (
(table) Options [
(string) Name = "SearchBox Name"
(any) Value = Value
(function | nil) Callback = Function (NewValue, LastValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(table | Instance | Enum | function) List = Table | workspace | Enum.Font | Function () -> New List
(string | function | table | nil) Filter = "StringToMatch" | Function (ValueToCheck) | Table [
(boolean | nil) [0] = InverseBool
(string | any | nil) [1] ... = "StringToMatch" | Enum.Font.Code
]
(string | function | table | nil) Method = "GetDescendants" | workspace.GetDescendants | Parameters [
(string | function) [1/Method] = "GetFriendsOnline" | Player.GetFriendsOnline
(any) [1/2/Args/Arguments] ... = 50
]
(boolean | function | nil) Sort = true or false | Function
(string | nil) BlankValue/NoValueString/Nothing = "No Selection"
(boolean | string | nil) Multi/Multiple/MultiSelect = true or false | "Text to display"
(function | nil) ItemAdded/AddedCallback = Function (Item, AllItems)
(function | nil) ItemRemoved/RemovedCallback = Function (Item, AllItems)
(function | nil) ItemChanged/ChangedCallback = Function (Item, SelectedState, Items)
(function | nil) ItemsCleared/ClearedCallback = Function (Items, PreviousItems)
(EnumItem/Keycode | nil) ScrollUpButton = Enum.KeyCode.Up // Default is Enum.KeyCode.Up
(EnumItem/Keycode | nil) ScrollDownButton = Enum.KeyCode.Down // Default is Enum.KeyCode.Down
(number | nil) ScrollButtonRate / ScrollRate = 5 // How fast the scroller goes by pressing the scroll buttons
(bool | nil) DisablePrecisionScrolling = true or false // Dissallows use of keys to control pan
(boolean | nil) RegEx = true or false // Enables use of %d and %w, etc (False by default)
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> SearchBox [
Options: Table
Name: String
Type: String
Default: Value
Parent: Section
Instance: Instance
Update: Function
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Sets value without firing callback
Reset: Function -> DefaultValue
Get: Function -> CurrentValue
UpdateList: Function (
(table | Instance | Enum | function) List = Table | workspace | Enum.Font | Function () -> New List
(boolean | nil) ValidateValues = true or false | nil // When set to true, will call Validate() on it
) -> NewList
Validate: Function (
(any | nil) InvalidValue = "Optional value to be set, if the list's current value is no longer in list"
) -> IsValidBool
]
AddColorpicker: Function (
(table) Options [
(string) Name = "Colorpicker Name"
(string | Color3 | nil) Value = "rainbow" or "random" | Color3.new()
(function | nil) Callback = Function (NewValue, LastValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(boolean | nil) Rainbow = true or false
(boolean | nil) Random = true or false
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Colorpicker [
Options: Table
Name: String
Type: String
Default: Color3
Parent: Section
Instance: Instance
Update: Function
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Sets value without firing callback
Reset: Function -> DefaultColor
Get: Function -> CurrentValue
SetRainbow: Function (
(boolean | nil) RainbowMode = true or false
)
]
AddPersistence: Function (
(table) Options [
(string) Name = "Persistence Name"
(string | nil) Value = "FileName"
(function | nil) Callback = Function (NewValue, LastValue)
(string | nil) Flag = "FlagName"
(table | nil) Location = Table
(string | nil) LocationFlag = "LocationFlag"
(any) UnloadValue = UnloadValue
(function | nil) UnloadFunc = Function
(string | nil) Workspace = "FolderName"
(boolean | string | number | table | nil) Persistive/Flags = true | "all" | 1 (Window) or 2 (Tab) or 3 (Section) | FlagNames [...]
(string | nil) Suffix = "Mods"
(function | nil) LoadCallback = Function (FilePath, FileName) // 'PreLoad'
(function | nil) SaveCallback = Function (FilePath, FileName)
(function | nil) PostLoadCallback = Function (FilePath, FileName)
(function | nil) PostSaveCallback = Function (FilePath, FileName)
(EnumItem/Keycode | nil) ScrollUpButton = Enum.KeyCode.Up // Default is Enum.KeyCode.Up
(EnumItem/Keycode | nil) ScrollDownButton = Enum.KeyCode.Down // Default is Enum.KeyCode.Down
(number | nil) ScrollButtonRate / ScrollRate = 5 // How fast the scroller goes by pressing the scroll buttons
(bool | nil) DisablePrecisionScrolling = true or false // Dissallows use of keys to control pan
(boolean | nil) AllowDuplicateCalls = true or false // Allow the callback to be fired with same value set()
]
) -> Persistence [
Options: Table
Name: String
Type: String
Default: Value
Parent: Section
Instance: Instance
Update: Function
Set: Function (NewValue) -> NewValue
RawSet: Function (NewValue) -> NewValue // Sets value without firing callback
Reset: Function -> DefaultFile
Get: Function -> CurrentValue
SaveFile: Function (FileName) // Mimics the Save Button with optional file input
LoadFile: Function (FileName) // Mimics the Load Button with optional file input
LoadJSON: Function (JSON) // Mimics the Load Button with specific json
LoadFileRaw: Function (FileName) // Mimics the Load Button with optional file input using Obj:RawSet
LoadJSONRaw: Function (JSON) // Mimics the Load Button with specific json using Obj:RawSet
GetJSON: Function (Func) // Gets the json, and passes it as the first argument of Func. Set to true to use setclipboard
]
]
Flags: Table
]
CreateDesigner: Function (
(table) Options [
(string | number | table | nil) Background/Backdrop/Grahpic = "rbxassetid://13337" | 13337 | Options [
(string | number | nil) 1/Asset = "rbxassetid://13337" | 13337
(number | nil) 2/Transparency = 0.5 | 50 // Both examples will make the backdrop half visible
(boolean | number | nil) 3/Visible = true or false | 1 or 0 // 1: true, 0: false
]
(string | number | nil) Image = "rbxassetid://7483871523" | 7483871523
(string | table | nil) Info = "Extra info displayed in designer" | Lines ["line 1", "line 2", "line 3", "and so on..."]
(boolean | nil) Credit = true
]
) -> Designer [
Options: Table
Parent: Window
Name: String
Type: String
Instance: Instance,
SetBackground: Function (
(string | boolean | number | nil) AssetString = "rbxassetid://7483871523" | true or false (as Visible arg) | 7483871523 or transparency (0-100 or 0-1) | nil (Toggle visibility)
(number | boolean | nil) Transparency = 0.7 or 70 | true or false (as Visible arg)
(number | boolean | nil) Visible = true/1 or false/0 | nil (Dont change)
)
]
MoveTabSlider: Function (
(Instance) tabObject = tabVar
)
GoHome: Function
Flags: Table
]
Designer: Designer
LP: LocalPlayer
Players: game.Players
Mouse: LP:GetMouse()
Unload: Function
ResetAll: Function // Resets all elements to their default value
SaveFile: Function (FileName) // Only if designer is present; this would save all non-deisgner elements
LoadFile: Function (FileName)
LoadJSON: Function (JSON)
LoadFileRaw: Function (FileName)
LoadJSONRaw: Function (JSON)
GetJSON: Function (Func)
signals: Table // All :connection()'s go in that table, and are disconnected upon unloading the gui. Feel free to add yours here, too
(function | nil) UnloadCallback = Function
(EnumItem/Keycode | nil) scrollupbutton = Enum.KeyCode.Up // Default is Enum.KeyCode.Up
(EnumItem/Keycode | nil) scrolldownbutton = Enum.KeyCode.Down // Default is Enum.KeyCode.Down
Subs: Shared Functions [
updatecolors: Function // Re-Applys all colors from designer
Wait: Function (Time) // Only waits & returns true if the library has not been unloaded
removeSpaces: Function (String)
Color3ToHex: Function (Color3)
Color3FromHex: Function (String/Hex)
textToSize: Function (String)
Instance_new: Function (Class, Parent) // Automatically protects instances with syn.protect_gui, and adds the instance to library.objects (all objects destroyed when unloading)
]
]
]]
local library = {
Version = "0.33",
WorkspaceName = "Pepsi Lib",
flags = {},
signals = {},
objects = {},
elements = {},
globals = {},
subs = {},
colored = {},
configuration = {
hideKeybind = Enum.KeyCode.RightShift,
smoothDragging = false,
easingStyle = Enum.EasingStyle.Quart,
easingDirection = Enum.EasingDirection.Out
},
colors = {
main = Color3.fromRGB(255, 39, 39),
background = Color3.fromRGB(40, 40, 40),
outerBorder = Color3.fromRGB(15, 15, 15),
innerBorder = Color3.fromRGB(73, 63, 73),
topGradient = Color3.fromRGB(35, 35, 35),
bottomGradient = Color3.fromRGB(29, 29, 29),
sectionBackground = Color3.fromRGB(35, 34, 34),
section = Color3.fromRGB(176, 175, 176),
otherElementText = Color3.fromRGB(129, 127, 129),
elementText = Color3.fromRGB(147, 145, 147),
elementBorder = Color3.fromRGB(20, 20, 20),
selectedOption = Color3.fromRGB(55, 55, 55),
unselectedOption = Color3.fromRGB(40, 40, 40),
hoveredOptionTop = Color3.fromRGB(65, 65, 65),
unhoveredOptionTop = Color3.fromRGB(50, 50, 50),
hoveredOptionBottom = Color3.fromRGB(45, 45, 45),
unhoveredOptionBottom = Color3.fromRGB(35, 35, 35),
tabText = Color3.fromRGB(185, 185, 185)
},
gui_parent = (function()
local x, c = pcall(function()
return game:GetService("CoreGui")
end)
if x and c then
return c
end
x, c = pcall(function()
return (game:IsLoaded() or (game.Loaded:Wait() or 1)) and game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
end)
if x and c then
return c
end
x, c = pcall(function()
return game:GetService("StarterGui")
end)
if x and c then
return c
end
return error("Seriously bad exploit. Can't find a place to store the GUI. Robust code can't help here.")
end)(),
colorpicker = false,
colorpickerconflicts = {},
rainbowflags = {},
rainbows = 0,
rainbowsg = 0
}
library.Subs = library.subs
local library_flags = library.flags
local destroyrainbows, destroyrainbowsg = nil
function darkenColor(clr, intensity)
return clr
-- if not intensity or intensity == 1 then
-- return clr
-- end
-- if clr and (typeof(clr) == "Color3" or type(clr) == "table") then
-- return Color3.new(clr.R / intensity, clr.G / intensity, clr.B / intensity)
-- end
end
library.subs.darkenColor = darkenColor
local __runscript = true
local function wait_check(...)
if __runscript then
return wait(...)
else
wait()
return false
end
end
library.subs.Wait, library.subs.wait = wait_check, wait_check
local lasthidebing = 0
local temp = game:FindService("MarketplaceService") or game:GetService("MarketplaceService")
local Marketplace = (temp and (cloneref and cloneref(temp))) or temp
local resolvevararg, temp = nil
do
local lwr = string.lower
function library.defaultSort(a, b)
return lwr(tostring(b)) > lwr(tostring(a))
end
end
do
local varargresolve = {
Window = {"Name", "Theme"},
Tab = {"Name", "Image"},
Section = {"Name", "Side"},
Label = {"Text", "Flag", "UnloadValue", "UnloadFunc"},
Toggle = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Locked", "Keybind", "Condition", "AllowDuplicateCalls"},
Textbox = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Placeholder", "Type", "Min", "Max", "Decimals", "Hex", "Binary", "Base", "RichTextBox", "MultiLine", "TextScaled", "TextFont", "PreFormat", "PostFormat", "CustomProperties", "AllowDuplicateCalls"},
Slider = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Min", "Max", "Decimals", "Format", "IllegalInput", "Textbox", "AllowDuplicateCalls"},
Button = {"Name", "Callback", "Locked", "Condition"},
Keybind = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Pressed", "KeyNames", "AllowDuplicateCalls"},
Dropdown = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "List", "Filter", "Method", "Nothing", "Sort", "MultiSelect", "ItemAdded", "ItemRemoved", "ItemChanged", "ItemsCleared", "ScrollUpButton", "ScrollDownButton", "ScrollButtonRate", "DisablePrecisionScrolling", "AllowDuplicateCalls"},
SearchBox = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "List", "Filter", "Method", "Nothing", "Sort", "MultiSelect", "ItemAdded", "ItemRemoved", "ItemChanged", "ItemsCleared", "ScrollUpButton", "ScrollDownButton", "ScrollButtonRate", "DisablePrecisionScrolling", "RegEx", "AllowDuplicateCalls"},
Colorpicker = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Rainbow", "Random", "AllowDuplicateCalls"},
Persistence = {"Name", "Value", "Callback", "Flag", "Location", "LocationFlag", "UnloadValue", "UnloadFunc", "Workspace", "Persistive", "Suffix", "LoadCallback", "SaveCallback", "PostLoadCallback", "PostSaveCallback", "ScrollUpButton", "ScrollDownButton", "ScrollButtonRate", "DisablePrecisionScrolling", "AllowDuplicateCalls"},
Designer = {"Backdrop", "Image", "Info", "Credit"}
}
function resolvevararg(objtype, ...)
local data = varargresolve[objtype]
local t = {}
if data then
for index, value in next, {...} do
t[data[index]] = value
end
end
return t
end
end
local resolvercache = {}
library.resolvercache = resolvercache
local function resolveid(image, flag)
if image then
if type(image) == "string" then
if (#image > 14 and string.sub(image, 1, 13) == "rbxassetid://") or (#image > 12 and string.sub(image, 1, 11) == "rbxasset://") or (#image > 12 and string.sub(image, 1, 11) ~= "rbxthumb://") then
if flag then
local thing = library.elements[flag] or library.designerelements[flag]
if thing and thing.Set then
task.spawn(thing.Set, thing, image)
end
end
return image
end
end
local orig = image
if resolvercache[orig] then
if flag then
local thing = library.elements[flag] or library.designerelements[flag]
if thing and thing.Set then
task.spawn(thing.Set, thing, resolvercache[orig])
end
end
return resolvercache[orig]
end
image = tonumber(image) or image
local succezz = pcall(function()
local typ = type(image)
if typ == "string" then
if getsynasset then
if #image > 11 and string.sub(image, 1, 11) == "synasset://" then
return getsynasset(string.sub(image, 12))
elseif #image > 14 and string.sub(image, 1, 14) == "synasseturl://" then
local x, e = pcall(function()
local codename, fixes = string.gsub(image, ".", function(c)
if c:lower() == c:upper() and not tonumber(c) then
return ""
end
end)
codename = string.sub(codename, 1, 24) .. tostring(fixes)
local fold = isfolder("./Pepsi Lib")
if not fold then
makefolder("./Pepsi Lib")
end
fold = isfolder("./Pepsi Lib/Themes")
if not fold then
makefolder("./Pepsi Lib/Themes")
end
fold = isfolder("./Pepsi Lib/Themes/SynapseAssetsCache")
if not fold then
makefolder("./Pepsi Lib Themes/SynapseAssetsCache")
end
if not fold or not isfile("./Pepsi Lib/Themes/SynapseAssetsCache/" .. codename .. ".dat") then
local res = game:HttpGet(string.sub(image, 15))
if res ~= nil then
writefile("./Pepsi Lib/Themes/SynapseAssetsCache/" .. codename .. ".dat", res)
end
end
return getsynasset(readfile("./Pepsi Lib/Themes/SynapseAssetsCache/" .. codename .. ".dat"))
end)
if x and e ~= nil then
return e
end
end
end
if #image < 11 or (string.sub(image, 1, 13) ~= "rbxassetid://" and string.sub(image, 1, 11) ~= "rbxasset://" and string.sub(image, 1, 11) ~= "rbxthumb://") then
image = tonumber(image:gsub("%D", ""), 10) or image
typ = type(image)
end
end
if typ == "number" and image > 0 then
pcall(function()
local nfo = Marketplace and Marketplace:GetProductInfo(image)
image = tostring(image)
if nfo and nfo.AssetTypeId == 1 then
image = "rbxassetid://" .. image
elseif nfo.AssetTypeId == 13 then
local decal = game:GetObjects("rbxassetid://" .. image)[1]
image = "rbxassetid://" .. decal.Texture:match("%d+$")
decal = (decal and decal:Destroy() and nil) or nil
end
end)
else
image = nil
end
end)
if succezz and image then
if orig then
resolvercache[orig] = image
end
resolvercache[image] = image
if flag then
local thing = library.elements[flag] or library.designerelements[flag]
if thing and thing.Set then
task.spawn(thing.Set, thing, image)
end
end
end
end
return image
end
library.subs.ResolveID = resolveid
library.resolvercache = resolvercache
local colored = library.colored
local colors = library.colors
local tweenService = game:GetService("TweenService")
local updatecolors = nil
do
function updatecolors(tweenit)
if library.objects and (#library.objects > 0 or next(library.objects)) then
for _, data in next, colored do
local x, e
if tweenit then
x, e = pcall(function()
local cclr = colors[data[3]]
local darkness = data[4]
tweenService:Create(data[1], TweenInfo.new(tweenit, library.configuration.easingStyle, library.configuration.easingDirection), {
[data[2]] = (darkness and darkness ~= 1 and darkenColor(cclr, darkness)) or cclr
}):Play()
end)
end
if not x then
local x, e = pcall(function()
local cclr = colors[data[3]]
local darkness = data[4]
data[1][data[2]] = (darkness and darkness ~= 1 and darkenColor(cclr, darkness)) or cclr
end)
if not x and e then
warn(debug.traceback(e))
end
end
end
pcall(function()
if library.Backdrop then
library.Backdrop.Visible = not not library_flags["__Designer.Background.UseBackgroundImage"]
library.Backdrop.Image = resolveid(library_flags["__Designer.Background.ImageAssetID"], "__Designer.Background.ImageAssetID") or ""
library.Backdrop.ImageColor3 = library_flags["__Designer.Background.ImageColor"] or Color3.new(1, 1, 1)
library.Backdrop.ImageTransparency = (library_flags["__Designer.Background.ImageTransparency"] or 95) / 100
end
end)
end
end
end
local function updatecolorsnotween()
updatecolors()
end
library.subs.updatecolors = updatecolors
library.colors = setmetatable({}, {
__index = colors,
__newindex = function(_, k, v)
if colors[k] ~= v then
colors[k] = v
spawn(updatecolorsnotween)
end
end
})
local elements = library.elements
shared.libraries = shared.libraries or {}
local colorpickerconflicts = library.colorpickerconflicts
local keyHandler = {
notAllowedKeys = {
[Enum.KeyCode.Return] = true,
[Enum.KeyCode.Space] = true,
[Enum.KeyCode.Tab] = true,
[Enum.KeyCode.Unknown] = true,
[Enum.KeyCode.Backspace] = true
},
notAllowedMouseInputs = {
[Enum.UserInputType.MouseMovement] = true,
[Enum.UserInputType.MouseWheel] = true,
[Enum.UserInputType.MouseButton1] = true,
[Enum.UserInputType.MouseButton2] = true,
[Enum.UserInputType.MouseButton3] = true
},
allowedKeys = {
[Enum.KeyCode.LeftShift] = "LShift",
[Enum.KeyCode.RightShift] = "RShift",
[Enum.KeyCode.LeftControl] = "LCtrl",
[Enum.KeyCode.RightControl] = "RCtrl",
[Enum.KeyCode.LeftAlt] = "LAlt",
[Enum.KeyCode.RightAlt] = "RAlt",
[Enum.KeyCode.CapsLock] = "CAPS",
[Enum.KeyCode.One] = "1",
[Enum.KeyCode.Two] = "2",
[Enum.KeyCode.Three] = "3",
[Enum.KeyCode.Four] = "4",
[Enum.KeyCode.Five] = "5",
[Enum.KeyCode.Six] = "6",
[Enum.KeyCode.Seven] = "7",
[Enum.KeyCode.Eight] = "8",
[Enum.KeyCode.Nine] = "9",
[Enum.KeyCode.Zero] = "0",
[Enum.KeyCode.KeypadOne] = "Num-1",
[Enum.KeyCode.KeypadTwo] = "Num-2",
[Enum.KeyCode.KeypadThree] = "Num-3",
[Enum.KeyCode.KeypadFour] = "Num-4",
[Enum.KeyCode.KeypadFive] = "Num-5",
[Enum.KeyCode.KeypadSix] = "Num-6",
[Enum.KeyCode.KeypadSeven] = "Num-7",
[Enum.KeyCode.KeypadEight] = "Num-8",
[Enum.KeyCode.KeypadNine] = "Num-9",
[Enum.KeyCode.KeypadZero] = "Num-0",
[Enum.KeyCode.Minus] = "-",
[Enum.KeyCode.Equals] = "=",
[Enum.KeyCode.Tilde] = "~",
[Enum.KeyCode.LeftBracket] = "[",
[Enum.KeyCode.RightBracket] = "]",
[Enum.KeyCode.RightParenthesis] = ")",
[Enum.KeyCode.LeftParenthesis] = "(",
[Enum.KeyCode.Semicolon] = ";",
[Enum.KeyCode.Quote] = "'",
[Enum.KeyCode.BackSlash] = "\\",
[Enum.KeyCode.Comma] = ",",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Slash] = "/",
[Enum.KeyCode.Asterisk] = "*",
[Enum.KeyCode.Plus] = "+",
[Enum.KeyCode.Period] = ".",
[Enum.KeyCode.Backquote] = "`"
}
}
local function hardunload(library)
if library.UnloadCallback and type(library.UnloadCallback) == "function" then
local x, e = pcall(library.UnloadCallback)
if not x and e then
task.spawn(error, e, 2)
end
end
for cflag, data in next, elements do
if data.Type ~= "Persistence" then
if data.Set and data.Options.UnloadValue ~= nil then
data.Set(data.Options.UnloadValue)
end
if data.Options.UnloadFunc then
local y, u = pcall(data.Options.UnloadFunc)
if not y and u then
warn(debug.traceback("Error unloading '" .. tostring(cflag) .. "'\n" .. u))
end
end
end
end
for _, v in next, {library.signals, library.objects} do
for k, o in next, v do
if o then
local te = typeof(o)
if te == "RBXScriptConnection" then
o:Disconnect()
elseif te == "Instance" then
o:Destroy()
end
end
v[k] = nil
end
end
library.signals = nil
library.objects = nil
end
library.Subs.UnloadArg = hardunload
local function unloadall()
if shared.libraries then
local b = 50
while #shared.libraries > 0 do
b = b - 1
if b < 0 then
b = 50
wait(warn("Looped 50 times while unloading....?"))
end
local v = shared.libraries[1]
if v and v.unload and type(v.unload) == "function" then
if not pcall(v.unload) then
pcall(hardunload, v)
for k in next, v do
v[k] = nil
end
end
if shared.libraries then
pcall(function()
table.remove(shared.libraries, 1)
end)
else
return pcall(hardunload, library)
end
end
end
end
shared.libraries = nil
end
shared.unloadall = unloadall
library.unloadall = unloadall
shared.libraries[1 + #shared.libraries] = library
function library.unload()
__runscript = nil
hardunload(library)
if shared.libraries then
for k, v in next, shared.libraries or {} do
if v == library then
for k in next, table.remove(shared.libraries, k) do
v[k] = nil
end
break
end
end
if #shared.libraries == 0 then
shared.libraries = nil
end
end
warn("Unloaded")
end
library.Unload = library.unload
local Instance_new = (syn and syn.protect_gui and function(...)
local x = {Instance.new(...)}
if x[1] then
library.objects[1 + #library.objects] = x[1]
pcall(syn.protect_gui, x[1])
end
return unpack(x)
end) or function(...)
local x = {Instance.new(...)}
if x[1] then
library.objects[1 + #library.objects] = x[1]
end
return unpack(x)
end
library.subs.Instance_new = Instance_new
local playersservice = game:GetService("Players")
local function getresolver(listt, filter, method, _)
local huo, args = type(filter), {}
local hou = typeof(listt)
return (hou == "function" and function(...)
return listt(...)
end) or (hou == "table" and function()
return listt
end) or function()
local hardtype = nil
local g = listt
for _ = 1, 5 do
hardtype = typeof(g)
if hardtype == "function" then
local x, e = pcall(listt)
if x and e then
g = e
end
hardtype = typeof(g)
end
if hardtype == "Instance" then
local lastg = g
if method == nil and listt == playersservice then
g = listt:GetPlayers()
end
if method then
local metype = type(method)
if metype == "table" then
method = method.Method or method[1]
args = method.Args or method.Arguments or unpack(method, (method.Method ~= nil and 1) or 2)
metype = type(method)
end
local y, u = nil, nil
if metype == "function" then
y, u = pcall(method, listt, unpack(args))
elseif metype == "string" then
local y, u = pcall(function()
return listt[method](listt, unpack(args))
end)
else
warn("Idk how to handle method type of", metype, debug.traceback(""))
end
if u then
if y then
g = u
else
warn("Error trying method", method, "on", listt, debug.traceback(u))
end
end
end
if g == lastg then
g = listt:GetChildren()
end
end
if hardtype == "Enum" then
g = listt:GetEnumItems()
end
hardtype = typeof(g)
if hardtype == "table" then
break
end
end
hardtype = typeof(g)
if hardtype ~= "table" then
warn("Could not resolve " .. hou .. " type to a list.")
return {}
end
if filter then
if huo == "function" then
local accept = {}
for _, v in next, g do
local x, e = pcall(filter, v)
if x and e then
accept[1 + #accept] = (e == true and v) or e
end
end
g = accept
elseif huo == "string" then
local accept = {}
for _, v in next, g do
if tostring(v):lower():find(huo) then
accept[1 + #accept] = v
end
end
g = accept
elseif huo == "table" then
local accept = {}
if type(filter[1]) == "string" then
for _, v in next, g do
if tostring(v):lower():find(huo) then
accept[1 + #accept] = v