Advertisement
RobloxLuaDeveloper

ORION LIBRARY [MODDED]

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