Advertisement
Philup

Orion Library

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