Advertisement
King12255

OrionLib UI

Dec 25th, 2024 (edited)
1,771
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 65.48 KB | None | 0 0
  1. -- The best Orion lib UI that is stable for mobile and pc
  2.  
  3. local UserInputService = game:GetService("UserInputService")
  4. local TweenService = game:GetService("TweenService")
  5. local RunService = game:GetService("RunService")
  6. local LocalPlayer = game:GetService("Players").LocalPlayer
  7. local Mouse = LocalPlayer:GetMouse()
  8. local HttpService = game:GetService("HttpService")
  9.  
  10. local OrionLib = {
  11.     Elements = {},
  12.     ThemeObjects = {},
  13.     Connections = {},
  14.     Flags = {},
  15.     Themes = {
  16.         Default = {
  17.             Main = Color3.fromRGB(25, 25, 25),
  18.             Second = Color3.fromRGB(32, 32, 32),
  19.             Stroke = Color3.fromRGB(60, 60, 60),
  20.             Divider = Color3.fromRGB(60, 60, 60),
  21.             Text = Color3.fromRGB(240, 240, 240),
  22.             TextDark = Color3.fromRGB(150, 150, 150)
  23.         }
  24.     },
  25.     SelectedTheme = "Default",
  26.     Folder = nil,
  27.     SaveCfg = false
  28. }
  29.  
  30. --Feather Icons https://github.com/evoincorp/lucideblox/tree/master/src/modules/util - Created by 7kayoh
  31. local Icons = {}
  32.  
  33. local Success, Response = pcall(function()
  34.     Icons = nil
  35. end)
  36.  
  37. if not Success then
  38. --  warn("\nOrion Library - Failed to load Feather Icons. Error code: " .. Response .. "\n")
  39. end
  40.  
  41. local function GetIcon(IconName)
  42.         return nil
  43. end
  44.  
  45. local Orion = Instance.new("ScreenGui")
  46.  
  47.  
  48. Orion.Name = "Orion"
  49. if syn then
  50.     syn.protect_gui(Orion)
  51.     Orion.Parent = game.CoreGui
  52. else
  53.     Orion.Parent = gethui() or game.CoreGui
  54. end
  55.  
  56. if gethui then
  57.     for _, Interface in ipairs(gethui():GetChildren()) do
  58.         if Interface.Name == Orion.Name and Interface ~= Orion then
  59.             Interface:Destroy()
  60.         end
  61.     end
  62. else
  63.     for _, Interface in ipairs(game.CoreGui:GetChildren()) do
  64.         if Interface.Name == Orion.Name and Interface ~= Orion then
  65.             Interface:Destroy()
  66.         end
  67.     end
  68. end
  69.  
  70. function OrionLib:IsRunning()
  71.     if gethui then
  72.         return Orion.Parent == gethui()
  73.     else
  74.         return Orion.Parent == game:GetService("CoreGui")
  75.     end
  76.  
  77. end
  78.  
  79. local function AddConnection(Signal, Function)
  80.     if (not OrionLib:IsRunning()) then
  81.         return
  82.     end
  83.     local SignalConnect = Signal:Connect(Function)
  84.     table.insert(OrionLib.Connections, SignalConnect)
  85.     return SignalConnect
  86. end
  87.  
  88. task.spawn(function()
  89.     while (OrionLib:IsRunning()) do
  90.         wait()
  91.     end
  92.  
  93.     for _, Connection in next, OrionLib.Connections do
  94.         Connection:Disconnect()
  95.     end
  96. end)
  97.  
  98. local function MakeDraggable(DragPoint, Main)
  99.     pcall(function()
  100.         local Dragging, DragInput, MousePos, FramePos = false
  101.  
  102.         AddConnection(DragPoint.InputBegan, function(Input)
  103.             if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  104.                 Dragging = true
  105.                 MousePos = Input.Position
  106.                 FramePos = Main.Position
  107.  
  108.                 Input.Changed:Connect(function()
  109.                     if Input.UserInputState == Enum.UserInputState.End then
  110.                         Dragging = false
  111.                     end
  112.                 end)
  113.             end
  114.         end)
  115.  
  116.         AddConnection(DragPoint.InputChanged, function(Input)
  117.             if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then
  118.                 DragInput = Input
  119.             end
  120.         end)
  121.  
  122.         AddConnection(UserInputService.InputChanged, function(Input)
  123.             if Input == DragInput and Dragging then
  124.                 local Delta = Input.Position - MousePos
  125.                 Main.Position = UDim2.new(
  126.                     FramePos.X.Scale, FramePos.X.Offset + Delta.X,
  127.                     FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y
  128.                 )
  129.             end
  130.         end)
  131.     end)
  132. end
  133.  
  134. local function Create(Name, Properties, Children)
  135.     local Object = Instance.new(Name)
  136.     for i, v in next, Properties or {} do
  137.         Object[i] = v
  138.     end
  139.     for i, v in next, Children or {} do
  140.         v.Parent = Object
  141.     end
  142.     return Object
  143. end
  144.  
  145. local function CreateElement(ElementName, ElementFunction)
  146.     OrionLib.Elements[ElementName] = function(...)
  147.         return ElementFunction(...)
  148.     end
  149. end
  150.  
  151. local function MakeElement(ElementName, ...)
  152.     local NewElement = OrionLib.Elements[ElementName](...)
  153.     return NewElement
  154. end
  155.  
  156. local function SetProps(Element, Props)
  157.     table.foreach(Props, function(Property, Value)
  158.         Element[Property] = Value
  159.     end)
  160.     return Element
  161. end
  162.  
  163. local function SetChildren(Element, Children)
  164.     table.foreach(Children, function(_, Child)
  165.         Child.Parent = Element
  166.     end)
  167.     return Element
  168. end
  169.  
  170. local function Round(Number, Factor)
  171.     local Result = math.floor(Number/Factor + (math.sign(Number) * 0.5)) * Factor
  172.     if Result < 0 then Result = Result + Factor end
  173.     return Result
  174. end
  175.  
  176. local function ReturnProperty(Object)
  177.     if Object:IsA("Frame") or Object:IsA("TextButton") then
  178.         return "BackgroundColor3"
  179.     end
  180.     if Object:IsA("ScrollingFrame") then
  181.         return "ScrollBarImageColor3"
  182.     end
  183.     if Object:IsA("UIStroke") then
  184.         return "Color"
  185.     end
  186.     if Object:IsA("TextLabel") or Object:IsA("TextBox") then
  187.         return "TextColor3"
  188.     end  
  189.     if Object:IsA("ImageLabel") or Object:IsA("ImageButton") then
  190.         return "ImageColor3"
  191.     end  
  192. end
  193.  
  194. local function AddThemeObject(Object, Type)
  195.     if not OrionLib.ThemeObjects[Type] then
  196.         OrionLib.ThemeObjects[Type] = {}
  197.     end    
  198.     table.insert(OrionLib.ThemeObjects[Type], Object)
  199.     Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Type]
  200.     return Object
  201. end    
  202.  
  203. local function SetTheme()
  204.     for Name, Type in pairs(OrionLib.ThemeObjects) do
  205.         for _, Object in pairs(Type) do
  206.             Object[ReturnProperty(Object)] = OrionLib.Themes[OrionLib.SelectedTheme][Name]
  207.         end    
  208.     end    
  209. end
  210.  
  211. local function PackColor(Color)
  212.     return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255}
  213. end    
  214.  
  215. local function UnpackColor(Color)
  216.     return Color3.fromRGB(Color.R, Color.G, Color.B)
  217. end
  218.  
  219. local function LoadCfg(Config)
  220.     local Data = HttpService:JSONDecode(Config)
  221.     table.foreach(Data, function(a,b)
  222.         if OrionLib.Flags[a] then
  223.             spawn(function()
  224.                 if OrionLib.Flags[a].Type == "Colorpicker" then
  225.                     OrionLib.Flags[a]:Set(UnpackColor(b))
  226.                 else
  227.                     OrionLib.Flags[a]:Set(b)
  228.                 end    
  229.             end)
  230.         else
  231.             warn("Orion Library Config Loader - Could not find ", a ,b)
  232.         end
  233.     end)
  234. end
  235.  
  236. local function SaveCfg(Name)
  237.     local Data = {}
  238.     for i,v in pairs(OrionLib.Flags) do
  239.         if v.Save then
  240.             if v.Type == "Colorpicker" then
  241.                 Data[i] = PackColor(v.Value)
  242.             else
  243.                 Data[i] = v.Value
  244.             end
  245.         end
  246.     end
  247.     writefile(OrionLib.Folder .. "/" .. Name .. ".txt", tostring(HttpService:JSONEncode(Data)))
  248. end
  249.  
  250. local WhitelistedMouse = {Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2,Enum.UserInputType.MouseButton3}
  251. 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}
  252.  
  253. local function CheckKey(Table, Key)
  254.     for _, v in next, Table do
  255.         if v == Key then
  256.             return true
  257.         end
  258.     end
  259. end
  260.  
  261. CreateElement("Corner", function(Scale, Offset)
  262.     local Corner = Create("UICorner", {
  263.         CornerRadius = UDim.new(Scale or 0, Offset or 10)
  264.     })
  265.     return Corner
  266. end)
  267.  
  268. CreateElement("Stroke", function(Color, Thickness)
  269.     local Stroke = Create("UIStroke", {
  270.         Color = Color or Color3.fromRGB(255, 255, 255),
  271.         Thickness = Thickness or 1
  272.     })
  273.     return Stroke
  274. end)
  275.  
  276. CreateElement("List", function(Scale, Offset)
  277.     local List = Create("UIListLayout", {
  278.         SortOrder = Enum.SortOrder.LayoutOrder,
  279.         Padding = UDim.new(Scale or 0, Offset or 0)
  280.     })
  281.     return List
  282. end)
  283.  
  284. CreateElement("Padding", function(Bottom, Left, Right, Top)
  285.     local Padding = Create("UIPadding", {
  286.         PaddingBottom = UDim.new(0, Bottom or 4),
  287.         PaddingLeft = UDim.new(0, Left or 4),
  288.         PaddingRight = UDim.new(0, Right or 4),
  289.         PaddingTop = UDim.new(0, Top or 4)
  290.     })
  291.     return Padding
  292. end)
  293.  
  294. CreateElement("TFrame", function()
  295.     local TFrame = Create("Frame", {
  296.         BackgroundTransparency = 1
  297.     })
  298.     return TFrame
  299. end)
  300.  
  301. CreateElement("Frame", function(Color)
  302.     local Frame = Create("Frame", {
  303.         BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
  304.         BorderSizePixel = 0
  305.     })
  306.     return Frame
  307. end)
  308.  
  309. CreateElement("RoundFrame", function(Color, Scale, Offset)
  310.     local Frame = Create("Frame", {
  311.         BackgroundColor3 = Color or Color3.fromRGB(255, 255, 255),
  312.         BorderSizePixel = 0
  313.     }, {
  314.         Create("UICorner", {
  315.             CornerRadius = UDim.new(Scale, Offset)
  316.         })
  317.     })
  318.     return Frame
  319. end)
  320.  
  321. CreateElement("Button", function()
  322.     local Button = Create("TextButton", {
  323.         Text = "",
  324.         AutoButtonColor = false,
  325.         BackgroundTransparency = 1,
  326.         BorderSizePixel = 0
  327.     })
  328.     return Button
  329. end)
  330.  
  331. CreateElement("ScrollFrame", function(Color, Width)
  332.     local ScrollFrame = Create("ScrollingFrame", {
  333.         BackgroundTransparency = 1,
  334.         MidImage = "rbxassetid://7445543667",
  335.         BottomImage = "rbxassetid://7445543667",
  336.         TopImage = "rbxassetid://7445543667",
  337.         ScrollBarImageColor3 = Color,
  338.         BorderSizePixel = 0,
  339.         ScrollBarThickness = Width,
  340.         CanvasSize = UDim2.new(0, 0, 0, 0)
  341.     })
  342.     return ScrollFrame
  343. end)
  344.  
  345. CreateElement("Image", function(ImageID)
  346.     local ImageNew = Create("ImageLabel", {
  347.         Image = ImageID,
  348.         BackgroundTransparency = 1
  349.     })
  350.  
  351.     if GetIcon(ImageID) ~= nil then
  352.         ImageNew.Image = GetIcon(ImageID)
  353.     end
  354.  
  355.     return ImageNew
  356. end)
  357.  
  358. CreateElement("ImageButton", function(ImageID)
  359.     local Image = Create("ImageButton", {
  360.         Image = ImageID,
  361.         BackgroundTransparency = 1
  362.     })
  363.     return Image
  364. end)
  365.  
  366. CreateElement("Label", function(Text, TextSize, Transparency)
  367.     local Label = Create("TextLabel", {
  368.         Text = Text or "",
  369.         TextColor3 = Color3.fromRGB(240, 240, 240),
  370.         TextTransparency = Transparency or 0,
  371.         TextSize = TextSize or 15,
  372.         Font = Enum.Font.Gotham,
  373.         RichText = true,
  374.         BackgroundTransparency = 1,
  375.         TextXAlignment = Enum.TextXAlignment.Left
  376.     })
  377.     return Label
  378. end)
  379.  
  380. local NotificationHolder = SetProps(SetChildren(MakeElement("TFrame"), {
  381.     SetProps(MakeElement("List"), {
  382.         HorizontalAlignment = Enum.HorizontalAlignment.Center,
  383.         SortOrder = Enum.SortOrder.LayoutOrder,
  384.         VerticalAlignment = Enum.VerticalAlignment.Bottom,
  385.         Padding = UDim.new(0, 5)
  386.     })
  387. }), {
  388.     Position = UDim2.new(1, -25, 1, -25),
  389.     Size = UDim2.new(0, 300, 1, -25),
  390.     AnchorPoint = Vector2.new(1, 1),
  391.     Parent = Orion
  392. })
  393.  
  394. function OrionLib:MakeNotification(NotificationConfig)
  395.     spawn(function()
  396.         NotificationConfig.Name = NotificationConfig.Name or "Notification"
  397.         NotificationConfig.Content = NotificationConfig.Content or "Test"
  398.         NotificationConfig.Image = NotificationConfig.Image or "rbxassetid://4384403532"
  399.         NotificationConfig.Time = NotificationConfig.Time or 15
  400.  
  401.         local NotificationParent = SetProps(MakeElement("TFrame"), {
  402.             Size = UDim2.new(1, 0, 0, 0),
  403.             AutomaticSize = Enum.AutomaticSize.Y,
  404.             Parent = NotificationHolder
  405.         })
  406.  
  407.         local NotificationFrame = SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(25, 25, 25), 0, 10), {
  408.             Parent = NotificationParent,
  409.             Size = UDim2.new(1, 0, 0, 0),
  410.             Position = UDim2.new(1, -55, 0, 0),
  411.             BackgroundTransparency = 0,
  412.             AutomaticSize = Enum.AutomaticSize.Y
  413.         }), {
  414.             MakeElement("Stroke", Color3.fromRGB(93, 93, 93), 1.2),
  415.             MakeElement("Padding", 12, 12, 12, 12),
  416.             SetProps(MakeElement("Image", NotificationConfig.Image), {
  417.                 Size = UDim2.new(0, 20, 0, 20),
  418.                 ImageColor3 = Color3.fromRGB(240, 240, 240),
  419.                 Name = "Icon"
  420.             }),
  421.             SetProps(MakeElement("Label", NotificationConfig.Name, 15), {
  422.                 Size = UDim2.new(1, -30, 0, 20),
  423.                 Position = UDim2.new(0, 30, 0, 0),
  424.                 Font = Enum.Font.GothamBold,
  425.                 Name = "Title"
  426.             }),
  427.             SetProps(MakeElement("Label", NotificationConfig.Content, 14), {
  428.                 Size = UDim2.new(1, 0, 0, 0),
  429.                 Position = UDim2.new(0, 0, 0, 25),
  430.                 Font = Enum.Font.GothamSemibold,
  431.                 Name = "Content",
  432.                 AutomaticSize = Enum.AutomaticSize.Y,
  433.                 TextColor3 = Color3.fromRGB(200, 200, 200),
  434.                 TextWrapped = true
  435.             })
  436.         })
  437.  
  438.         TweenService:Create(NotificationFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 0, 0, 0)}):Play()
  439.  
  440.         wait(NotificationConfig.Time - 0.88)
  441.         TweenService:Create(NotificationFrame.Icon, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  442.         TweenService:Create(NotificationFrame, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {BackgroundTransparency = 0.6}):Play()
  443.         wait(0.3)
  444.         TweenService:Create(NotificationFrame.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0.9}):Play()
  445.         TweenService:Create(NotificationFrame.Title, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.4}):Play()
  446.         TweenService:Create(NotificationFrame.Content, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.5}):Play()
  447.         wait(0.05)
  448.  
  449.         NotificationFrame:TweenPosition(UDim2.new(1, 20, 0, 0),'In','Quint',0.8,true)
  450.         wait(1.35)
  451.         NotificationFrame:Destroy()
  452.     end)
  453. end    
  454.  
  455. function OrionLib:Init()
  456.     if OrionLib.SaveCfg then   
  457.         pcall(function()
  458.             if isfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt") then
  459.                 LoadCfg(readfile(OrionLib.Folder .. "/" .. game.GameId .. ".txt"))
  460.                 OrionLib:MakeNotification({
  461.                     Name = "Configuration",
  462.                     Content = "Auto-loaded configuration for the game " .. game.GameId .. ".",
  463.                     Time = 5
  464.                 })
  465.             end
  466.         end)       
  467.     end
  468. end
  469.  
  470. function OrionLib:MakeWindow(WindowConfig)
  471.     local FirstTab = true
  472.     local Minimized = false
  473.     local Loaded = false
  474.     local UIHidden = false
  475.  
  476.     WindowConfig = WindowConfig or {}
  477.     WindowConfig.Name = WindowConfig.Name or "Orion Library"
  478.     WindowConfig.ConfigFolder = WindowConfig.ConfigFolder or WindowConfig.Name
  479.     WindowConfig.SaveConfig = WindowConfig.SaveConfig or false
  480.     WindowConfig.HidePremium = WindowConfig.HidePremium or false
  481.     if WindowConfig.IntroEnabled == nil then
  482.         WindowConfig.IntroEnabled = true
  483.     end
  484.     WindowConfig.IntroText = WindowConfig.IntroText or "Orion Library"
  485.     WindowConfig.OpenIcon = WindowConfig.OpenIcon or "rbxassetid://8834748103"
  486.     WindowConfig.CloseCallback = WindowConfig.CloseCallback or function() end
  487.     WindowConfig.ShowIcon = WindowConfig.ShowIcon or false
  488.     WindowConfig.Icon = WindowConfig.Icon or "rbxassetid://8834748103"
  489.     WindowConfig.IntroIcon = WindowConfig.IntroIcon or "rbxassetid://8834748103"
  490.     OrionLib.Folder = WindowConfig.ConfigFolder
  491.     OrionLib.SaveCfg = WindowConfig.SaveConfig
  492.  
  493.     if WindowConfig.SaveConfig then
  494.         if not isfolder(WindowConfig.ConfigFolder) then
  495.             makefolder(WindowConfig.ConfigFolder)
  496.         end
  497.     end
  498.  
  499.     local TabHolder = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 4), {
  500.         Size = UDim2.new(1, 0, 1, -50)
  501.     }), {
  502.         MakeElement("List"),
  503.         MakeElement("Padding", 8, 0, 0, 8)
  504.     }), "Divider")
  505.  
  506.     AddConnection(TabHolder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  507.         TabHolder.CanvasSize = UDim2.new(0, 0, 0, TabHolder.UIListLayout.AbsoluteContentSize.Y + 16)
  508.     end)
  509.  
  510.     local CloseBtn = SetChildren(SetProps(MakeElement("Button"), {
  511.         Size = UDim2.new(0.5, 0, 1, 0),
  512.         Position = UDim2.new(0.5, 0, 0, 0),
  513.         BackgroundTransparency = 1
  514.     }), {
  515.         AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072725342"), {
  516.             Position = UDim2.new(0, 9, 0, 6),
  517.             Size = UDim2.new(0, 18, 0, 18)
  518.         }), "Text")
  519.     })
  520.  
  521.     local MinimizeBtn = SetChildren(SetProps(MakeElement("Button"), {
  522.         Size = UDim2.new(0.5, 0, 1, 0),
  523.         BackgroundTransparency = 1
  524.     }), {
  525.         AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072719338"), {
  526.             Position = UDim2.new(0, 9, 0, 6),
  527.             Size = UDim2.new(0, 18, 0, 18),
  528.             Name = "Ico"
  529.         }), "Text")
  530.     })
  531.  
  532.     local DragPoint = SetProps(MakeElement("TFrame"), {
  533.         Size = UDim2.new(1, 0, 0, 50)
  534.     })
  535.  
  536.     local WindowStuff = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
  537.         Size = UDim2.new(0, 150, 1, -50),
  538.         Position = UDim2.new(0, 0, 0, 50)
  539.     }), {
  540.         AddThemeObject(SetProps(MakeElement("Frame"), {
  541.             Size = UDim2.new(1, 0, 0, 10),
  542.             Position = UDim2.new(0, 0, 0, 0)
  543.         }), "Second"),
  544.         AddThemeObject(SetProps(MakeElement("Frame"), {
  545.             Size = UDim2.new(0, 10, 1, 0),
  546.             Position = UDim2.new(1, -10, 0, 0)
  547.         }), "Second"),
  548.         AddThemeObject(SetProps(MakeElement("Frame"), {
  549.             Size = UDim2.new(0, 1, 1, 0),
  550.             Position = UDim2.new(1, -1, 0, 0)
  551.         }), "Stroke"),
  552.         TabHolder,
  553.         SetChildren(SetProps(MakeElement("TFrame"), {
  554.             Size = UDim2.new(1, 0, 0, 50),
  555.             Position = UDim2.new(0, 0, 1, -50)
  556.         }), {
  557.             AddThemeObject(SetProps(MakeElement("Frame"), {
  558.                 Size = UDim2.new(1, 0, 0, 1)
  559.             }), "Stroke"),
  560.             AddThemeObject(SetChildren(SetProps(MakeElement("Frame"), {
  561.                 AnchorPoint = Vector2.new(0, 0.5),
  562.                 Size = UDim2.new(0, 32, 0, 32),
  563.                 Position = UDim2.new(0, 10, 0.5, 0)
  564.             }), {
  565.                 SetProps(MakeElement("Image", "https://www.roblox.com/headshot-thumbnail/image?userId=".. LocalPlayer.UserId .."&width=420&height=420&format=png"), {
  566.                     Size = UDim2.new(1, 0, 1, 0)
  567.                 }),
  568.                 AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4031889928"), {
  569.                     Size = UDim2.new(1, 0, 1, 0),
  570.                 }), "Second"),
  571.                 MakeElement("Corner", 1)
  572.             }), "Divider"),
  573.             SetChildren(SetProps(MakeElement("TFrame"), {
  574.                 AnchorPoint = Vector2.new(0, 0.5),
  575.                 Size = UDim2.new(0, 32, 0, 32),
  576.                 Position = UDim2.new(0, 10, 0.5, 0)
  577.             }), {
  578.                 AddThemeObject(MakeElement("Stroke"), "Stroke"),
  579.                 MakeElement("Corner", 1)
  580.             }),
  581.             AddThemeObject(SetProps(MakeElement("Label", LocalPlayer.DisplayName, WindowConfig.HidePremium and 14 or 13), {
  582.                 Size = UDim2.new(1, -60, 0, 13),
  583.                 Position = WindowConfig.HidePremium and UDim2.new(0, 50, 0, 19) or UDim2.new(0, 50, 0, 12),
  584.                 Font = Enum.Font.GothamBold,
  585.                 ClipsDescendants = true
  586.             }), "Text"),
  587.             AddThemeObject(SetProps(MakeElement("Label", "", 12), {
  588.                 Size = UDim2.new(1, -60, 0, 12),
  589.                 Position = UDim2.new(0, 50, 1, -25),
  590.                 Visible = not WindowConfig.HidePremium
  591.             }), "TextDark")
  592.         }),
  593.     }), "Second")
  594.  
  595.     local WindowName = AddThemeObject(SetProps(MakeElement("Label", WindowConfig.Name, 14), {
  596.         Size = UDim2.new(1, -30, 2, 0),
  597.         Position = UDim2.new(0, 25, 0, -24),
  598.         Font = Enum.Font.GothamBlack,
  599.         TextSize = 20
  600.     }), "Text")
  601.  
  602.     local WindowTopBarLine = AddThemeObject(SetProps(MakeElement("Frame"), {
  603.         Size = UDim2.new(1, 0, 0, 1),
  604.         Position = UDim2.new(0, 0, 1, -1)
  605.     }), "Stroke")
  606.  
  607.     local MainWindow = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 10), {
  608.         Parent = Orion,
  609.         Position = UDim2.new(0.5, -307, 0.5, -172),
  610.         Size = UDim2.new(0, 615, 0, 344),
  611.         ClipsDescendants = true
  612.     }), {
  613.         --SetProps(MakeElement("Image", "rbxassetid://3523728077"), {
  614.         --  AnchorPoint = Vector2.new(0.5, 0.5),
  615.         --  Position = UDim2.new(0.5, 0, 0.5, 0),
  616.         --  Size = UDim2.new(1, 80, 1, 320),
  617.         --  ImageColor3 = Color3.fromRGB(33, 33, 33),
  618.         --  ImageTransparency = 0.7
  619.         --}),
  620.         SetChildren(SetProps(MakeElement("TFrame"), {
  621.             Size = UDim2.new(1, 0, 0, 50),
  622.             Name = "TopBar"
  623.         }), {
  624.             WindowName,
  625.             WindowTopBarLine,
  626.             AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 7), {
  627.                 Size = UDim2.new(0, 70, 0, 30),
  628.                 Position = UDim2.new(1, -90, 0, 10)
  629.             }), {
  630.                 AddThemeObject(MakeElement("Stroke"), "Stroke"),
  631.                 AddThemeObject(SetProps(MakeElement("Frame"), {
  632.                     Size = UDim2.new(0, 1, 1, 0),
  633.                     Position = UDim2.new(0.5, 0, 0, 0)
  634.                 }), "Stroke"),
  635.                 CloseBtn,
  636.                 MinimizeBtn
  637.             }), "Second"),
  638.         }),
  639.         DragPoint,
  640.         WindowStuff
  641.     }), "Main")
  642.    
  643.    
  644. local ImageButton = Instance.new("ImageButton")
  645. ImageButton.Parent = Orion
  646. ImageButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  647. ImageButton.BackgroundTransparency = 1.000
  648. ImageButton.BorderColor3 = Color3.fromRGB(0, 0, 0)
  649. ImageButton.BorderSizePixel = 0
  650. ImageButton.Position = UDim2.new(0, 0, 0.0693481266, 0)
  651. ImageButton.Size = UDim2.new(0, 40, 0, 40)
  652. ImageButton.Image = WindowConfig.OpenIcon
  653. ImageButton.Visible = false
  654. ImageButton.Active = true
  655. ImageButton.Selectable = true
  656. ImageButton.Draggable = true
  657. ImageButton.MouseButton1Click:Connect(function()
  658. MainWindow.Visible = true
  659. UIHidden = false
  660. ImageButton.Visible = false
  661. end)
  662.    
  663.    
  664.  
  665.     if WindowConfig.ShowIcon then
  666.         WindowName.Position = UDim2.new(0, 50, 0, -24)
  667.         local WindowIcon = SetProps(MakeElement("Image", WindowConfig.Icon), {
  668.             Size = UDim2.new(0, 20, 0, 20),
  669.             Position = UDim2.new(0, 25, 0, 15)
  670.         })
  671.         WindowIcon.Parent = MainWindow.TopBar
  672.     end
  673.  
  674.     MakeDraggable(DragPoint, MainWindow)
  675.  
  676.     AddConnection(CloseBtn.MouseButton1Up, function()
  677.         MainWindow.Visible = false
  678.         UIHidden = true
  679.         WindowConfig.CloseCallback()
  680.         ImageButton.Visible = true
  681.        
  682. if UserInputService.KeyboardEnabled then
  683.     OrionLib:MakeNotification({
  684.         Name = "PC User",
  685.         Content = "Click Right Shift to show the UI again",
  686.         Image = "rbxassetid://8834748103",
  687.         Time = 7
  688.     })
  689. ImageButton.Visible = false
  690. else
  691.     OrionLib:MakeNotification({
  692.         Name = "Phone User",
  693.         Content = "Click on the icon to open the UI again",
  694.         Image = "rbxassetid://8834748103",
  695.         Time = 7
  696.     })
  697. ImageButton.Visible = true
  698. end
  699.     end)
  700.    
  701.    
  702.    
  703.  
  704.    
  705.  
  706.     AddConnection(UserInputService.InputBegan, function(Input)
  707.         if Input.KeyCode == Enum.KeyCode.RightShift and UIHidden then
  708.             MainWindow.Visible = true
  709.         end
  710.     end)
  711.  
  712.     AddConnection(MinimizeBtn.MouseButton1Up, function()
  713.         if Minimized then
  714.             TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, 615, 0, 344)}):Play()
  715.             MinimizeBtn.Ico.Image = "rbxassetid://7072719338"
  716.             wait(.02)
  717.             MainWindow.ClipsDescendants = false
  718.             WindowStuff.Visible = true
  719.             WindowTopBarLine.Visible = true
  720.         else
  721.             MainWindow.ClipsDescendants = true
  722.             WindowTopBarLine.Visible = false
  723.             MinimizeBtn.Ico.Image = "rbxassetid://7072720870"
  724.  
  725.             TweenService:Create(MainWindow, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, WindowName.TextBounds.X + 140, 0, 50)}):Play()
  726.             wait(0.1)
  727.             WindowStuff.Visible = false
  728.         end
  729.         Minimized = not Minimized    
  730.     end)
  731.  
  732.     local function LoadSequence()
  733.         MainWindow.Visible = false
  734.         local LoadSequenceLogo = SetProps(MakeElement("Image", WindowConfig.IntroIcon), {
  735.             Parent = Orion,
  736.             AnchorPoint = Vector2.new(0.5, 0.5),
  737.             Position = UDim2.new(0.5, 0, 0.4, 0),
  738.             Size = UDim2.new(0, 28, 0, 28),
  739.             ImageColor3 = Color3.fromRGB(255, 255, 255),
  740.             ImageTransparency = 1
  741.         })
  742.  
  743.         local LoadSequenceText = SetProps(MakeElement("Label", WindowConfig.IntroText, 14), {
  744.             Parent = Orion,
  745.             Size = UDim2.new(1, 0, 1, 0),
  746.             AnchorPoint = Vector2.new(0.5, 0.5),
  747.             Position = UDim2.new(0.5, 19, 0.5, 0),
  748.             TextXAlignment = Enum.TextXAlignment.Center,
  749.             Font = Enum.Font.GothamBold,
  750.             TextTransparency = 1
  751.         })
  752.  
  753.         TweenService:Create(LoadSequenceLogo, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {ImageTransparency = 0, Position = UDim2.new(0.5, 0, 0.5, 0)}):Play()
  754.         wait(0.8)
  755.         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()
  756.         wait(0.3)
  757.         TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  758.         wait(2)
  759.         TweenService:Create(LoadSequenceText, TweenInfo.new(.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  760.         MainWindow.Visible = true
  761.         LoadSequenceLogo:Destroy()
  762.         LoadSequenceText:Destroy()
  763.     end
  764.  
  765.     if WindowConfig.IntroEnabled then
  766.         LoadSequence()
  767.     end
  768.  
  769.     local TabFunction = {}
  770.     function TabFunction:MakeTab(TabConfig)
  771.         TabConfig = TabConfig or {}
  772.         TabConfig.Name = TabConfig.Name or "Tab"
  773.         TabConfig.Icon = TabConfig.Icon or ""
  774.         TabConfig.PremiumOnly = TabConfig.PremiumOnly or false
  775.  
  776.         local TabFrame = SetChildren(SetProps(MakeElement("Button"), {
  777.             Size = UDim2.new(1, 0, 0, 30),
  778.             Parent = TabHolder
  779.         }), {
  780.             AddThemeObject(SetProps(MakeElement("Image", TabConfig.Icon), {
  781.                 AnchorPoint = Vector2.new(0, 0.5),
  782.                 Size = UDim2.new(0, 18, 0, 18),
  783.                 Position = UDim2.new(0, 10, 0.5, 0),
  784.                 ImageTransparency = 0.4,
  785.                 Name = "Ico"
  786.             }), "Text"),
  787.             AddThemeObject(SetProps(MakeElement("Label", TabConfig.Name, 14), {
  788.                 Size = UDim2.new(1, -35, 1, 0),
  789.                 Position = UDim2.new(0, 35, 0, 0),
  790.                 Font = Enum.Font.GothamSemibold,
  791.                 TextTransparency = 0.4,
  792.                 Name = "Title"
  793.             }), "Text")
  794.         })
  795.  
  796.         if GetIcon(TabConfig.Icon) ~= nil then
  797.             TabFrame.Ico.Image = GetIcon(TabConfig.Icon)
  798.         end
  799.  
  800.         local Container = AddThemeObject(SetChildren(SetProps(MakeElement("ScrollFrame", Color3.fromRGB(255, 255, 255), 5), {
  801.             Size = UDim2.new(1, -150, 1, -50),
  802.             Position = UDim2.new(0, 150, 0, 50),
  803.             Parent = MainWindow,
  804.             Visible = false,
  805.             Name = "ItemContainer"
  806.         }), {
  807.             MakeElement("List", 0, 6),
  808.             MakeElement("Padding", 15, 10, 10, 15)
  809.         }), "Divider")
  810.  
  811.         AddConnection(Container.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  812.             Container.CanvasSize = UDim2.new(0, 0, 0, Container.UIListLayout.AbsoluteContentSize.Y + 30)
  813.         end)
  814.  
  815.         if FirstTab then
  816.             FirstTab = false
  817.             TabFrame.Ico.ImageTransparency = 0
  818.             TabFrame.Title.TextTransparency = 0
  819.             TabFrame.Title.Font = Enum.Font.GothamBlack
  820.             Container.Visible = true
  821.         end    
  822.  
  823.         AddConnection(TabFrame.MouseButton1Click, function()
  824.             for _, Tab in next, TabHolder:GetChildren() do
  825.                 if Tab:IsA("TextButton") then
  826.                     Tab.Title.Font = Enum.Font.GothamSemibold
  827.                     TweenService:Create(Tab.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0.4}):Play()
  828.                     TweenService:Create(Tab.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0.4}):Play()
  829.                 end    
  830.             end
  831.             for _, ItemContainer in next, MainWindow:GetChildren() do
  832.                 if ItemContainer.Name == "ItemContainer" then
  833.                     ItemContainer.Visible = false
  834.                 end    
  835.             end  
  836.             TweenService:Create(TabFrame.Ico, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  837.             TweenService:Create(TabFrame.Title, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  838.             TabFrame.Title.Font = Enum.Font.GothamBlack
  839.             Container.Visible = true  
  840.         end)
  841.  
  842.         local function GetElements(ItemParent)
  843.             local ElementFunction = {}
  844.             function ElementFunction:AddLabel(Text)
  845.                 local LabelFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  846.                     Size = UDim2.new(1, 0, 0, 30),
  847.                     BackgroundTransparency = 0.7,
  848.                     Parent = ItemParent
  849.                 }), {
  850.                     AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
  851.                         Size = UDim2.new(1, -12, 1, 0),
  852.                         Position = UDim2.new(0, 12, 0, 0),
  853.                         Font = Enum.Font.GothamBold,
  854.                         Name = "Content"
  855.                     }), "Text"),
  856.                     AddThemeObject(MakeElement("Stroke"), "Stroke")
  857.                 }), "Second")
  858.  
  859.                 local LabelFunction = {}
  860.                 function LabelFunction:Set(ToChange)
  861.                     LabelFrame.Content.Text = ToChange
  862.                 end
  863.                 return LabelFunction
  864.             end
  865.             function ElementFunction:AddParagraph(Text, Content)
  866.                 Text = Text or "Text"
  867.                 Content = Content or "Content"
  868.  
  869.                 local ParagraphFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  870.                     Size = UDim2.new(1, 0, 0, 30),
  871.                     BackgroundTransparency = 0.7,
  872.                     Parent = ItemParent
  873.                 }), {
  874.                     AddThemeObject(SetProps(MakeElement("Label", Text, 15), {
  875.                         Size = UDim2.new(1, -12, 0, 14),
  876.                         Position = UDim2.new(0, 12, 0, 10),
  877.                         Font = Enum.Font.GothamBold,
  878.                         Name = "Title"
  879.                     }), "Text"),
  880.                     AddThemeObject(SetProps(MakeElement("Label", "", 13), {
  881.                         Size = UDim2.new(1, -24, 0, 0),
  882.                         Position = UDim2.new(0, 12, 0, 26),
  883.                         Font = Enum.Font.GothamSemibold,
  884.                         Name = "Content",
  885.                         TextWrapped = true
  886.                     }), "TextDark"),
  887.                     AddThemeObject(MakeElement("Stroke"), "Stroke")
  888.                 }), "Second")
  889.  
  890.                 AddConnection(ParagraphFrame.Content:GetPropertyChangedSignal("Text"), function()
  891.                     ParagraphFrame.Content.Size = UDim2.new(1, -24, 0, ParagraphFrame.Content.TextBounds.Y)
  892.                     ParagraphFrame.Size = UDim2.new(1, 0, 0, ParagraphFrame.Content.TextBounds.Y + 35)
  893.                 end)
  894.  
  895.                 ParagraphFrame.Content.Text = Content
  896.  
  897.                 local ParagraphFunction = {}
  898.                 function ParagraphFunction:Set(ToChange)
  899.                     ParagraphFrame.Content.Text = ToChange
  900.                 end
  901.                 return ParagraphFunction
  902.             end    
  903.             function ElementFunction:AddButton(ButtonConfig)
  904.                 ButtonConfig = ButtonConfig or {}
  905.                 ButtonConfig.Name = ButtonConfig.Name or "Button"
  906.                 ButtonConfig.Callback = ButtonConfig.Callback or function() end
  907.                 ButtonConfig.Icon = ButtonConfig.Icon or "rbxassetid://3944703587"
  908.  
  909.                 local Button = {}
  910.  
  911.                 local Click = SetProps(MakeElement("Button"), {
  912.                     Size = UDim2.new(1, 0, 1, 0)
  913.                 })
  914.  
  915.                 local ButtonFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  916.                     Size = UDim2.new(1, 0, 0, 33),
  917.                     Parent = ItemParent
  918.                 }), {
  919.                     AddThemeObject(SetProps(MakeElement("Label", ButtonConfig.Name, 15), {
  920.                         Size = UDim2.new(1, -12, 1, 0),
  921.                         Position = UDim2.new(0, 12, 0, 0),
  922.                         Font = Enum.Font.GothamBold,
  923.                         Name = "Content"
  924.                     }), "Text"),
  925.                     AddThemeObject(SetProps(MakeElement("Image", ButtonConfig.Icon), {
  926.                         Size = UDim2.new(0, 20, 0, 20),
  927.                         Position = UDim2.new(1, -30, 0, 7),
  928.                     }), "TextDark"),
  929.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  930.                     Click
  931.                 }), "Second")
  932.  
  933.                 AddConnection(Click.MouseEnter, function()
  934.                     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()
  935.                 end)
  936.  
  937.                 AddConnection(Click.MouseLeave, function()
  938.                     TweenService:Create(ButtonFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  939.                 end)
  940.  
  941.                 AddConnection(Click.MouseButton1Up, function()
  942.                     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()
  943.                     spawn(function()
  944.                         ButtonConfig.Callback()
  945.                     end)
  946.                 end)
  947.  
  948.                 AddConnection(Click.MouseButton1Down, function()
  949.                     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()
  950.                 end)
  951.  
  952.                 function Button:Set(ButtonText)
  953.                     ButtonFrame.Content.Text = ButtonText
  954.                 end
  955.  
  956.                 return Button
  957.             end    
  958.             function ElementFunction:AddToggle(ToggleConfig)
  959.                 ToggleConfig = ToggleConfig or {}
  960.                 ToggleConfig.Name = ToggleConfig.Name or "Toggle"
  961.                 ToggleConfig.Default = ToggleConfig.Default or false
  962.                 ToggleConfig.Callback = ToggleConfig.Callback or function() end
  963.                 ToggleConfig.Color = ToggleConfig.Color or Color3.fromRGB(9, 99, 195)
  964.                 ToggleConfig.Flag = ToggleConfig.Flag or nil
  965.                 ToggleConfig.Save = ToggleConfig.Save or false
  966.  
  967.                 local Toggle = {Value = ToggleConfig.Default, Save = ToggleConfig.Save}
  968.  
  969.                 local Click = SetProps(MakeElement("Button"), {
  970.                     Size = UDim2.new(1, 0, 1, 0)
  971.                 })
  972.  
  973.                 local ToggleBox = SetChildren(SetProps(MakeElement("RoundFrame", ToggleConfig.Color, 0, 4), {
  974.                     Size = UDim2.new(0, 24, 0, 24),
  975.                     Position = UDim2.new(1, -24, 0.5, 0),
  976.                     AnchorPoint = Vector2.new(0.5, 0.5)
  977.                 }), {
  978.                     SetProps(MakeElement("Stroke"), {
  979.                         Color = ToggleConfig.Color,
  980.                         Name = "Stroke",
  981.                         Transparency = 0.5
  982.                     }),
  983.                     SetProps(MakeElement("Image", "rbxassetid://3944680095"), {
  984.                         Size = UDim2.new(0, 20, 0, 20),
  985.                         AnchorPoint = Vector2.new(0.5, 0.5),
  986.                         Position = UDim2.new(0.5, 0, 0.5, 0),
  987.                         ImageColor3 = Color3.fromRGB(255, 255, 255),
  988.                         Name = "Ico"
  989.                     }),
  990.                 })
  991.  
  992.                 local ToggleFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  993.                     Size = UDim2.new(1, 0, 0, 38),
  994.                     Parent = ItemParent
  995.                 }), {
  996.                     AddThemeObject(SetProps(MakeElement("Label", ToggleConfig.Name, 15), {
  997.                         Size = UDim2.new(1, -12, 1, 0),
  998.                         Position = UDim2.new(0, 12, 0, 0),
  999.                         Font = Enum.Font.GothamBold,
  1000.                         Name = "Content"
  1001.                     }), "Text"),
  1002.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1003.                     ToggleBox,
  1004.                     Click
  1005.                 }), "Second")
  1006.  
  1007.                 function Toggle:Set(Value)
  1008.                     Toggle.Value = Value
  1009.                     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()
  1010.                     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()
  1011.                     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()
  1012.                     ToggleConfig.Callback(Toggle.Value)
  1013.                 end    
  1014.  
  1015.                 Toggle:Set(Toggle.Value)
  1016.  
  1017.                 AddConnection(Click.MouseEnter, function()
  1018.                     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()
  1019.                 end)
  1020.  
  1021.                 AddConnection(Click.MouseLeave, function()
  1022.                     TweenService:Create(ToggleFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  1023.                 end)
  1024.  
  1025.                 AddConnection(Click.MouseButton1Up, function()
  1026.                     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()
  1027.                     SaveCfg(game.GameId)
  1028.                     Toggle:Set(not Toggle.Value)
  1029.                 end)
  1030.  
  1031.                 AddConnection(Click.MouseButton1Down, function()
  1032.                     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()
  1033.                 end)
  1034.  
  1035.                 if ToggleConfig.Flag then
  1036.                     OrionLib.Flags[ToggleConfig.Flag] = Toggle
  1037.                 end
  1038.                 return Toggle
  1039.             end  
  1040.             function ElementFunction:AddSlider(SliderConfig)
  1041.                 SliderConfig = SliderConfig or {}
  1042.                 SliderConfig.Name = SliderConfig.Name or "Slider"
  1043.                 SliderConfig.Min = SliderConfig.Min or 0
  1044.                 SliderConfig.Max = SliderConfig.Max or 100
  1045.                 SliderConfig.Increment = SliderConfig.Increment or 1
  1046.                 SliderConfig.Default = SliderConfig.Default or 50
  1047.                 SliderConfig.Callback = SliderConfig.Callback or function() end
  1048.                 SliderConfig.ValueName = SliderConfig.ValueName or ""
  1049.                 SliderConfig.Color = SliderConfig.Color or Color3.fromRGB(9, 149, 98)
  1050.                 SliderConfig.Flag = SliderConfig.Flag or nil
  1051.                 SliderConfig.Save = SliderConfig.Save or false
  1052.  
  1053.                 local Slider = {Value = SliderConfig.Default, Save = SliderConfig.Save}
  1054.                 local Dragging = false
  1055.  
  1056.                 local SliderDrag = SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
  1057.                     Size = UDim2.new(0, 0, 1, 0),
  1058.                     BackgroundTransparency = 0.3,
  1059.                     ClipsDescendants = true
  1060.                 }), {
  1061.                     AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
  1062.                         Size = UDim2.new(1, -12, 0, 14),
  1063.                         Position = UDim2.new(0, 12, 0, 6),
  1064.                         Font = Enum.Font.GothamBold,
  1065.                         Name = "Value",
  1066.                         TextTransparency = 0
  1067.                     }), "Text")
  1068.                 })
  1069.  
  1070.                 local SliderBar = SetChildren(SetProps(MakeElement("RoundFrame", SliderConfig.Color, 0, 5), {
  1071.                     Size = UDim2.new(1, -24, 0, 26),
  1072.                     Position = UDim2.new(0, 12, 0, 30),
  1073.                     BackgroundTransparency = 0.9
  1074.                 }), {
  1075.                     SetProps(MakeElement("Stroke"), {
  1076.                         Color = SliderConfig.Color
  1077.                     }),
  1078.                     AddThemeObject(SetProps(MakeElement("Label", "value", 13), {
  1079.                         Size = UDim2.new(1, -12, 0, 14),
  1080.                         Position = UDim2.new(0, 12, 0, 6),
  1081.                         Font = Enum.Font.GothamBold,
  1082.                         Name = "Value",
  1083.                         TextTransparency = 0.8
  1084.                     }), "Text"),
  1085.                     SliderDrag
  1086.                 })
  1087.  
  1088.                 local SliderFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1089.                     Size = UDim2.new(1, 0, 0, 65),
  1090.                     Parent = ItemParent
  1091.                 }), {
  1092.                     AddThemeObject(SetProps(MakeElement("Label", SliderConfig.Name, 15), {
  1093.                         Size = UDim2.new(1, -12, 0, 14),
  1094.                         Position = UDim2.new(0, 12, 0, 10),
  1095.                         Font = Enum.Font.GothamBold,
  1096.                         Name = "Content"
  1097.                     }), "Text"),
  1098.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1099.                     SliderBar
  1100.                 }), "Second")
  1101.  
  1102.                 SliderBar.InputBegan:Connect(function(Input)
  1103.                     if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1104.                         Dragging = true
  1105.                     end
  1106.                 end)
  1107.                 SliderBar.InputEnded:Connect(function(Input)
  1108.                     if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1109.                         Dragging = false
  1110.                     end
  1111.                 end)
  1112.  
  1113.                 UserInputService.InputChanged:Connect(function(Input)
  1114.                     if Dragging and Input.UserInputType == Enum.UserInputType.MouseMovement then
  1115.                         local SizeScale = math.clamp((Input.Position.X - SliderBar.AbsolutePosition.X) / SliderBar.AbsoluteSize.X, 0, 1)
  1116.                         Slider:Set(SliderConfig.Min + ((SliderConfig.Max - SliderConfig.Min) * SizeScale))
  1117.                         SaveCfg(game.GameId)
  1118.                     end
  1119.                 end)
  1120.  
  1121.                 function Slider:Set(Value)
  1122.                     self.Value = math.clamp(Round(Value, SliderConfig.Increment), SliderConfig.Min, SliderConfig.Max)
  1123.                     TweenService:Create(SliderDrag,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = UDim2.fromScale((self.Value - SliderConfig.Min) / (SliderConfig.Max - SliderConfig.Min), 1)}):Play()
  1124.                     SliderBar.Value.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName
  1125.                     SliderDrag.Value.Text = tostring(self.Value) .. " " .. SliderConfig.ValueName
  1126.                     SliderConfig.Callback(self.Value)
  1127.                 end      
  1128.  
  1129.                 Slider:Set(Slider.Value)
  1130.                 if SliderConfig.Flag then              
  1131.                     OrionLib.Flags[SliderConfig.Flag] = Slider
  1132.                 end
  1133.                 return Slider
  1134.             end  
  1135.             function ElementFunction:AddDropdown(DropdownConfig)
  1136.                 DropdownConfig = DropdownConfig or {}
  1137.                 DropdownConfig.Name = DropdownConfig.Name or "Dropdown"
  1138.                 DropdownConfig.Options = DropdownConfig.Options or {}
  1139.                 DropdownConfig.Default = DropdownConfig.Default or ""
  1140.                 DropdownConfig.Callback = DropdownConfig.Callback or function() end
  1141.                 DropdownConfig.Flag = DropdownConfig.Flag or nil
  1142.                 DropdownConfig.Save = DropdownConfig.Save or false
  1143.  
  1144.                 local Dropdown = {Value = DropdownConfig.Default, Options = DropdownConfig.Options, Buttons = {}, Toggled = false, Type = "Dropdown", Save = DropdownConfig.Save}
  1145.                 local MaxElements = 5
  1146.  
  1147.                 if not table.find(Dropdown.Options, Dropdown.Value) then
  1148.                     Dropdown.Value = "..."
  1149.                 end
  1150.  
  1151.                 local DropdownList = MakeElement("List")
  1152.  
  1153.                 local DropdownContainer = AddThemeObject(SetProps(SetChildren(MakeElement("ScrollFrame", Color3.fromRGB(40, 40, 40), 4), {
  1154.                     DropdownList
  1155.                 }), {
  1156.                     Parent = ItemParent,
  1157.                     Position = UDim2.new(0, 0, 0, 38),
  1158.                     Size = UDim2.new(1, 0, 1, -38),
  1159.                     ClipsDescendants = true
  1160.                 }), "Divider")
  1161.  
  1162.                 local Click = SetProps(MakeElement("Button"), {
  1163.                     Size = UDim2.new(1, 0, 1, 0)
  1164.                 })
  1165.  
  1166.                 local DropdownFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1167.                     Size = UDim2.new(1, 0, 0, 38),
  1168.                     Parent = ItemParent,
  1169.                     ClipsDescendants = true
  1170.                 }), {
  1171.                     DropdownContainer,
  1172.                     SetProps(SetChildren(MakeElement("TFrame"), {
  1173.                         AddThemeObject(SetProps(MakeElement("Label", DropdownConfig.Name, 15), {
  1174.                             Size = UDim2.new(1, -12, 1, 0),
  1175.                             Position = UDim2.new(0, 12, 0, 0),
  1176.                             Font = Enum.Font.GothamBold,
  1177.                             Name = "Content"
  1178.                         }), "Text"),
  1179.                         AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://7072706796"), {
  1180.                             Size = UDim2.new(0, 20, 0, 20),
  1181.                             AnchorPoint = Vector2.new(0, 0.5),
  1182.                             Position = UDim2.new(1, -30, 0.5, 0),
  1183.                             ImageColor3 = Color3.fromRGB(240, 240, 240),
  1184.                             Name = "Ico"
  1185.                         }), "TextDark"),
  1186.                         AddThemeObject(SetProps(MakeElement("Label", "Selected", 13), {
  1187.                             Size = UDim2.new(1, -40, 1, 0),
  1188.                             Font = Enum.Font.Gotham,
  1189.                             Name = "Selected",
  1190.                             TextXAlignment = Enum.TextXAlignment.Right
  1191.                         }), "TextDark"),
  1192.                         AddThemeObject(SetProps(MakeElement("Frame"), {
  1193.                             Size = UDim2.new(1, 0, 0, 1),
  1194.                             Position = UDim2.new(0, 0, 1, -1),
  1195.                             Name = "Line",
  1196.                             Visible = false
  1197.                         }), "Stroke"),
  1198.                         Click
  1199.                     }), {
  1200.                         Size = UDim2.new(1, 0, 0, 38),
  1201.                         ClipsDescendants = true,
  1202.                         Name = "F"
  1203.                     }),
  1204.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1205.                     MakeElement("Corner")
  1206.                 }), "Second")
  1207.  
  1208.                 AddConnection(DropdownList:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1209.                     DropdownContainer.CanvasSize = UDim2.new(0, 0, 0, DropdownList.AbsoluteContentSize.Y)
  1210.                 end)  
  1211.  
  1212.                 local function AddOptions(Options)
  1213.                     for _, Option in pairs(Options) do
  1214.                         local OptionBtn = AddThemeObject(SetProps(SetChildren(MakeElement("Button", Color3.fromRGB(40, 40, 40)), {
  1215.                             MakeElement("Corner", 0, 6),
  1216.                             AddThemeObject(SetProps(MakeElement("Label", Option, 13, 0.4), {
  1217.                                 Position = UDim2.new(0, 8, 0, 0),
  1218.                                 Size = UDim2.new(1, -8, 1, 0),
  1219.                                 Name = "Title"
  1220.                             }), "Text")
  1221.                         }), {
  1222.                             Parent = DropdownContainer,
  1223.                             Size = UDim2.new(1, 0, 0, 28),
  1224.                             BackgroundTransparency = 1,
  1225.                             ClipsDescendants = true
  1226.                         }), "Divider")
  1227.  
  1228.                         AddConnection(OptionBtn.MouseButton1Click, function()
  1229.                             Dropdown:Set(Option)
  1230.                             SaveCfg(game.GameId)
  1231.                         end)
  1232.  
  1233.                         Dropdown.Buttons[Option] = OptionBtn
  1234.                     end
  1235.                 end
  1236.  
  1237.                 function Dropdown:Refresh(Options, Delete)
  1238.                     if Delete then
  1239.                         for _,v in pairs(Dropdown.Buttons) do
  1240.                             v:Destroy()
  1241.                         end    
  1242.                         table.clear(Dropdown.Options)
  1243.                         table.clear(Dropdown.Buttons)
  1244.                     end
  1245.                     Dropdown.Options = Options
  1246.                     AddOptions(Dropdown.Options)
  1247.                 end  
  1248.  
  1249.                 function Dropdown:Set(Value)
  1250.                     if not table.find(Dropdown.Options, Value) then
  1251.                         Dropdown.Value = "..."
  1252.                         DropdownFrame.F.Selected.Text = Dropdown.Value
  1253.                         for _, v in pairs(Dropdown.Buttons) do
  1254.                             TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
  1255.                             TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
  1256.                         end
  1257.                         return
  1258.                     end
  1259.  
  1260.                     Dropdown.Value = Value
  1261.                     DropdownFrame.F.Selected.Text = Dropdown.Value
  1262.  
  1263.                     for _, v in pairs(Dropdown.Buttons) do
  1264.                         TweenService:Create(v,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 1}):Play()
  1265.                         TweenService:Create(v.Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0.4}):Play()
  1266.                     end
  1267.                     TweenService:Create(Dropdown.Buttons[Value],TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{BackgroundTransparency = 0}):Play()
  1268.                     TweenService:Create(Dropdown.Buttons[Value].Title,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{TextTransparency = 0}):Play()
  1269.                     return DropdownConfig.Callback(Dropdown.Value)
  1270.                 end
  1271.  
  1272.                 AddConnection(Click.MouseButton1Click, function()
  1273.                     Dropdown.Toggled = not Dropdown.Toggled
  1274.                     DropdownFrame.F.Line.Visible = Dropdown.Toggled
  1275.                     TweenService:Create(DropdownFrame.F.Ico,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Rotation = Dropdown.Toggled and 180 or 0}):Play()
  1276.                     if #Dropdown.Options > MaxElements then
  1277.                         TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, 38 + (MaxElements * 28)) or UDim2.new(1, 0, 0, 38)}):Play()
  1278.                     else
  1279.                         TweenService:Create(DropdownFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Dropdown.Toggled and UDim2.new(1, 0, 0, DropdownList.AbsoluteContentSize.Y + 38) or UDim2.new(1, 0, 0, 38)}):Play()
  1280.                     end
  1281.                 end)
  1282.  
  1283.                 Dropdown:Refresh(Dropdown.Options, false)
  1284.                 Dropdown:Set(Dropdown.Value)
  1285.                 if DropdownConfig.Flag then            
  1286.                     OrionLib.Flags[DropdownConfig.Flag] = Dropdown
  1287.                 end
  1288.                 return Dropdown
  1289.             end
  1290.             function ElementFunction:AddBind(BindConfig)
  1291.                 BindConfig.Name = BindConfig.Name or "Bind"
  1292.                 BindConfig.Default = BindConfig.Default or Enum.KeyCode.Unknown
  1293.                 BindConfig.Hold = BindConfig.Hold or false
  1294.                 BindConfig.Callback = BindConfig.Callback or function() end
  1295.                 BindConfig.Flag = BindConfig.Flag or nil
  1296.                 BindConfig.Save = BindConfig.Save or false
  1297.  
  1298.                 local Bind = {Value, Binding = false, Type = "Bind", Save = BindConfig.Save}
  1299.                 local Holding = false
  1300.  
  1301.                 local Click = SetProps(MakeElement("Button"), {
  1302.                     Size = UDim2.new(1, 0, 1, 0)
  1303.                 })
  1304.  
  1305.                 local BindBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1306.                     Size = UDim2.new(0, 24, 0, 24),
  1307.                     Position = UDim2.new(1, -12, 0.5, 0),
  1308.                     AnchorPoint = Vector2.new(1, 0.5)
  1309.                 }), {
  1310.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1311.                     AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 14), {
  1312.                         Size = UDim2.new(1, 0, 1, 0),
  1313.                         Font = Enum.Font.GothamBold,
  1314.                         TextXAlignment = Enum.TextXAlignment.Center,
  1315.                         Name = "Value"
  1316.                     }), "Text")
  1317.                 }), "Main")
  1318.  
  1319.                 local BindFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1320.                     Size = UDim2.new(1, 0, 0, 38),
  1321.                     Parent = ItemParent
  1322.                 }), {
  1323.                     AddThemeObject(SetProps(MakeElement("Label", BindConfig.Name, 15), {
  1324.                         Size = UDim2.new(1, -12, 1, 0),
  1325.                         Position = UDim2.new(0, 12, 0, 0),
  1326.                         Font = Enum.Font.GothamBold,
  1327.                         Name = "Content"
  1328.                     }), "Text"),
  1329.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1330.                     BindBox,
  1331.                     Click
  1332.                 }), "Second")
  1333.  
  1334.                 AddConnection(BindBox.Value:GetPropertyChangedSignal("Text"), function()
  1335.                     --BindBox.Size = UDim2.new(0, BindBox.Value.TextBounds.X + 16, 0, 24)
  1336.                     TweenService:Create(BindBox, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, BindBox.Value.TextBounds.X + 16, 0, 24)}):Play()
  1337.                 end)
  1338.  
  1339.                 AddConnection(Click.InputEnded, function(Input)
  1340.                     if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1341.                         if Bind.Binding then return end
  1342.                         Bind.Binding = true
  1343.                         BindBox.Value.Text = ""
  1344.                     end
  1345.                 end)
  1346.  
  1347.                 AddConnection(UserInputService.InputBegan, function(Input)
  1348.                     if UserInputService:GetFocusedTextBox() then return end
  1349.                     if (Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value) and not Bind.Binding then
  1350.                         if BindConfig.Hold then
  1351.                             Holding = true
  1352.                             BindConfig.Callback(Holding)
  1353.                         else
  1354.                             BindConfig.Callback()
  1355.                         end
  1356.                     elseif Bind.Binding then
  1357.                         local Key
  1358.                         pcall(function()
  1359.                             if not CheckKey(BlacklistedKeys, Input.KeyCode) then
  1360.                                 Key = Input.KeyCode
  1361.                             end
  1362.                         end)
  1363.                         pcall(function()
  1364.                             if CheckKey(WhitelistedMouse, Input.UserInputType) and not Key then
  1365.                                 Key = Input.UserInputType
  1366.                             end
  1367.                         end)
  1368.                         Key = Key or Bind.Value
  1369.                         Bind:Set(Key)
  1370.                         SaveCfg(game.GameId)
  1371.                     end
  1372.                 end)
  1373.  
  1374.                 AddConnection(UserInputService.InputEnded, function(Input)
  1375.                     if Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value then
  1376.                         if BindConfig.Hold and Holding then
  1377.                             Holding = false
  1378.                             BindConfig.Callback(Holding)
  1379.                         end
  1380.                     end
  1381.                 end)
  1382.  
  1383.                 AddConnection(Click.MouseEnter, function()
  1384.                     TweenService:Create(BindFrame, 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()
  1385.                 end)
  1386.  
  1387.                 AddConnection(Click.MouseLeave, function()
  1388.                     TweenService:Create(BindFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  1389.                 end)
  1390.  
  1391.                 AddConnection(Click.MouseButton1Up, function()
  1392.                     TweenService:Create(BindFrame, 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()
  1393.                 end)
  1394.  
  1395.                 AddConnection(Click.MouseButton1Down, function()
  1396.                     TweenService:Create(BindFrame, 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()
  1397.                 end)
  1398.  
  1399.                 function Bind:Set(Key)
  1400.                     Bind.Binding = false
  1401.                     Bind.Value = Key or Bind.Value
  1402.                     Bind.Value = Bind.Value.Name or Bind.Value
  1403.                     BindBox.Value.Text = Bind.Value
  1404.                 end
  1405.  
  1406.                 Bind:Set(BindConfig.Default)
  1407.                 if BindConfig.Flag then            
  1408.                     OrionLib.Flags[BindConfig.Flag] = Bind
  1409.                 end
  1410.                 return Bind
  1411.             end  
  1412.             function ElementFunction:AddTextbox(TextboxConfig)
  1413.                 TextboxConfig = TextboxConfig or {}
  1414.                 TextboxConfig.Name = TextboxConfig.Name or "Textbox"
  1415.                 TextboxConfig.Default = TextboxConfig.Default or ""
  1416.                 TextboxConfig.TextDisappear = TextboxConfig.TextDisappear or false
  1417.                 TextboxConfig.Callback = TextboxConfig.Callback or function() end
  1418.  
  1419.                 local Click = SetProps(MakeElement("Button"), {
  1420.                     Size = UDim2.new(1, 0, 1, 0)
  1421.                 })
  1422.  
  1423.                 local TextboxActual = AddThemeObject(Create("TextBox", {
  1424.                     Size = UDim2.new(1, 0, 1, 0),
  1425.                     BackgroundTransparency = 1,
  1426.                     TextColor3 = Color3.fromRGB(255, 255, 255),
  1427.                     PlaceholderColor3 = Color3.fromRGB(210,210,210),
  1428.                     PlaceholderText = "Input",
  1429.                     Font = Enum.Font.GothamSemibold,
  1430.                     TextXAlignment = Enum.TextXAlignment.Center,
  1431.                     TextSize = 14,
  1432.                     ClearTextOnFocus = false
  1433.                 }), "Text")
  1434.  
  1435.                 local TextContainer = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1436.                     Size = UDim2.new(0, 24, 0, 24),
  1437.                     Position = UDim2.new(1, -12, 0.5, 0),
  1438.                     AnchorPoint = Vector2.new(1, 0.5)
  1439.                 }), {
  1440.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1441.                     TextboxActual
  1442.                 }), "Main")
  1443.  
  1444.  
  1445.                 local TextboxFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1446.                     Size = UDim2.new(1, 0, 0, 38),
  1447.                     Parent = ItemParent
  1448.                 }), {
  1449.                     AddThemeObject(SetProps(MakeElement("Label", TextboxConfig.Name, 15), {
  1450.                         Size = UDim2.new(1, -12, 1, 0),
  1451.                         Position = UDim2.new(0, 12, 0, 0),
  1452.                         Font = Enum.Font.GothamBold,
  1453.                         Name = "Content"
  1454.                     }), "Text"),
  1455.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1456.                     TextContainer,
  1457.                     Click
  1458.                 }), "Second")
  1459.  
  1460.                 AddConnection(TextboxActual:GetPropertyChangedSignal("Text"), function()
  1461.                     --TextContainer.Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 0, 24)
  1462.                     TweenService:Create(TextContainer, TweenInfo.new(0.45, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, TextboxActual.TextBounds.X + 16, 0, 24)}):Play()
  1463.                 end)
  1464.  
  1465.                 AddConnection(TextboxActual.FocusLost, function()
  1466.                     TextboxConfig.Callback(TextboxActual.Text)
  1467.                     if TextboxConfig.TextDisappear then
  1468.                         TextboxActual.Text = ""
  1469.                     end
  1470.                 end)
  1471.  
  1472.                 TextboxActual.Text = TextboxConfig.Default
  1473.  
  1474.                 AddConnection(Click.MouseEnter, function()
  1475.                     TweenService:Create(TextboxFrame, 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()
  1476.                 end)
  1477.  
  1478.                 AddConnection(Click.MouseLeave, function()
  1479.                     TweenService:Create(TextboxFrame, TweenInfo.new(0.25, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = OrionLib.Themes[OrionLib.SelectedTheme].Second}):Play()
  1480.                 end)
  1481.  
  1482.                 AddConnection(Click.MouseButton1Up, function()
  1483.                     TweenService:Create(TextboxFrame, 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()
  1484.                     TextboxActual:CaptureFocus()
  1485.                 end)
  1486.  
  1487.                 AddConnection(Click.MouseButton1Down, function()
  1488.                     TweenService:Create(TextboxFrame, 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()
  1489.                 end)
  1490.             end
  1491.             function ElementFunction:AddColorpicker(ColorpickerConfig)
  1492.                 ColorpickerConfig = ColorpickerConfig or {}
  1493.                 ColorpickerConfig.Name = ColorpickerConfig.Name or "Colorpicker"
  1494.                 ColorpickerConfig.Default = ColorpickerConfig.Default or Color3.fromRGB(255,255,255)
  1495.                 ColorpickerConfig.Callback = ColorpickerConfig.Callback or function() end
  1496.                 ColorpickerConfig.Flag = ColorpickerConfig.Flag or nil
  1497.                 ColorpickerConfig.Save = ColorpickerConfig.Save or false
  1498.  
  1499.                 local ColorH, ColorS, ColorV = 1, 1, 1
  1500.                 local Colorpicker = {Value = ColorpickerConfig.Default, Toggled = false, Type = "Colorpicker", Save = ColorpickerConfig.Save}
  1501.  
  1502.                 local ColorSelection = Create("ImageLabel", {
  1503.                     Size = UDim2.new(0, 18, 0, 18),
  1504.                     Position = UDim2.new(select(3, Color3.toHSV(Colorpicker.Value))),
  1505.                     ScaleType = Enum.ScaleType.Fit,
  1506.                     AnchorPoint = Vector2.new(0.5, 0.5),
  1507.                     BackgroundTransparency = 1,
  1508.                     Image = "http://www.roblox.com/asset/?id=4805639000"
  1509.                 })
  1510.  
  1511.                 local HueSelection = Create("ImageLabel", {
  1512.                     Size = UDim2.new(0, 18, 0, 18),
  1513.                     Position = UDim2.new(0.5, 0, 1 - select(1, Color3.toHSV(Colorpicker.Value))),
  1514.                     ScaleType = Enum.ScaleType.Fit,
  1515.                     AnchorPoint = Vector2.new(0.5, 0.5),
  1516.                     BackgroundTransparency = 1,
  1517.                     Image = "http://www.roblox.com/asset/?id=4805639000"
  1518.                 })
  1519.  
  1520.                 local Color = Create("ImageLabel", {
  1521.                     Size = UDim2.new(1, -25, 1, 0),
  1522.                     Visible = false,
  1523.                     Image = "rbxassetid://4155801252"
  1524.                 }, {
  1525.                     Create("UICorner", {CornerRadius = UDim.new(0, 5)}),
  1526.                     ColorSelection
  1527.                 })
  1528.  
  1529.                 local Hue = Create("Frame", {
  1530.                     Size = UDim2.new(0, 20, 1, 0),
  1531.                     Position = UDim2.new(1, -20, 0, 0),
  1532.                     Visible = false
  1533.                 }, {
  1534.                     Create("UIGradient", {Rotation = 270, Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 4)), ColorSequenceKeypoint.new(0.20, Color3.fromRGB(234, 255, 0)), ColorSequenceKeypoint.new(0.40, Color3.fromRGB(21, 255, 0)), ColorSequenceKeypoint.new(0.60, Color3.fromRGB(0, 255, 255)), ColorSequenceKeypoint.new(0.80, Color3.fromRGB(0, 17, 255)), ColorSequenceKeypoint.new(0.90, Color3.fromRGB(255, 0, 251)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 4))},}),
  1535.                     Create("UICorner", {CornerRadius = UDim.new(0, 5)}),
  1536.                     HueSelection
  1537.                 })
  1538.  
  1539.                 local ColorpickerContainer = Create("Frame", {
  1540.                     Position = UDim2.new(0, 0, 0, 32),
  1541.                     Size = UDim2.new(1, 0, 1, -32),
  1542.                     BackgroundTransparency = 1,
  1543.                     ClipsDescendants = true
  1544.                 }, {
  1545.                     Hue,
  1546.                     Color,
  1547.                     Create("UIPadding", {
  1548.                         PaddingLeft = UDim.new(0, 35),
  1549.                         PaddingRight = UDim.new(0, 35),
  1550.                         PaddingBottom = UDim.new(0, 10),
  1551.                         PaddingTop = UDim.new(0, 17)
  1552.                     })
  1553.                 })
  1554.  
  1555.                 local Click = SetProps(MakeElement("Button"), {
  1556.                     Size = UDim2.new(1, 0, 1, 0)
  1557.                 })
  1558.  
  1559.                 local ColorpickerBox = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 4), {
  1560.                     Size = UDim2.new(0, 24, 0, 24),
  1561.                     Position = UDim2.new(1, -12, 0.5, 0),
  1562.                     AnchorPoint = Vector2.new(1, 0.5)
  1563.                 }), {
  1564.                     AddThemeObject(MakeElement("Stroke"), "Stroke")
  1565.                 }), "Main")
  1566.  
  1567.                 local ColorpickerFrame = AddThemeObject(SetChildren(SetProps(MakeElement("RoundFrame", Color3.fromRGB(255, 255, 255), 0, 5), {
  1568.                     Size = UDim2.new(1, 0, 0, 38),
  1569.                     Parent = ItemParent
  1570.                 }), {
  1571.                     SetProps(SetChildren(MakeElement("TFrame"), {
  1572.                         AddThemeObject(SetProps(MakeElement("Label", ColorpickerConfig.Name, 15), {
  1573.                             Size = UDim2.new(1, -12, 1, 0),
  1574.                             Position = UDim2.new(0, 12, 0, 0),
  1575.                             Font = Enum.Font.GothamBold,
  1576.                             Name = "Content"
  1577.                         }), "Text"),
  1578.                         ColorpickerBox,
  1579.                         Click,
  1580.                         AddThemeObject(SetProps(MakeElement("Frame"), {
  1581.                             Size = UDim2.new(1, 0, 0, 1),
  1582.                             Position = UDim2.new(0, 0, 1, -1),
  1583.                             Name = "Line",
  1584.                             Visible = false
  1585.                         }), "Stroke"),
  1586.                     }), {
  1587.                         Size = UDim2.new(1, 0, 0, 38),
  1588.                         ClipsDescendants = true,
  1589.                         Name = "F"
  1590.                     }),
  1591.                     ColorpickerContainer,
  1592.                     AddThemeObject(MakeElement("Stroke"), "Stroke"),
  1593.                 }), "Second")
  1594.  
  1595.                 AddConnection(Click.MouseButton1Click, function()
  1596.                     Colorpicker.Toggled = not Colorpicker.Toggled
  1597.                     TweenService:Create(ColorpickerFrame,TweenInfo.new(.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{Size = Colorpicker.Toggled and UDim2.new(1, 0, 0, 148) or UDim2.new(1, 0, 0, 38)}):Play()
  1598.                     Color.Visible = Colorpicker.Toggled
  1599.                     Hue.Visible = Colorpicker.Toggled
  1600.                     ColorpickerFrame.F.Line.Visible = Colorpicker.Toggled
  1601.                 end)
  1602.  
  1603.                 local function UpdateColorPicker()
  1604.                     ColorpickerBox.BackgroundColor3 = Color3.fromHSV(ColorH, ColorS, ColorV)
  1605.                     Color.BackgroundColor3 = Color3.fromHSV(ColorH, 1, 1)
  1606.                     Colorpicker:Set(ColorpickerBox.BackgroundColor3)
  1607.                     ColorpickerConfig.Callback(ColorpickerBox.BackgroundColor3)
  1608.                     SaveCfg(game.GameId)
  1609.                 end
  1610.  
  1611.                 ColorH = 1 - (math.clamp(HueSelection.AbsolutePosition.Y - Hue.AbsolutePosition.Y, 0, Hue.AbsoluteSize.Y) / Hue.AbsoluteSize.Y)
  1612.                 ColorS = (math.clamp(ColorSelection.AbsolutePosition.X - Color.AbsolutePosition.X, 0, Color.AbsoluteSize.X) / Color.AbsoluteSize.X)
  1613.                 ColorV = 1 - (math.clamp(ColorSelection.AbsolutePosition.Y - Color.AbsolutePosition.Y, 0, Color.AbsoluteSize.Y) / Color.AbsoluteSize.Y)
  1614.  
  1615.                 AddConnection(Color.InputBegan, function(input)
  1616.                     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1617.                         if ColorInput then
  1618.                             ColorInput:Disconnect()
  1619.                         end
  1620.                         ColorInput = AddConnection(RunService.RenderStepped, function()
  1621.                             local ColorX = (math.clamp(Mouse.X - Color.AbsolutePosition.X, 0, Color.AbsoluteSize.X) / Color.AbsoluteSize.X)
  1622.                             local ColorY = (math.clamp(Mouse.Y - Color.AbsolutePosition.Y, 0, Color.AbsoluteSize.Y) / Color.AbsoluteSize.Y)
  1623.                             ColorSelection.Position = UDim2.new(ColorX, 0, ColorY, 0)
  1624.                             ColorS = ColorX
  1625.                             ColorV = 1 - ColorY
  1626.                             UpdateColorPicker()
  1627.                         end)
  1628.                     end
  1629.                 end)
  1630.  
  1631.                 AddConnection(Color.InputEnded, function(input)
  1632.                     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1633.                         if ColorInput then
  1634.                             ColorInput:Disconnect()
  1635.                         end
  1636.                     end
  1637.                 end)
  1638.  
  1639.                 AddConnection(Hue.InputBegan, function(input)
  1640.                     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1641.                         if HueInput then
  1642.                             HueInput:Disconnect()
  1643.                         end;
  1644.  
  1645.                         HueInput = AddConnection(RunService.RenderStepped, function()
  1646.                             local HueY = (math.clamp(Mouse.Y - Hue.AbsolutePosition.Y, 0, Hue.AbsoluteSize.Y) / Hue.AbsoluteSize.Y)
  1647.  
  1648.                             HueSelection.Position = UDim2.new(0.5, 0, HueY, 0)
  1649.                             ColorH = 1 - HueY
  1650.  
  1651.                             UpdateColorPicker()
  1652.                         end)
  1653.                     end
  1654.                 end)
  1655.  
  1656.                 AddConnection(Hue.InputEnded, function(input)
  1657.                     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  1658.                         if HueInput then
  1659.                             HueInput:Disconnect()
  1660.                         end
  1661.                     end
  1662.                 end)
  1663.  
  1664.                 function Colorpicker:Set(Value)
  1665.                     Colorpicker.Value = Value
  1666.                     ColorpickerBox.BackgroundColor3 = Colorpicker.Value
  1667.                     ColorpickerConfig.Callback(Colorpicker.Value)
  1668.                 end
  1669.  
  1670.                 Colorpicker:Set(Colorpicker.Value)
  1671.                 if ColorpickerConfig.Flag then             
  1672.                     OrionLib.Flags[ColorpickerConfig.Flag] = Colorpicker
  1673.                 end
  1674.                 return Colorpicker
  1675.             end  
  1676.             return ElementFunction  
  1677.         end
  1678.  
  1679.         local ElementFunction = {}
  1680.  
  1681.         function ElementFunction:AddSection(SectionConfig)
  1682.             SectionConfig.Name = SectionConfig.Name or "Section"
  1683.  
  1684.             local SectionFrame = SetChildren(SetProps(MakeElement("TFrame"), {
  1685.                 Size = UDim2.new(1, 0, 0, 26),
  1686.                 Parent = Container
  1687.             }), {
  1688.                 AddThemeObject(SetProps(MakeElement("Label", SectionConfig.Name, 14), {
  1689.                     Size = UDim2.new(1, -12, 0, 16),
  1690.                     Position = UDim2.new(0, 0, 0, 3),
  1691.                     Font = Enum.Font.GothamSemibold
  1692.                 }), "TextDark"),
  1693.                 SetChildren(SetProps(MakeElement("TFrame"), {
  1694.                     AnchorPoint = Vector2.new(0, 0),
  1695.                     Size = UDim2.new(1, 0, 1, -24),
  1696.                     Position = UDim2.new(0, 0, 0, 23),
  1697.                     Name = "Holder"
  1698.                 }), {
  1699.                     MakeElement("List", 0, 6)
  1700.                 }),
  1701.             })
  1702.  
  1703.             AddConnection(SectionFrame.Holder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1704.                 SectionFrame.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y + 31)
  1705.                 SectionFrame.Holder.Size = UDim2.new(1, 0, 0, SectionFrame.Holder.UIListLayout.AbsoluteContentSize.Y)
  1706.             end)
  1707.  
  1708.             local SectionFunction = {}
  1709.             for i, v in next, GetElements(SectionFrame.Holder) do
  1710.                 SectionFunction[i] = v
  1711.             end
  1712.             return SectionFunction
  1713.         end
  1714.  
  1715.         for i, v in next, GetElements(Container) do
  1716.             ElementFunction[i] = v
  1717.         end
  1718.  
  1719.         if TabConfig.PremiumOnly then
  1720.             for i, v in next, ElementFunction do
  1721.                 ElementFunction[i] = function() end
  1722.             end    
  1723.             Container:FindFirstChild("UIListLayout"):Destroy()
  1724.             Container:FindFirstChild("UIPadding"):Destroy()
  1725.             SetChildren(SetProps(MakeElement("TFrame"), {
  1726.                 Size = UDim2.new(1, 0, 1, 0),
  1727.                 Parent = ItemParent
  1728.             }), {
  1729.                 AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://3610239960"), {
  1730.                     Size = UDim2.new(0, 18, 0, 18),
  1731.                     Position = UDim2.new(0, 15, 0, 15),
  1732.                     ImageTransparency = 0.4
  1733.                 }), "Text"),
  1734.                 AddThemeObject(SetProps(MakeElement("Label", "Unauthorised Access", 14), {
  1735.                     Size = UDim2.new(1, -38, 0, 14),
  1736.                     Position = UDim2.new(0, 38, 0, 18),
  1737.                     TextTransparency = 0.4
  1738.                 }), "Text"),
  1739.                 AddThemeObject(SetProps(MakeElement("Image", "rbxassetid://4483345875"), {
  1740.                     Size = UDim2.new(0, 56, 0, 56),
  1741.                     Position = UDim2.new(0, 84, 0, 110),
  1742.                 }), "Text"),
  1743.                 AddThemeObject(SetProps(MakeElement("Label", "Premium Features", 14), {
  1744.                     Size = UDim2.new(1, -150, 0, 14),
  1745.                     Position = UDim2.new(0, 150, 0, 112),
  1746.                     Font = Enum.Font.GothamBold
  1747.                 }), "Text"),
  1748.                 AddThemeObject(SetProps(MakeElement("Label", "This part of the script is locked to Sirius Premium users. Purchase Premium in the Discord server (discord.gg/sirius)", 12), {
  1749.                     Size = UDim2.new(1, -200, 0, 14),
  1750.                     Position = UDim2.new(0, 150, 0, 138),
  1751.                     TextWrapped = true,
  1752.                     TextTransparency = 0.4
  1753.                 }), "Text")
  1754.             })
  1755.         end
  1756.         return ElementFunction  
  1757.     end  
  1758.    
  1759.     --if writefile and isfile then
  1760.     --  if not isfile("NewLibraryNotification1.txt") then
  1761.     --      local http_req = (syn and syn.request) or (http and http.request) or http_request
  1762.     --      if http_req then
  1763.     --          http_req({
  1764.     --              Url = 'http://127.0.0.1:6463/rpc?v=1',
  1765.     --              Method = 'POST',
  1766.     --              Headers = {
  1767.     --                  ['Content-Type'] = 'application/json',
  1768.     --                  Origin = 'https://discord.com'
  1769.     --              },
  1770.     --              Body = HttpService:JSONEncode({
  1771.     --                  cmd = 'INVITE_BROWSER',
  1772.     --                  nonce = HttpService:GenerateGUID(false),
  1773.     --                  args = {code = 'sirius'}
  1774.     --              })
  1775.     --          })
  1776.     --      end
  1777.     --      OrionLib:MakeNotification({
  1778.     --          Name = "UI Library Available",
  1779.     --          Content = "New UI Library Available - Joining Discord (#announcements)",
  1780.     --          Time = 8
  1781.     --      })
  1782.     --      spawn(function()
  1783.     --          local UI = game:GetObjects("rbxassetid://11403719739")[1]
  1784.  
  1785.     --          if gethui then
  1786.     --              UI.Parent = gethui()
  1787.     --          elseif syn.protect_gui then
  1788.     --              syn.protect_gui(UI)
  1789.     --              UI.Parent = game.CoreGui
  1790.     --          else
  1791.     --              UI.Parent = game.CoreGui
  1792.     --          end
  1793.  
  1794.     --          wait(11)
  1795.  
  1796.     --          UI:Destroy()
  1797.     --      end)
  1798.     --      writefile("NewLibraryNotification1.txt","The value for the notification having been sent to you.")
  1799.     --  end
  1800.     --end
  1801.    
  1802.  
  1803.    
  1804.     return TabFunction
  1805. end  
  1806.  
  1807. function OrionLib:Destroy()
  1808.     Orion:Destroy()
  1809. end
  1810.  
  1811. return OrionLib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement