forked from tbao143/thaibao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Library
1765 lines (1571 loc) · 62.6 KB
/
Library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local HttpService = game:GetService("HttpService")
local OrionLib = {
Elements = {},
ThemeObjects = {},
Connections = {},
Flags = {},
Themes = {
Default = {
Main = Color3.fromRGB(25, 25, 25),
Second = Color3.fromRGB(32, 32, 32),
Stroke = Color3.fromRGB(210, 105, 30),
Divider = Color3.fromRGB(60, 60, 60),
Text = Color3.fromRGB(240, 240, 240),
TextDark = Color3.fromRGB(0, 0, 0)
}
},
SelectedTheme = "Default",
Folder = nil,
SaveCfg = false
}
--Feather Icons https://github.com/evoincorp/lucideblox/tree/master/src/modules/util - Created by 7kayoh
local Icons = {}
local Success, Response = pcall(function()
Icons = HttpService:JSONDecode(game:HttpGetAsync("https://raw.githubusercontent.com/evoincorp/lucideblox/master/src/modules/util/icons.json")).icons
end)
if not Success then
warn("\nOrion Library - Failed to load Feather Icons. Error code: " .. Response .. "\n")
end
local function GetIcon(IconName)
if Icons[IconName] ~= nil then
return Icons[IconName]
else
return nil
end
end
local Orion = Instance.new("ScreenGui")
Orion.Name = "Orion"
if syn then
syn.protect_gui(Orion)
Orion.Parent = game.CoreGui
else
Orion.Parent = gethui() or game.CoreGui
end
if gethui then
for _, Interface in ipairs(gethui():GetChildren()) do
if Interface.Name == Orion.Name and Interface ~= Orion then
Interface:Destroy()
end
end
else
for _, Interface in ipairs(game.CoreGui:GetChildren()) do
if Interface.Name == Orion.Name and Interface ~= Orion then
Interface:Destroy()
end
end
end
function OrionLib:IsRunning()
if gethui then
return Orion.Parent == gethui()
else
return Orion.Parent == game:GetService("CoreGui")
end
end
local function AddConnection(Signal, Function)
if (not OrionLib:IsRunning()) then
return
end
local SignalConnect = Signal:Connect(Function)
table.insert(OrionLib.Connections, SignalConnect)
return SignalConnect
end
task.spawn(function()
while (OrionLib:IsRunning()) do
wait()
end
for _, Connection in next, OrionLib.Connections do
Connection:Disconnect()
end
end)
local function MakeDraggable(DragPoint, Main)
pcall(function()
local Dragging, DragInput, MousePos, FramePos = false
AddConnection(DragPoint.InputBegan, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Dragging = true
MousePos = Input.Position
FramePos = Main.Position
Input.Changed:Connect(function()
if Input.UserInputState == Enum.UserInputState.End then
Dragging = false
end
end)
end
end)
AddConnection(DragPoint.InputChanged, function(Input)
if Input.UserInputType == Enum.UserInputType.MouseMovement then
DragInput = Input
end
end)
AddConnection(UserInputService.InputChanged, function(Input)
if Input == DragInput and Dragging then
local Delta = Input.Position - MousePos
--TweenService:Create(Main, TweenInfo.new(0.05, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Position = UDim2.new(FramePos.X.Scale,FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y)}):Play()
Main.Position = UDim2.new(FramePos.X.Scale,FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y)
end
end)
end)
end
local function Create(Name, Properties, Children)
local Object = Instance.new(Name)
for i, v in next, Properties or {} do
Object[i] = v
end
for i, v in next, Children or {} do
v.Parent = Object
end
return Object
end
local function CreateElement(ElementName, ElementFunction)
OrionLib.Elements[ElementName] = function(...)
return ElementFunction(...)
end
end
local function MakeElement(ElementName, ...)
local NewElement = OrionLib.Elements[ElementName](...)
return NewElement
end
local function SetProps(Element, Props)
table.foreach(Props, function(Property, Value)
Element[Property] = Value
end)
return Element
end
local function SetChildren(Element, Children)
table.foreach(Children, function(_, Child)
Child.Parent = Element
end)
return Element
end
local function Round(Number, Factor)
local Result = math.floor(Number/Factor + (math.sign(Number) * 0.5)) * Factor
if Result < 0 then Result = Result + Factor end
return Result
end
local function ReturnProperty(Object)
if Object:IsA("Frame") or Object:IsA("TextButton") then
return "BackgroundColor3"
end
if Object:IsA("ScrollingFrame") then
return "ScrollBarImageColor3"
end
if Object:IsA("UIStroke") then
return "Color"
end
if Object:IsA("TextLabel") or Object:IsA("TextBox") then
return "TextColor3"
end
if Object:IsA("ImageLabel") or Object:IsA("ImageButton") then
return "ImageColor3"
end
end
local function AddThemeObject(Object, Type)
if not OrionLib.ThemeObjects[Type] then
OrionLib.ThemeObjects[Type] = {}
end
table.insert(OrionLib.ThemeObjects[Type], Object)
Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Type]
return Object
end
local function SetTheme()
for Name, Type in pairs(OrionLib.ThemeObjects) do
for _, Object in pairs(Type) do
Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Name]
end
end
end
local function PackColor(Color)
return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255}
end
local function UnpackColor(Color)
return Color3.fromRGB(Color.R, Color.G, Color.B)
end
local function LoadCfg(Config)
local Data = HttpService:JSONDecode(Config)
table.foreach(Data, function(a,b)
if OrionLib.Flags[a] then
spawn(function()
if OrionLib.Flags[a].Type == "Colorpicker" then
OrionLib.Flags[a]:Set(UnpackColor(b))
else
OrionLib.Flags[a]:Set(b)
end
end)
else
warn("Orion Library Config Loader - Could not find ", a ,b)
end
end)
end
local function SaveCfg(Name)
local Data = {}
for i,v in pairs(OrionLib.Flags) do
if v.Save then
if v.Type == "Colorpicker" then
Data[i] = PackColor(v.Value)
else
Data[i] = v.Value
end
end
end
writefile(OrionLib.Folder .. "/" .. Name .. ".txt", tostring(HttpService:JSONEncode(Data)))
end
local WhitelistedMouse = {Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3}
local BlacklistedKeys = {Enum.KeyCode.Unknown,Enum.KeyCode.W,Enum.KeyCode.A,Enum.KeyCode.S,Enum.KeyCode.D,Enum.KeyCode.Up,Enum.KeyCode.Left,Enum.KeyCode.Down,Enum.KeyCode.Right,Enum.KeyCode.Slash,Enum.KeyCode.Tab,Enum.KeyCode.Backspace,Enum.KeyCode.Escape}
local function CheckKey(Table, Key)
for _, v in next, Table do
if v == Key then
return true
end
end
end
CreateElement("Corner", function(Scale, Offset)
local Corner = Create("UICorner", {
CornerRadius = UDim.new(Scale or 0, Offset or 10)
})
return Corner
end)
CreateElement("Stroke", function(Color, Thickness)
local Stroke = Create("UIStroke", {
Color = Color or Color3.fromRGB(255, 255, 255),
Thickness = Thickness or 1
})
return Stroke
end)
CreateElement("List", function(Scale, Offset)
local List = Create("UIListLayout", {
SortOrder = Enum.SortOrder.LayoutOrder,
Padding = UDim.new(Scale or 0, Offset or 0)
})
return List
end)
CreateElement("Padding", function(Bottom, Left, Right, Top)
local Padding = Create("UIPadding", {
PaddingBottom = UDim.new(0, Bottom or 4),
PaddingLeft = UDim.new(0, Left or 4),
PaddingRight = UDim.new(0, Right or 4),
PaddingTop = UDim.new(0, Top or 4)
})
return Padding
end)
CreateElement("TFrame", function()
local TFrame = Create("Frame", {
BackgroundTransparency = 1
})
return TFrame
end)
CreateElement("Frame", function(Color)
local Frame = Create("Frame", {
BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
BorderSizePixel = 0
})
return Frame
end)
CreateElement("RoundFrame", function(Color, Scale, Offset)
local Frame = Create("Frame", {
BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
BorderSizePixel = 0
}, {
Create("UICorner", {
CornerRadius = UDim.new(Scale, Offset)
})
})
return Frame
end)
CreateElement("Button", function()
local Button = Create("TextButton", {
Text = "",
AutoButtonColor = false,
BackgroundTransparency = 1,
BorderSizePixel = 0
})
return Button
end)
CreateElement("ScrollFrame", function(Color, Width)
local ScrollFrame = Create("ScrollingFrame", {
BackgroundTransparency = 1,
MidImage = "rbxassetid://7445543667",
BottomImage = "rbxassetid://7445543667",
TopImage = "rbxassetid://7445543667",
ScrollBarImageColor3 = Color,
BorderSizePixel = 0,
ScrollBarThickness = Width,
CanvasSize = UDim2.new(0, 0, 0, 0)
})
return ScrollFrame
end)
CreateElement("Image", function(ImageID)
local ImageNew = Create("ImageLabel", {
Image = ImageID,
BackgroundTransparency = 1
})
if GetIcon(ImageID) ~= nil then
ImageNew.Image = GetIcon(ImageID)
end
return ImageNew
end)
CreateElement("ImageButton", function(ImageID)
local Image = Create("ImageButton", {
Image = ImageID,
BackgroundTransparency = 1
})
return Image
end)
CreateElement("Label", function(Text, TextSize, Transparency)
local Label = Create("TextLabel", {
Text = Text or "",
TextColor3 = Color3.fromRGB(240, 240, 240),
TextTransparency = Transparency or 0,
TextSize = TextSize or 15,
Font = Enum.Font.Gotham,
RichText = true,
BackgroundTransparency = 1,
TextXAlignment = Enum.TextXAlignment.Left
})
return Label
end)
local NotificationHolder = SetProps(SetChildren(MakeElement("TFrame"), {
SetProps(MakeElement("List"), {
HorizontalAlignment = Enum.HorizontalAlignment.Center,
SortOrder = Enum.SortOrder.LayoutOrder,
VerticalAlignment = Enum.VerticalAlignment.Bottom,
Padding = UDim.new(0, 5)
})
}), {
Position = UDim2.new(1, -25, 1, -25),
Size = UDim2.new(0, 300, 1, -25),
AnchorPoint = Vector2.new(1, 1),
Parent = Orion
})
function OrionLib:MakeNotification(NotificationConfig)
spawn(function()
NotificationConfig.Name = NotificationConfig.Name or "Notification"
NotificationConfig.Content = NotificationConfig.Content or "Test"
NotificationConfig.Image = NotificationConfig.Image or "rbxassetid://4384403532"
NotificationConfig.Time = NotificationConfig.Time or 15
local NotificationParent = SetProps(MakeElement("TFrame"), {
Size = UDim2.new(1, 0, 0, 0),
AutomaticSize = Enum.AutomaticSize.Y,
Parent = NotificationHolder
})
local NotificationFrame = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(25, 25, 25), 0, 10), {
Parent = NotificationParent,
Size = UDim2.new(1, 0, 0, 0),
Position = UDim2.new(1, -55, 0, 0),
BackgroundTransparency = 0,
AutomaticSize = Enum.AutomaticSize.Y
}), {
MakeElement("Stroke", Color3.fromRGB(93, 93, 93), 1.2),
MakeElement("Padding", 12, 12, 12, 12),
SetProps(MakeElement("Image", NotificationConfig.Image), {
Size = UDim2.new(0, 20, 0, 20),
ImageColor3 = Color3.fromRGB(240, 240, 240),
Name = "Icon"
}),
SetProps(MakeElement("Label", NotificationConfig.Name, 15), {
Size = UDim2.new(1, -30, 0, 20),
Position = UDim2.new(0, 30, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Title"
}),
SetProps(MakeElement("Label", NotificationConfig.Content, 14), {
Size = UDim2.new(1, 0, 0, 0),
Position = UDim2.new(0, 0, 0, 25),
Font = Enum.Font.GothamSemibold,
Name = "Content",
AutomaticSize = Enum.AutomaticSize.Y,
TextColor3 = Color3.fromRGB(200, 200, 200),
TextWrapped = true
})
})
TweenService:Create(NotificationFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 0, 0, 0)}):Play()
wait(NotificationConfig.Time - 0.88)
TweenService:Create(NotificationFrame.Icon, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
TweenService:Create(NotificationFrame, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {BackgroundTransparency = 0.6}):Play()
wait(0.3)
TweenService:Create(NotificationFrame.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0.9}):Play()
TweenService:Create(NotificationFrame.Title, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.4}):Play()
TweenService:Create(NotificationFrame.Content, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.5}):Play()
wait(0.05)
NotificationFrame:TweenPosition(UDim2.new(1, 20, 0, 0),'In','Quint',0.8,true)
wait(1.35)
NotificationFrame:Destroy()
end)
end
function OrionLib:Init()
if OrionLib.SaveCfg then
pcall(function()
if isfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt") then
LoadCfg(readfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt"))
OrionLib:MakeNotification({
Name = "Configuration",
Content = "Auto-loaded configuration for the game " .. game.GameId .. ".",
Time = 5
})
end
end)
end
end
function OrionLib:MakeWindow(WindowConfig)
local FirstTab = true
local Minimized = false
local Loaded = false
local UIHidden = false
WindowConfig = WindowConfig or {}
WindowConfig.Name = WindowConfig.Name or "Orion Library"
WindowConfig.ConfigFolder = WindowConfig.ConfigFolder or WindowConfig.Name
WindowConfig.SaveConfig = WindowConfig.SaveConfig or false
WindowConfig.HidePremium = WindowConfig.HidePremium or false
if WindowConfig.IntroEnabled == nil then
WindowConfig.IntroEnabled = true
end
WindowConfig.IntroText = WindowConfig.IntroText or "Orion Library"
WindowConfig.CloseCallback = WindowConfig.CloseCallback or function() end
WindowConfig.ShowIcon = WindowConfig.ShowIcon or false
WindowConfig.Icon = WindowConfig.Icon or "rbxassetid://8834748103"
WindowConfig.IntroIcon = WindowConfig.IntroIcon or "rbxassetid://8834748103"
OrionLib.Folder = WindowConfig.ConfigFolder
OrionLib.SaveCfg = WindowConfig.SaveConfig
if WindowConfig.SaveConfig then
if not isfolder(WindowConfig.ConfigFolder) then
makefolder(WindowConfig.ConfigFolder)
end
end
local TabHolder = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 4), {
Size = UDim2.new(1, 0, 1, -50)
}), {
MakeElement("List"),
MakeElement("Padding", 8, 0, 0, 8)
}), "Divider")
AddConnection(TabHolder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
TabHolder.CanvasSize = UDim2.new(0, 0, 0, TabHolder.UIListLayout.AbsoluteContentSize.Y + 16)
end)
local CloseBtn = SetChildren(SetProps(MakeElement("Button"), {
Size = UDim2.new(0.5, 0, 1, 0),
Position = UDim2.new(0.5, 0, 0, 0),
BackgroundTransparency = 1
}), {
AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072725342"), {
Position = UDim2.new(0, 9, 0, 6),
Size = UDim2.new(0, 18, 0, 18)
}), "Text")
})
local MinimizeBtn = SetChildren(SetProps(MakeElement("Button"), {
Size = UDim2.new(0.5, 0, 1, 0),
BackgroundTransparency = 1
}), {
AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072719338"), {
Position = UDim2.new(0, 9, 0, 6),
Size = UDim2.new(0, 18, 0, 18),
Name = "Ico"
}), "Text")
})
local DragPoint = SetProps(MakeElement("TFrame"), {
Size = UDim2.new(1, 0, 0, 50)
})
local WindowStuff = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
Size = UDim2.new(0, 150, 1, -50),
Position = UDim2.new(0, 0, 0, 50)
}), {
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 10),
Position = UDim2.new(0, 0, 0, 0)
}), "Second"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(0, 10, 1, 0),
Position = UDim2.new(1, -10, 0, 0)
}), "Second"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(0, 1, 1, 0),
Position = UDim2.new(1, -1, 0, 0)
}), "Stroke"),
TabHolder,
SetChildren(SetProps(MakeElement("TFrame"), {
Size = UDim2.new(1, 0, 0, 50),
Position = UDim2.new(0, 0, 1, -50)
}), {
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1)
}), "Stroke"),
AddThemeObject(SetChildren(SetProps(MakeElement("Frame"), {
AnchorPoint = Vector2.new(0, 0.5),
Size = UDim2.new(0, 32, 0, 32),
Position = UDim2.new(0, 10, 0.5, 0)
}), {
SetProps(MakeElement("Image", "https://www.roblox.com/headshot-thumbnail/image?userId=".. LocalPlayer.UserId .."&width=420&height=420&format=png"), {
Size = UDim2.new(1, 0, 1, 0)
}),
AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4031889928"), {
Size = UDim2.new(1, 0, 1, 0),
}), "Second"),
MakeElement("Corner", 1)
}), "Divider"),
SetChildren(SetProps(MakeElement("TFrame"), {
AnchorPoint = Vector2.new(0, 0.5),
Size = UDim2.new(0, 32, 0, 32),
Position = UDim2.new(0, 10, 0.5, 0)
}), {
AddThemeObject(MakeElement("Stroke"), "Stroke"),
MakeElement("Corner", 1)
}),
AddThemeObject(SetProps(MakeElement("Label", LocalPlayer.DisplayName, WindowConfig.HidePremium and 14 or 13), {
Size = UDim2.new(1, -60, 0, 13),
Position = WindowConfig.HidePremium and UDim2.new(0, 50, 0, 19) or UDim2.new(0, 50, 0, 12),
Font = Enum.Font.GothamBold,
ClipsDescendants = true
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "", 12), {
Size = UDim2.new(1, -60, 0, 12),
Position = UDim2.new(0, 50, 1, -25),
Visible = not WindowConfig.HidePremium
}), "TextDark")
}),
}), "Second")
local WindowName = AddThemeObject(SetProps(MakeElement("Label", WindowConfig.Name, 14), {
Size = UDim2.new(1, -30, 2, 0),
Position = UDim2.new(0, 25, 0, -24),
Font = Enum.Font.GothamBlack,
TextSize = 20
}), "Text")
local WindowTopBarLine = AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(1, 0, 0, 1),
Position = UDim2.new(0, 0, 1, -1)
}), "Stroke")
local MainWindow = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
Parent = Orion,
Position = UDim2.new(0.5, -307, 0.5, -172),
Size = UDim2.new(0, 615, 0, 344),
ClipsDescendants = true
}), {
--SetProps(MakeElement("Image", "rbxassetid://3523728077"), {
-- AnchorPoint = Vector2.new(0.5, 0.5),
-- Position = UDim2.new(0.5, 0, 0.5, 0),
-- Size = UDim2.new(1, 80, 1, 320),
-- ImageColor3 = Color3.fromRGB(33, 33, 33),
-- ImageTransparency = 0.7
--}),
SetChildren(SetProps(MakeElement("TFrame"), {
Size = UDim2.new(1, 0, 0, 50),
Name = "TopBar"
}), {
WindowName,
WindowTopBarLine,
AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 7), {
Size = UDim2.new(0, 70, 0, 30),
Position = UDim2.new(1, -90, 0, 10)
}), {
AddThemeObject(MakeElement("Stroke"), "Stroke"),
AddThemeObject(SetProps(MakeElement("Frame"), {
Size = UDim2.new(0, 1, 1, 0),
Position = UDim2.new(0.5, 0, 0, 0)
}), "Stroke"),
CloseBtn,
MinimizeBtn
}), "Second"),
}),
DragPoint,
WindowStuff
}), "Main")
if WindowConfig.ShowIcon then
WindowName.Position = UDim2.new(0, 50, 0, -24)
local WindowIcon = SetProps(MakeElement("Image", WindowConfig.Icon), {
Size = UDim2.new(0, 20, 0, 20),
Position = UDim2.new(0, 25, 0, 15)
})
WindowIcon.Parent = MainWindow.TopBar
end
MakeDraggable(DragPoint, MainWindow)
AddConnection(CloseBtn.MouseButton1Up, function()
MainWindow.Visible = false
UIHidden = true
OrionLib:MakeNotification({
Name = "Interface Hidden",
Content = "Tap RightShift to reopen the interface",
Time = 5
})
WindowConfig.CloseCallback()
end)
AddConnection(UserInputService.InputBegan, function(Input)
if Input.KeyCode == Enum.KeyCode.RightShift and UIHidden then
MainWindow.Visible = true
end
end)
AddConnection(MinimizeBtn.MouseButton1Up, function()
if Minimized then
TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, 615, 0, 344)}):Play()
MinimizeBtn.Ico.Image = "rbxassetid://7072719338"
wait(.02)
MainWindow.ClipsDescendants = false
WindowStuff.Visible = true
WindowTopBarLine.Visible = true
else
MainWindow.ClipsDescendants = true
WindowTopBarLine.Visible = false
MinimizeBtn.Ico.Image = "rbxassetid://7072720870"
TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, WindowName.TextBounds.X + 140, 0, 50)}):Play()
wait(0.1)
WindowStuff.Visible = false
end
Minimized = not Minimized
end)
local function LoadSequence()
MainWindow.Visible = false
local LoadSequenceLogo = SetProps(MakeElement("Image", WindowConfig.IntroIcon), {
Parent = Orion,
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.5, 0, 0.4, 0),
Size = UDim2.new(0, 28, 0, 28),
ImageColor3 = Color3.fromRGB(255, 255, 255),
ImageTransparency = 1
})
local LoadSequenceText = SetProps(MakeElement("Label", WindowConfig.IntroText, 14), {
Parent = Orion,
Size = UDim2.new(1, 0, 1, 0),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.5, 19, 0.5, 0),
TextXAlignment = Enum.TextXAlignment.Center,
Font = Enum.Font.GothamBold,
TextTransparency = 1
})
TweenService:Create(LoadSequenceLogo, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0, Position = UDim2.new(0.5, 0, 0.5, 0)}):Play()
wait(0.8)
TweenService:Create(LoadSequenceLogo, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, -(LoadSequenceText.TextBounds.X/2), 0.5, 0)}):Play()
wait(0.3)
TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
wait(2)
TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
MainWindow.Visible = true
LoadSequenceLogo:Destroy()
LoadSequenceText:Destroy()
end
if WindowConfig.IntroEnabled then
LoadSequence()
end
local TabFunction = {}
function TabFunction:MakeTab(TabConfig)
TabConfig = TabConfig or {}
TabConfig.Name = TabConfig.Name or "Tab"
TabConfig.Icon = TabConfig.Icon or ""
TabConfig.PremiumOnly = TabConfig.PremiumOnly or false
local TabFrame = SetChildren(SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 0, 30),
Parent = TabHolder
}), {
AddThemeObject(SetProps(MakeElement("Image", TabConfig.Icon), {
AnchorPoint = Vector2.new(0, 0.5),
Size = UDim2.new(0, 18, 0, 18),
Position = UDim2.new(0, 10, 0.5, 0),
ImageTransparency = 0.4,
Name = "Ico"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", TabConfig.Name, 14), {
Size = UDim2.new(1, -35, 1, 0),
Position = UDim2.new(0, 35, 0, 0),
Font = Enum.Font.GothamSemibold,
TextTransparency = 0.4,
Name = "Title"
}), "Text")
})
if GetIcon(TabConfig.Icon) ~= nil then
TabFrame.Ico.Image = GetIcon(TabConfig.Icon)
end
local Container = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 5), {
Size = UDim2.new(1, -150, 1, -50),
Position = UDim2.new(0, 150, 0, 50),
Parent = MainWindow,
Visible = false,
Name = "ItemContainer"
}), {
MakeElement("List", 0, 6),
MakeElement("Padding", 15, 10, 10, 15)
}), "Divider")
AddConnection(Container.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
Container.CanvasSize = UDim2.new(0, 0, 0, Container.UIListLayout.AbsoluteContentSize.Y + 30)
end)
if FirstTab then
FirstTab = false
TabFrame.Ico.ImageTransparency = 0
TabFrame.Title.TextTransparency = 0
TabFrame.Title.Font = Enum.Font.GothamBlack
Container.Visible = true
end
AddConnection(TabFrame.MouseButton1Click, function()
for _, Tab in next, TabHolder:GetChildren() do
if Tab:IsA("TextButton") then
Tab.Title.Font = Enum.Font.GothamSemibold
TweenService:Create(Tab.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0.4}):Play()
TweenService:Create(Tab.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0.4}):Play()
end
end
for _, ItemContainer in next, MainWindow:GetChildren() do
if ItemContainer.Name == "ItemContainer" then
ItemContainer.Visible = false
end
end
TweenService:Create(TabFrame.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
TweenService:Create(TabFrame.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
TabFrame.Title.Font = Enum.Font.GothamBlack
Container.Visible = true
end)
local function GetElements(ItemParent)
local ElementFunction = {}
function ElementFunction:AddLabel(Text)
local LabelFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 30),
BackgroundTransparency = 0.7,
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text"),
AddThemeObject(MakeElement("Stroke"), "Stroke")
}), "Second")
local LabelFunction = {}
function LabelFunction:Set(ToChange)
LabelFrame.Content.Text = ToChange
end
return LabelFunction
end
function ElementFunction:AddParagraph(Text, Content)
Text = Text or "Text"
Content = Content or "Content"
local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 30),
BackgroundTransparency = 0.7,
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
Size = UDim2.new(1, -12, 0, 14),
Position = UDim2.new(0, 12, 0, 10),
Font = Enum.Font.GothamBold,
Name = "Title"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Label", "", 13), {
Size = UDim2.new(1, -24, 0, 0),
Position = UDim2.new(0, 12, 0, 26),
Font = Enum.Font.GothamSemibold,
Name = "Content",
TextWrapped = true
}), "TextDark"),
AddThemeObject(MakeElement("Stroke"), "Stroke")
}), "Second")
AddConnection(ParagraphFrame.Content:GetPropertyChangedSignal("Text"), function()
ParagraphFrame.Content.Size = UDim2.new(1, -24, 0, ParagraphFrame.Content.TextBounds.Y)
ParagraphFrame.Size = UDim2.new(1, 0, 0, ParagraphFrame.Content.TextBounds.Y + 35)
end)
ParagraphFrame.Content.Text = Content
local ParagraphFunction = {}
function ParagraphFunction:Set(ToChange)
ParagraphFrame.Content.Text = ToChange
end
return ParagraphFunction
end
function ElementFunction:AddButton(ButtonConfig)
ButtonConfig = ButtonConfig or {}
ButtonConfig.Name = ButtonConfig.Name or "Button"
ButtonConfig.Callback = ButtonConfig.Callback or function() end
ButtonConfig.Icon = ButtonConfig.Icon or "rbxassetid://3944703587"
local Button = {}
local Click = SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 1, 0)
})
local ButtonFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 33),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", ButtonConfig.Name, 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text"),
AddThemeObject(SetProps(MakeElement("Image", ButtonConfig.Icon), {
Size = UDim2.new(0, 20, 0, 20),
Position = UDim2.new(1, -30, 0, 7),
}), "TextDark"),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
Click
}), "Second")
AddConnection(Click.MouseEnter, function()
TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.MouseButton1Up, function()
TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
spawn(function()
ButtonConfig.Callback()
end)
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 6)}):Play()
end)
function Button:Set(ButtonText)
ButtonFrame.Content.Text = ButtonText
end
return Button
end
function ElementFunction:AddToggle(ToggleConfig)
ToggleConfig = ToggleConfig or {}
ToggleConfig.Name = ToggleConfig.Name or "Toggle"
ToggleConfig.Default = ToggleConfig.Default or false
ToggleConfig.Callback = ToggleConfig.Callback or function() end
ToggleConfig.Color = ToggleConfig.Color or Color3.fromRGB(9, 99, 195)
ToggleConfig.Flag = ToggleConfig.Flag or nil
ToggleConfig.Save = ToggleConfig.Save or false
local Toggle = {Value = ToggleConfig.Default, Save = ToggleConfig.Save}
local Click = SetProps(MakeElement("Button"), {
Size = UDim2.new(1, 0, 1, 0)
})
local ToggleBox = SetChildren(SetProps(MakeElement("RoundFrame", ToggleConfig.Color, 0, 4), {
Size = UDim2.new(0, 24, 0, 24),
Position = UDim2.new(1, -24, 0.5, 0),
AnchorPoint = Vector2.new(0.5, 0.5)
}), {
SetProps(MakeElement("Stroke"), {
Color = ToggleConfig.Color,
Name = "Stroke",
Transparency = 0.5
}),
SetProps(MakeElement("Image", "rbxassetid://3944680095"), {
Size = UDim2.new(0, 20, 0, 20),
AnchorPoint = Vector2.new(0.5, 0.5),
Position = UDim2.new(0.5, 0, 0.5, 0),
ImageColor3 = Color3.fromRGB(255, 255, 255),
Name = "Ico"
}),
})
local ToggleFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
Size = UDim2.new(1, 0, 0, 38),
Parent = ItemParent
}), {
AddThemeObject(SetProps(MakeElement("Label", ToggleConfig.Name, 15), {
Size = UDim2.new(1, -12, 1, 0),
Position = UDim2.new(0, 12, 0, 0),
Font = Enum.Font.GothamBold,
Name = "Content"
}), "Text"),
AddThemeObject(MakeElement("Stroke"), "Stroke"),
ToggleBox,
Click
}), "Second")
function Toggle:Set(Value)
Toggle.Value = Value
TweenService:Create(ToggleBox, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Toggle.Value and ToggleConfig.Color or OrionLib.Themes.Default.Divider}):Play()
TweenService:Create(ToggleBox.Stroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = Toggle.Value and ToggleConfig.Color or OrionLib.Themes.Default.Stroke}):Play()
TweenService:Create(ToggleBox.Ico, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = Toggle.Value and 0 or 1, Size = Toggle.Value and UDim2.new(0, 20, 0, 20) or UDim2.new(0, 8, 0, 8)}):Play()
ToggleConfig.Callback(Toggle.Value)
end
Toggle:Set(Toggle.Value)
AddConnection(Click.MouseEnter, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
end)
AddConnection(Click.MouseLeave, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
end)
AddConnection(Click.MouseButton1Up, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 3, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 3)}):Play()
SaveCfg(game.GameId)
Toggle:Set(not Toggle.Value)
end)
AddConnection(Click.MouseButton1Down, function()
TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = Color3.fromRGB(OrionLib.Themes[OrionLib.SelectedTheme].Second.R * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.G * 255 + 6, OrionLib.Themes[OrionLib.SelectedTheme].Second.B * 255 + 6)}):Play()
end)
if ToggleConfig.Flag then
OrionLib.Flags[ToggleConfig.Flag] = Toggle
end
return Toggle
end
function ElementFunction:AddSlider(SliderConfig)
SliderConfig = SliderConfig or {}
SliderConfig.Name = SliderConfig.Name or "Slider"
SliderConfig.Min = SliderConfig.Min or 0
SliderConfig.Max = SliderConfig.Max or 100
SliderConfig.Increment = SliderConfig.Increment or 1
SliderConfig.Default = SliderConfig.Default or 50