Advertisement
20CrackScratch08

Inferno X Script (UI)

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