Advertisement
bazilimf

Orion Library But Modified

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