Advertisement
overgrinds

Shadow

Nov 30th, 2024 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 189.74 KB | None | 0 0
  1. -- // Services
  2. local CoreGui = game:GetService('CoreGui')
  3. local TweenService = game:GetService('TweenService')
  4. local UserInputService = game:GetService('UserInputService')
  5. local RunService = game:GetService('RunService')
  6. local TextService = game:GetService('TextService')
  7. local Players = game:GetService('Players')
  8. local HttpService = game:GetService('HttpService')
  9.  
  10. -- // Variables
  11. getgenv().kms = false
  12. local Ihatethisui = {}
  13. local UIName = 'OVP'
  14. local Amount = 0
  15. local ConfigF
  16. local BreakAllLoops = false
  17. local ChangeTheme = false
  18. local NotificationTransparency = 0
  19. local Utility = {}
  20. local Library = {}
  21. local Config = {}
  22. local ConfigUpdates = {}
  23. local Themes = {
  24.     ['Default'] = {
  25.         BackgroundColor = Color3.fromRGB(25, 25, 25),
  26.         SidebarColor = Color3.fromRGB(30, 30, 30),
  27.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  28.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  29.         UIStrokeColor = Color3.fromRGB(60, 60, 60),
  30.         PrimaryElementColor = Color3.fromRGB(30, 30, 30),
  31.         SecondaryElementColor = Color3.fromRGB(50, 50, 50),
  32.         OtherElementColor = Color3.fromRGB(25, 25, 25),
  33.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  34.         PromptColor = Color3.fromRGB(40, 40, 40),
  35.         NotificationColor = Color3.fromRGB(25, 25, 25),
  36.         NotificationUIStrokeColor = Color3.fromRGB(125, 125, 125)
  37.     },
  38.     ['Lighter'] = {
  39.         BackgroundColor = Color3.fromRGB(40, 40, 40),
  40.         SidebarColor = Color3.fromRGB(45, 45, 45),
  41.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  42.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  43.         UIStrokeColor = Color3.fromRGB(80, 80, 80),
  44.         PrimaryElementColor = Color3.fromRGB(45, 45, 45),
  45.         SecondaryElementColor = Color3.fromRGB(65, 65, 65),
  46.         OtherElementColor = Color3.fromRGB(40, 40, 40),
  47.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  48.         PromptColor = Color3.fromRGB(60, 60, 60),
  49.         NotificationColor = Color3.fromRGB(40, 40, 40),
  50.         NotificationUIStrokeColor = Color3.fromRGB(125, 125, 125)
  51.     },
  52.     ['Light'] = {
  53.         BackgroundColor = Color3.fromRGB(255, 255, 255),
  54.         SidebarColor = Color3.fromRGB(200, 200, 200),
  55.         PrimaryTextColor = Color3.fromRGB(0, 0, 0),
  56.         SecondaryTextColor = Color3.fromRGB(75, 75, 75),
  57.         UIStrokeColor = Color3.fromRGB(0, 0, 0),
  58.         PrimaryElementColor = Color3.fromRGB(200, 200, 200),
  59.         SecondaryElementColor = Color3.fromRGB(150, 150, 150),
  60.         OtherElementColor = Color3.fromRGB(255, 255, 255),
  61.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  62.         PromptColor = Color3.fromRGB(200, 200, 200),
  63.         NotificationColor = Color3.fromRGB(255, 255, 255),
  64.         NotificationUIStrokeColor = Color3.fromRGB(0, 0, 0)
  65.     },
  66.     ['Light+'] = {
  67.         BackgroundColor = Color3.fromRGB(255, 255, 255),
  68.         SidebarColor = Color3.fromRGB(255, 255, 255),
  69.         PrimaryTextColor = Color3.fromRGB(0, 0, 0),
  70.         SecondaryTextColor = Color3.fromRGB(75, 75, 75),
  71.         UIStrokeColor = Color3.fromRGB(0, 0, 0),
  72.         PrimaryElementColor = Color3.fromRGB(255, 255, 255),
  73.         SecondaryElementColor = Color3.fromRGB(200, 200, 200),
  74.         OtherElementColor = Color3.fromRGB(255, 255, 255),
  75.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  76.         PromptColor = Color3.fromRGB(255, 255, 255),
  77.         NotificationColor = Color3.fromRGB(255, 255, 255),
  78.         NotificationUIStrokeColor = Color3.fromRGB(0, 0, 0)
  79.     },
  80.     ['Discord'] = {
  81.         BackgroundColor = Color3.fromRGB(54, 57, 63),
  82.         SidebarColor = Color3.fromRGB(44, 49, 54),
  83.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  84.         SecondaryTextColor = Color3.fromRGB(110, 110, 115),
  85.         UIStrokeColor = Color3.fromRGB(75, 75, 75),
  86.         PrimaryElementColor = Color3.fromRGB(48, 52, 57),
  87.         SecondaryElementColor = Color3.fromRGB(59, 65, 72),
  88.         OtherElementColor = Color3.fromRGB(54, 57, 63),
  89.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  90.         PromptColor = Color3.fromRGB(74, 77, 83),
  91.         NotificationColor = Color3.fromRGB(54, 57, 63),
  92.         NotificationUIStrokeColor = Color3.fromRGB(75, 75, 75)
  93.     },
  94.     ['Red And Black'] = {
  95.         BackgroundColor = Color3.fromRGB(0, 0, 0),
  96.         SidebarColor = Color3.fromRGB(0, 0, 0),
  97.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  98.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  99.         UIStrokeColor = Color3.fromRGB(255, 0, 0),
  100.         PrimaryElementColor = Color3.fromRGB(34, 31, 31),
  101.         SecondaryElementColor = Color3.fromRGB(50, 50, 50),
  102.         OtherElementColor = Color3.fromRGB(25, 25, 25),
  103.         ScrollBarColor = Color3.fromRGB(255, 0, 0),
  104.         PromptColor = Color3.fromRGB(40, 40, 40),
  105.         NotificationColor = Color3.fromRGB(255, 0, 0),
  106.         NotificationUIStrokeColor = Color3.fromRGB(255, 0, 0)
  107.     },
  108.     ['Nordic Dark'] = {
  109.         BackgroundColor = Color3.fromRGB(25, 30, 35),
  110.         SidebarColor = Color3.fromRGB(20, 25, 30),
  111.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  112.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  113.         UIStrokeColor = Color3.fromRGB(50, 60, 70),
  114.         PrimaryElementColor = Color3.fromRGB(30, 35, 40),
  115.         SecondaryElementColor = Color3.fromRGB(50, 55, 60),
  116.         OtherElementColor = Color3.fromRGB(25, 30, 35),
  117.         ScrollBarColor = Color3.fromRGB(100, 105, 110),
  118.         PromptColor = Color3.fromRGB(45, 50, 55),
  119.         NotificationColor = Color3.fromRGB(25, 30, 35),
  120.         NotificationUIStrokeColor = Color3.fromRGB(50, 60, 70)
  121.     },
  122.     ['Nordic Light'] = {
  123.         BackgroundColor = Color3.fromRGB(67, 75, 94),
  124.         SidebarColor = Color3.fromRGB(62, 67, 86),
  125.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  126.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  127.         UIStrokeColor = Color3.fromRGB(92, 97, 116),
  128.         PrimaryElementColor = Color3.fromRGB(62, 67, 86),
  129.         SecondaryElementColor = Color3.fromRGB(82, 87, 106),
  130.         OtherElementColor = Color3.fromRGB(67, 75, 94),
  131.         ScrollBarColor = Color3.fromRGB(100, 105, 110),
  132.         PromptColor = Color3.fromRGB(62, 67, 86),
  133.         NotificationColor = Color3.fromRGB(67, 75, 94),
  134.         NotificationUIStrokeColor = Color3.fromRGB(67, 75, 94)
  135.     },
  136.     ['Purple'] = {
  137.         BackgroundColor = Color3.fromRGB(30, 30, 45),
  138.         SidebarColor = Color3.fromRGB(40, 40, 60),
  139.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  140.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  141.         UIStrokeColor = Color3.fromRGB(60, 60, 80),
  142.         PrimaryElementColor = Color3.fromRGB(40, 40, 60),
  143.         SecondaryElementColor = Color3.fromRGB(60, 60, 80),
  144.         OtherElementColor = Color3.fromRGB(30, 30, 45),
  145.         ScrollBarColor = Color3.fromRGB(100, 105, 110),
  146.         PromptColor = Color3.fromRGB(50, 50, 65),
  147.         NotificationColor = Color3.fromRGB(30, 30, 45),
  148.         NotificationUIStrokeColor = Color3.fromRGB(60, 60, 80)
  149.     },
  150.     ['Sentinel'] = {
  151.         BackgroundColor = Color3.fromRGB(30, 30, 30),
  152.         SidebarColor = Color3.fromRGB(25, 25, 25),
  153.         PrimaryTextColor = Color3.fromRGB(130, 190, 130),
  154.         SecondaryTextColor = Color3.fromRGB(230, 35, 70),
  155.         UIStrokeColor = Color3.fromRGB(50, 50, 50),
  156.         PrimaryElementColor = Color3.fromRGB(25, 25, 25),
  157.         SecondaryElementColor = Color3.fromRGB(35, 35, 35),
  158.         OtherElementColor = Color3.fromRGB(30, 30, 30),
  159.         ScrollBarColor = Color3.fromRGB(70, 70, 70),
  160.         PromptColor = Color3.fromRGB(50, 50, 50),
  161.         NotificationColor = Color3.fromRGB(30, 30, 30),
  162.         NotificationUIStrokeColor = Color3.fromRGB(50, 50, 50)
  163.     },
  164.     ['Synapse X'] = {
  165.         BackgroundColor = Color3.fromRGB(50, 50, 50),
  166.         SidebarColor = Color3.fromRGB(50, 50, 50),
  167.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  168.         SecondaryTextColor = Color3.fromRGB(125, 125, 125),
  169.         UIStrokeColor = Color3.fromRGB(70, 70, 70),
  170.         PrimaryElementColor = Color3.fromRGB(60, 60, 60),
  171.         SecondaryElementColor = Color3.fromRGB(80, 80, 80),
  172.         OtherElementColor = Color3.fromRGB(50, 50, 50),
  173.         ScrollBarColor = Color3.fromRGB(70, 70, 70),
  174.         PromptColor = Color3.fromRGB(70, 70, 70),
  175.         NotificationColor = Color3.fromRGB(50, 50, 50),
  176.         NotificationUIStrokeColor = Color3.fromRGB(70, 70, 70)
  177.     },
  178.     ['Krnl'] = {
  179.         BackgroundColor = Color3.fromRGB(40, 40, 40),
  180.         SidebarColor = Color3.fromRGB(30, 30, 30),
  181.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  182.         SecondaryTextColor = Color3.fromRGB(125, 125, 125),
  183.         UIStrokeColor = Color3.fromRGB(60, 60, 60),
  184.         PrimaryElementColor = Color3.fromRGB(30, 30, 30),
  185.         SecondaryElementColor = Color3.fromRGB(40, 40, 40),
  186.         OtherElementColor = Color3.fromRGB(40, 40, 40),
  187.         ScrollBarColor = Color3.fromRGB(60, 60, 60),
  188.         PromptColor = Color3.fromRGB(60, 60, 60),
  189.         NotificationColor = Color3.fromRGB(40, 40, 40),
  190.         NotificationUIStrokeColor = Color3.fromRGB(60, 60, 60)
  191.     },
  192.     ['Script-Ware'] = {
  193.         BackgroundColor = Color3.fromRGB(30, 30, 30),
  194.         SidebarColor = Color3.fromRGB(35, 35, 35),
  195.         PrimaryTextColor = Color3.fromRGB(0, 125, 255),
  196.         SecondaryTextColor = Color3.fromRGB(255, 255, 255),
  197.         UIStrokeColor = Color3.fromRGB(50, 50, 50),
  198.         PrimaryElementColor = Color3.fromRGB(35, 35, 35),
  199.         SecondaryElementColor = Color3.fromRGB(45, 45, 45),
  200.         OtherElementColor = Color3.fromRGB(30, 30, 30),
  201.         ScrollBarColor = Color3.fromRGB(50, 50, 50),
  202.         PromptColor = Color3.fromRGB(50, 50, 50),
  203.         NotificationColor = Color3.fromRGB(30, 30, 30),
  204.         NotificationUIStrokeColor = Color3.fromRGB(50, 50, 50)
  205.     },
  206.     ['Kiriot'] = {
  207.         BackgroundColor = Color3.fromRGB(35, 35, 35),
  208.         SidebarColor = Color3.fromRGB(30, 30, 30),
  209.         PrimaryTextColor = Color3.fromRGB(255, 255, 255),
  210.         SecondaryTextColor = Color3.fromRGB(135, 135, 135),
  211.         UIStrokeColor = Color3.fromRGB(255, 170, 60),
  212.         PrimaryElementColor = Color3.fromRGB(30, 30, 30),
  213.         SecondaryElementColor = Color3.fromRGB(50, 50, 50),
  214.         OtherElementColor = Color3.fromRGB(25, 25, 25),
  215.         ScrollBarColor = Color3.fromRGB(125, 125, 125),
  216.         PromptColor = Color3.fromRGB(40, 40, 40),
  217.         NotificationColor = Color3.fromRGB(25, 25, 25),
  218.         NotificationUIStrokeColor = Color3.fromRGB(255, 170, 60)
  219.     }
  220. }
  221.  
  222. -- // Utility Functions
  223. do
  224.     function Utility:Tween(Instance, Properties, Duration, ...)
  225.         local TweenInfo = TweenInfo.new(Duration, ...)
  226.         TweenService:Create(Instance, TweenInfo, Properties):Play()
  227.     end
  228.  
  229.     function Utility:DestroyUI()
  230.         ChangeTheme = true
  231.         BreakAllLoops = true
  232.         writefile('fml.txt', 'true')
  233.         for Index, Value in next, Ihatethisui do
  234.             print(Index, Value)
  235.             Ihatethisui[Index]:Break()
  236.         end
  237.         if CoreGui:FindFirstChild(UIName) ~= nil then
  238.             CoreGui:FindFirstChild(UIName):Destroy()
  239.         end
  240.     end
  241.  
  242.     function Utility:Darken(Color)
  243.         local H, S, V = Color:ToHSV()
  244.  
  245.         V = math.clamp(V - 0.03, 0, 1)
  246.  
  247.         return Color3.fromHSV(H, S, V)
  248.     end
  249.  
  250.     function Utility:Lighten(Color)
  251.         local H, S, V = Color:ToHSV()
  252.  
  253.         V = math.clamp(V + 0.03, 0, 1)
  254.  
  255.         return Color3.fromHSV(H, S, V)
  256.     end
  257.  
  258.     function Utility:SplitColor(Color)
  259.         local R, G, B = math.floor(Color.R * 255), math.floor(Color.G * 255), math.floor(Color.B * 255)
  260.         return {R, G, B}
  261.     end
  262.  
  263.     function Utility:JoinColor(Table)
  264.         local R, G, B = Table[1], Table[2], Table[3]
  265.         return Color3.fromRGB(R, G, B)
  266.     end
  267.  
  268.     function Utility:ToggleUI()
  269.         if CoreGui:FindFirstChild(UIName) ~= nil then
  270.             CoreGui:FindFirstChild(UIName).Enabled = not CoreGui:FindFirstChild(UIName).Enabled
  271.         end
  272.     end
  273.  
  274.     function Utility:EnableDragging(Frame)
  275.         local Dragging, DraggingInput, DragStart, StartPosition
  276.        
  277.         local function Update(Input)
  278.             local Delta = Input.Position - DragStart
  279.             Frame.Position = UDim2.new(StartPosition.X.Scale, StartPosition.X.Offset + Delta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + Delta.Y)
  280.         end
  281.        
  282.         Frame.InputBegan:Connect(function(Input)
  283.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  284.                 Dragging = true
  285.                 DragStart = Input.Position
  286.                 StartPosition = Frame.Position
  287.        
  288.                 Input.Changed:Connect(function()
  289.                     if Input.UserInputState == Enum.UserInputState.End then
  290.                         Dragging = false
  291.                     end
  292.                 end)
  293.             end
  294.         end)
  295.        
  296.         Frame.InputChanged:Connect(function(Input)
  297.             if Input.UserInputType == Enum.UserInputType.MouseMovement then
  298.                 DraggingInput = Input
  299.             end
  300.         end)
  301.        
  302.         UserInputService.InputChanged:Connect(function(Input)
  303.             if Input == DraggingInput and Dragging then
  304.                 Update(Input)
  305.             end
  306.         end)
  307.     end
  308.  
  309.     function Utility:Create(_Instance, Properties, Children)
  310.         local Object = Instance.new(_Instance)
  311.         local Properties = Properties or {}
  312.         local Children = Children or {}
  313.        
  314.         for Index, Property in next, Properties do
  315.             Object[Index] = Property
  316.         end
  317.  
  318.         for _, Child in next, Children do
  319.             Child.Parent = Object
  320.         end
  321.  
  322.         return Object
  323.     end
  324.  
  325.     function Library:CreateNotification(Title, Text, Duration)
  326.         local Theme = {}
  327.         local File = readfile('VisualUILibraryCurrentTheme.json')
  328.         local Table = HttpService:JSONDecode(File)
  329.         for Index, Value in next, Table do
  330.             Theme[Index] = Utility:JoinColor(Value)
  331.         end
  332.  
  333.         task.spawn(function()
  334.             local Title = Title or 'Title'
  335.             local Text = Text or 'Text'
  336.             local Duration = Duration or 5
  337.  
  338.             if not CoreGui:FindFirstChild('Visual UI Library | .gg/puxxCphTnK | Notifications') then
  339.                 Utility:Create('ScreenGui', {
  340.                     Name = 'Visual UI Library | .gg/puxxCphTnK | Notifications',
  341.                     Parent = CoreGui
  342.                 })
  343.             else
  344.                 Utility:Create('Frame', {
  345.                     Parent = CoreGui:FindFirstChild('Visual UI Library | .gg/puxxCphTnK | Notifications'),
  346.                     Name = 'Notification'..tostring(Amount + 1),
  347.                     BackgroundColor3 = Theme.BackgroundColor,
  348.                     BorderSizePixel = 0,
  349.                     Position = UDim2.new(1, 300, 1, -30),
  350.                     Size = UDim2.new(0, 300, 0, 50),
  351.                     BackgroundTransparency = NotificationTransparency,
  352.                     AnchorPoint = Vector2.new(1, 1)
  353.                 }, {
  354.                     Utility:Create('UICorner', {
  355.                         CornerRadius = UDim.new(0, 5),
  356.                         Name = 'NotificationCorner'
  357.                     }),
  358.                     Utility:Create('UIStroke', {
  359.                         Name = 'NotificationStroke',
  360.                         ApplyStrokeMode = 'Contextual',
  361.                         Color = Theme.NotificationUIStrokeColor,
  362.                         LineJoinMode = 'Round',
  363.                         Thickness = 1
  364.                     }),
  365.                     Utility:Create('TextLabel', {
  366.                         Name = 'NotificationTitle',
  367.                         BackgroundTransparency = 1,
  368.                         Position = UDim2.new(0, 0, 0, -1),
  369.                         Size = UDim2.new(0, 300, 0, 30),
  370.                         Font = Enum.Font.Gotham,
  371.                         Text = Title,
  372.                         TextColor3 = Theme.PrimaryTextColor,
  373.                         TextSize = 16,
  374.                         TextXAlignment = Enum.TextXAlignment.Left
  375.                     }, {
  376.                         Utility:Create('UIPadding', {
  377.                             Name = 'NotificationTitlePadding',
  378.                             PaddingLeft = UDim.new(0, 7)
  379.                         })
  380.                     }),
  381.                     Utility:Create('TextLabel', {
  382.                         Name = 'NotificationText',
  383.                         BackgroundTransparency = 1,
  384.                         Position = UDim2.new(0, 0, 0, 25),
  385.                         Size = UDim2.new(0, 300, 0, 30),
  386.                         Font = Enum.Font.Gotham,
  387.                         Text = Text,
  388.                         TextWrapped = true,
  389.                         TextColor3 = Theme.SecondaryTextColor,
  390.                         TextSize = 14,
  391.                         TextXAlignment = Enum.TextXAlignment.Left
  392.                     }, {
  393.                         Utility:Create('UIPadding', {
  394.                             Name = 'NotificationTextPadding',
  395.                             PaddingLeft = UDim.new(0, 7)
  396.                         })
  397.                     })
  398.                 })
  399.  
  400.                 Amount = Amount + 1
  401.                 local Holder = CoreGui:FindFirstChild('Visual UI Library | .gg/puxxCphTnK | Notifications')['Notification'..tostring(Amount)]
  402.                 local TitleObj = Holder['NotificationTitle']
  403.                 local TextObj = Holder['NotificationText']
  404.                 local TextSize = TextService:GetTextSize(Text, 14, Enum.Font.Gotham, Vector2.new(300, math.huge))
  405.                 Holder.Size = UDim2.new(0, 300, 0, TextSize.Y + 30)
  406.                 TextObj.Size = UDim2.new(0, 300, 0, TextSize.Y)
  407.                 if Amount > 1 then
  408.                     local PreviousSizes = 0
  409.                     for _, Notification in next, Holder.Parent:GetChildren() do
  410.                         if Notification ~= Holder.Parent['Notification'..tostring(Amount)] then
  411.                             local AbsoluteY = Notification.AbsoluteSize.Y + 5
  412.                             PreviousSizes = PreviousSizes + AbsoluteY
  413.                         end
  414.                     end
  415.                     Holder.Position = UDim2.new(1, 300, 1, -30 - PreviousSizes)
  416.                     Utility:Tween(Holder, {Position = UDim2.new(1, -30, 1, -30 - PreviousSizes)}, 0.5)
  417.                 else
  418.                     Utility:Tween(Holder, {Position = UDim2.new(1, -30, 1, -30)}, 0.5)
  419.                 end
  420.                 task.wait(Duration - 1)
  421.                 Utility:Tween(Holder, {BackgroundTransparency = 0.8}, 0.25)
  422.                 Utility:Tween(TitleObj, {TextTransparency = 0.5}, 0.25)
  423.                 Utility:Tween(TextObj, {TextTransparency = 0.5}, 0.25)
  424.                 task.wait(0.5)
  425.                 Utility:Tween(Holder, {Position = UDim2.new(1, 300, 1, Holder.Position.Y.Offset)}, 0.5)
  426.                 task.wait(0.5)
  427.                 Holder:Destroy()
  428.                 Amount = Amount - 1
  429.             end
  430.         end)
  431.     end
  432.  
  433.     function Library:CreatePrompt(Type, Title, Text, ...)
  434.         local Title = Title or 'Title'
  435.         local Text = Text or 'Text'
  436.  
  437.         for _, Item in next, CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder'):GetChildren() do
  438.             if Item:IsA('Frame') then
  439.                 Item:Destroy()
  440.             end
  441.         end
  442.  
  443.         local Theme = {}
  444.         local File = readfile('VisualUILibraryCurrentTheme.json')
  445.         local Table = HttpService:JSONDecode(File)
  446.         for Index, Value in next, Table do
  447.             Theme[Index] = Utility:JoinColor(Value)
  448.         end
  449.  
  450.         if Type == 'Text' then
  451.             local ButtonText = ...
  452.             Utility:Create('Frame', {
  453.                 Name = Title..'PromptFrame',
  454.                 Parent = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder'),
  455.                 BackgroundColor3 = Theme.PromptColor,
  456.                 AnchorPoint = Vector2.new(0.5, 0.5),
  457.                 Position = UDim2.new(0.5, 0, 0.5, 0),
  458.                 BorderSizePixel = 0,
  459.                 ZIndex = 101,
  460.                 BackgroundTransparency = NotificationTransparency,
  461.                 Size = UDim2.new(0, 0, 0, 0)
  462.             }, {
  463.                 Utility:Create('UICorner', {
  464.                     Name = Title..'PromptFrameCorner',
  465.                     CornerRadius = UDim.new(0, 100)
  466.                 }),
  467.                 Utility:Create('UIStroke', {
  468.                     Name = Title..'PromptFrameStroke',
  469.                     ApplyStrokeMode = 'Contextual',
  470.                     Color = Theme.UIStrokeColor,
  471.                     LineJoinMode = 'Round',
  472.                     Thickness = 1
  473.                 }),
  474.                 Utility:Create('TextLabel', {
  475.                     Name = Title..'PromptTitle',
  476.                     TextTransparency = 1,
  477.                     BackgroundTransparency = 1,
  478.                     TextWrapped = true,
  479.                     AnchorPoint = Vector2.new(0.5, 0),
  480.                     Position = UDim2.new(0.5, 0, 0, 5),
  481.                     Size = UDim2.new(0, 0, 0, 20),
  482.                     Font = Enum.Font.Gotham,
  483.                     Text = Title,
  484.                     TextColor3 = Theme.PrimaryTextColor,
  485.                     TextSize = 20,
  486.                     ZIndex = 102,
  487.                     TextXAlignment = Enum.TextXAlignment.Center
  488.                 }),
  489.                 Utility:Create('TextLabel', {
  490.                     Name = Title..'PromptText',
  491.                     BackgroundTransparency = 1,
  492.                     TextTransparency = 1,
  493.                     TextWrapped = true,
  494.                     AnchorPoint = Vector2.new(0.5, 0),
  495.                     Position = UDim2.new(0.5, 0, 0, 26),
  496.                     Size = UDim2.new(0, 280, 0, 77),
  497.                     Font = Enum.Font.Gotham,
  498.                     Text = Text,
  499.                     TextColor3 = Theme.SecondaryTextColor,
  500.                     TextSize = 15,
  501.                     ZIndex = 102,
  502.                     TextXAlignment = Enum.TextXAlignment.Center
  503.                 }),
  504.                 Utility:Create('TextButton', {
  505.                     Name = Title..'Button',
  506.                     BackgroundColor3 = Theme.SecondaryElementColor,
  507.                     BackgroundTransparency = 1,
  508.                     TextTransparency = 1,
  509.                     Text = ButtonText,
  510.                     Font = Enum.Font.Gotham,
  511.                     TextColor3 = Theme.SecondaryTextColor,
  512.                     TextXAlignment = Enum.TextXAlignment.Center,
  513.                     Position = UDim2.new(0, 10, 0, 110),
  514.                     Size = UDim2.new(0, 280, 0, 30),
  515.                     BorderSizePixel = 0,
  516.                     TextSize = 15,
  517.                     ZIndex = 103,
  518.                     Visible = true,
  519.                     AutoButtonColor = false
  520.                 }, {
  521.                     Utility:Create('UIStroke', {
  522.                         Name = Title..'ButtonStroke',
  523.                         ApplyStrokeMode = 'Border',
  524.                         Color = Theme.UIStrokeColor,
  525.                         LineJoinMode = 'Round',
  526.                         Thickness = 0
  527.                     }),
  528.                     Utility:Create('UICorner', {
  529.                         Name = Title..'ButtonCorner',
  530.                         CornerRadius = UDim.new(0, 5)
  531.                     })
  532.                 })
  533.             })
  534.  
  535.             local PromptHolder = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder')
  536.             local PromptFrame = PromptHolder[Title..'PromptFrame']
  537.             local PromptFrameCorner = PromptFrame[Title..'PromptFrameCorner']
  538.             local Button = PromptFrame[Title..'Button']
  539.             local ButtonStroke = Button[Title..'ButtonStroke']
  540.             local PromptText = PromptFrame[Title..'PromptText']
  541.             local PromptTitle = PromptFrame[Title..'PromptTitle']
  542.  
  543.             local TitleTextSize = TextService:GetTextSize(Title, 20, Enum.Font.Gotham, Vector2.new(280, 0))
  544.            
  545.             Utility:Tween(PromptTitle, {Size = UDim2.new(0, TitleTextSize.X, 0, TitleTextSize.Y)}, 0.25)
  546.  
  547.             Utility:Tween(PromptHolder, {BackgroundTransparency = 0.1}, 0.25)
  548.             task.wait(0.25)
  549.             Utility:Tween(PromptFrame, {BackgroundTransparency = NotificationTransparency}, 0.25)
  550.             Utility:Tween(PromptFrame, {Size = UDim2.new(0, 300, 0, 150)}, 0.25)
  551.             Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 5)}, 0.25)
  552.             task.wait(0.25)
  553.             Utility:Tween(ButtonStroke, {Thickness = 1}, 0.25)
  554.             task.wait(0.25)
  555.             Utility:Tween(PromptText, {TextTransparency = 0}, 0.25)
  556.             Utility:Tween(PromptTitle, {TextTransparency = 0}, 0.25)
  557.             Utility:Tween(Button, {BackgroundTransparency = 0}, 0.25)
  558.             Utility:Tween(Button, {TextTransparency = 0}, 0.25)
  559.  
  560.             Button.MouseEnter:Connect(function(Input)
  561.                 Utility:Tween(Button, {TextColor3 = Utility:Lighten(Theme.PrimaryTextColor)}, 0.25)
  562.             end)
  563.  
  564.             Button.MouseLeave:Connect(function(Input)
  565.                 Utility:Tween(Button, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  566.             end)
  567.            
  568.             Button.MouseButton1Down:Connect(function()
  569.                 Utility:Tween(Button, {BackgroundTransparency = 1}, 0.25)
  570.                 Utility:Tween(Button, {TextTransparency = 1}, 0.25)
  571.                 Utility:Tween(PromptText, {TextTransparency = 1}, 0.25)
  572.                 Utility:Tween(PromptTitle, {TextTransparency = 1}, 0.25)
  573.                 task.wait(0.25)
  574.                 Utility:Tween(ButtonStroke, {Thickness = 0}, 0.25)
  575.                 task.wait(0.25)
  576.                 Utility:Tween(PromptFrame, {BackgroundTransparency = 1}, 0.25)
  577.                 Utility:Tween(PromptFrame, {Size = UDim2.new(0, 0, 0, 0)}, 0.25)
  578.                 Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 100)}, 0.25)
  579.                 task.wait(0.25)
  580.                 Utility:Tween(PromptHolder, {BackgroundTransparency = 1}, 0.25)
  581.                 task.wait()
  582.                 PromptFrame:Destroy()
  583.             end)
  584.  
  585.         elseif Type == 'OneButton' then
  586.             local Args = ...
  587.             local ButtonText = Args[1]
  588.             local ButtonCallback = Args[2]
  589.             Utility:Create('Frame', {
  590.                 Name = Title..'PromptFrame',
  591.                 Parent = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder'),
  592.                 BackgroundColor3 = Theme.PromptColor,
  593.                 AnchorPoint = Vector2.new(0.5, 0.5),
  594.                 Position = UDim2.new(0.5, 0, 0.5, 0),
  595.                 BorderSizePixel = 0,
  596.                 ZIndex = 101,
  597.                 BackgroundTransparency = NotificationTransparency,
  598.                 Size = UDim2.new(0, 0, 0, 0)
  599.             }, {
  600.                 Utility:Create('UICorner', {
  601.                     Name = Title..'PromptFrameCorner',
  602.                     CornerRadius = UDim.new(0, 100)
  603.                 }),
  604.                 Utility:Create('UIStroke', {
  605.                     Name = Title..'PromptFrameStroke',
  606.                     ApplyStrokeMode = 'Contextual',
  607.                     Color = Theme.UIStrokeColor,
  608.                     LineJoinMode = 'Round',
  609.                     Thickness = 1
  610.                 }),
  611.                 Utility:Create('TextLabel', {
  612.                     Name = Title..'PromptTitle',
  613.                     TextTransparency = 1,
  614.                     BackgroundTransparency = 1,
  615.                     TextWrapped = true,
  616.                     AnchorPoint = Vector2.new(0.5, 0),
  617.                     Position = UDim2.new(0.5, 0, 0, 5),
  618.                     Size = UDim2.new(0, 0, 0, 20),
  619.                     Font = Enum.Font.Gotham,
  620.                     Text = Title,
  621.                     TextColor3 = Theme.PrimaryTextColor,
  622.                     TextSize = 20,
  623.                     ZIndex = 102,
  624.                     TextXAlignment = Enum.TextXAlignment.Center
  625.                 }),
  626.                 Utility:Create('TextLabel', {
  627.                     Name = Title..'PromptText',
  628.                     BackgroundTransparency = 1,
  629.                     TextTransparency = 1,
  630.                     TextWrapped = true,
  631.                     AnchorPoint = Vector2.new(0.5, 0),
  632.                     Position = UDim2.new(0.5, 0, 0, 26),
  633.                     Size = UDim2.new(0, 280, 0, 77),
  634.                     Font = Enum.Font.Gotham,
  635.                     Text = Text,
  636.                     TextColor3 = Theme.SecondaryTextColor,
  637.                     TextSize = 15,
  638.                     ZIndex = 102,
  639.                     TextXAlignment = Enum.TextXAlignment.Center
  640.                 }),
  641.                 Utility:Create('TextButton', {
  642.                     Name = Title..'Button',
  643.                     BackgroundColor3 = Theme.SecondaryElementColor,
  644.                     BackgroundTransparency = 1,
  645.                     TextTransparency = 1,
  646.                     Text = ButtonText,
  647.                     Font = Enum.Font.Gotham,
  648.                     TextColor3 = Theme.SecondaryTextColor,
  649.                     TextXAlignment = Enum.TextXAlignment.Center,
  650.                     Position = UDim2.new(0, 10, 0, 110),
  651.                     Size = UDim2.new(0, 280, 0, 30),
  652.                     BorderSizePixel = 0,
  653.                     TextSize = 15,
  654.                     ZIndex = 103,
  655.                     Visible = true,
  656.                     AutoButtonColor = false
  657.                 }, {
  658.                     Utility:Create('UIStroke', {
  659.                         Name = Title..'ButtonStroke',
  660.                         ApplyStrokeMode = 'Border',
  661.                         Color = Theme.UIStrokeColor,
  662.                         LineJoinMode = 'Round',
  663.                         Thickness = 0
  664.                     }),
  665.                     Utility:Create('UICorner', {
  666.                         Name = Title..'ButtonCorner',
  667.                         CornerRadius = UDim.new(0, 5)
  668.                     })
  669.                 })
  670.             })
  671.  
  672.             local PromptHolder = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder')
  673.             local PromptFrame = PromptHolder[Title..'PromptFrame']
  674.             local PromptFrameCorner = PromptFrame[Title..'PromptFrameCorner']
  675.             local Button = PromptFrame[Title..'Button']
  676.             local ButtonStroke = Button[Title..'ButtonStroke']
  677.             local PromptText = PromptFrame[Title..'PromptText']
  678.             local PromptTitle = PromptFrame[Title..'PromptTitle']
  679.  
  680.             local TitleTextSize = TextService:GetTextSize(Title, 20, Enum.Font.Gotham, Vector2.new(280, 0))
  681.            
  682.             Utility:Tween(PromptTitle, {Size = UDim2.new(0, TitleTextSize.X, 0, TitleTextSize.Y)}, 0.25)
  683.  
  684.             Utility:Tween(PromptHolder, {BackgroundTransparency = 0.1}, 0.25)
  685.             task.wait(0.25)
  686.             Utility:Tween(PromptFrame, {BackgroundTransparency = NotificationTransparency0}, 0.25)
  687.             Utility:Tween(PromptFrame, {Size = UDim2.new(0, 300, 0, 150)}, 0.25)
  688.             Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 5)}, 0.25)
  689.             task.wait(0.25)
  690.             Utility:Tween(ButtonStroke, {Thickness = 1}, 0.25)
  691.             task.wait(0.25)
  692.             Utility:Tween(PromptText, {TextTransparency = 0}, 0.25)
  693.             Utility:Tween(PromptTitle, {TextTransparency = 0}, 0.25)
  694.             Utility:Tween(Button, {BackgroundTransparency = 0}, 0.25)
  695.             Utility:Tween(Button, {TextTransparency = 0}, 0.25)
  696.  
  697.             Button.MouseEnter:Connect(function(Input)
  698.                 Utility:Tween(Button, {TextColor3 = Utility:Lighten(Theme.PrimaryTextColor)}, 0.25)
  699.             end)
  700.  
  701.             Button.MouseLeave:Connect(function(Input)
  702.                 Utility:Tween(Button, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  703.             end)
  704.            
  705.             Button.MouseButton1Down:Connect(function()
  706.                 pcall(ButtonCallback)
  707.                 Utility:Tween(Button, {BackgroundTransparency = 1}, 0.25)
  708.                 Utility:Tween(Button, {TextTransparency = 1}, 0.25)
  709.                 Utility:Tween(PromptText, {TextTransparency = 1}, 0.25)
  710.                 Utility:Tween(PromptTitle, {TextTransparency = 1}, 0.25)
  711.                 task.wait(0.25)
  712.                 Utility:Tween(ButtonStroke, {Thickness = 0}, 0.25)
  713.                 task.wait(0.25)
  714.                 Utility:Tween(PromptFrame, {BackgroundTransparency = 1}, 0.25)
  715.                 Utility:Tween(PromptFrame, {Size = UDim2.new(0, 0, 0, 0)}, 0.25)
  716.                 Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 100)}, 0.25)
  717.                 task.wait(0.25)
  718.                 Utility:Tween(PromptHolder, {BackgroundTransparency = 1}, 0.25)
  719.                 task.wait()
  720.                 PromptFrame:Destroy()
  721.             end)
  722.            
  723.         elseif Type == 'TwoButton' then
  724.             local Args = ...
  725.             local Button1Text = Args[1]
  726.             local Button1Callback = Args[2]
  727.             local Button2Text = Args[3]
  728.             local Button2Callback = Args[4]
  729.             Utility:Create('Frame', {
  730.                 Name = Title..'PromptFrame',
  731.                 Parent = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder'),
  732.                 BackgroundColor3 = Theme.PromptColor,
  733.                 AnchorPoint = Vector2.new(0.5, 0.5),
  734.                 Position = UDim2.new(0.5, 0, 0.5, 0),
  735.                 BorderSizePixel = 0,
  736.                 ZIndex = 101,
  737.                 BackgroundTransparency = NotificationTransparency,
  738.                 Size = UDim2.new(0, 0, 0, 0)
  739.             }, {
  740.                 Utility:Create('UICorner', {
  741.                     Name = Title..'PromptFrameCorner',
  742.                     CornerRadius = UDim.new(0, 100)
  743.                 }),
  744.                 Utility:Create('UIStroke', {
  745.                     Name = Title..'PromptFrameStroke',
  746.                     ApplyStrokeMode = 'Contextual',
  747.                     Color = Theme.UIStrokeColor,
  748.                     LineJoinMode = 'Round',
  749.                     Thickness = 1
  750.                 }),
  751.                 Utility:Create('TextLabel', {
  752.                     Name = Title..'PromptTitle',
  753.                     TextTransparency = 1,
  754.                     BackgroundTransparency = 1,
  755.                     TextWrapped = true,
  756.                     AnchorPoint = Vector2.new(0.5, 0),
  757.                     Position = UDim2.new(0.5, 0, 0, 5),
  758.                     Size = UDim2.new(0, 0, 0, 20),
  759.                     Font = Enum.Font.Gotham,
  760.                     Text = Title,
  761.                     TextColor3 = Theme.PrimaryTextColor,
  762.                     TextSize = 20,
  763.                     ZIndex = 102,
  764.                     TextXAlignment = Enum.TextXAlignment.Center
  765.                 }),
  766.                 Utility:Create('TextLabel', {
  767.                     Name = Title..'PromptText',
  768.                     BackgroundTransparency = 1,
  769.                     TextTransparency = 1,
  770.                     TextWrapped = true,
  771.                     AnchorPoint = Vector2.new(0.5, 0),
  772.                     Position = UDim2.new(0.5, 0, 0, 26),
  773.                     Size = UDim2.new(0, 280, 0, 77),
  774.                     Font = Enum.Font.Gotham,
  775.                     Text = Text,
  776.                     TextColor3 = Theme.SecondaryTextColor,
  777.                     TextSize = 15,
  778.                     ZIndex = 102,
  779.                     TextXAlignment = Enum.TextXAlignment.Center
  780.                 }),
  781.                 Utility:Create('TextButton', {
  782.                     Name = Title..'Button1',
  783.                     BackgroundColor3 = Theme.SecondaryElementColor,
  784.                     BackgroundTransparency = 1,
  785.                     TextTransparency = 1,
  786.                     Text = Button1Text,
  787.                     Font = Enum.Font.Gotham,
  788.                     TextColor3 = Theme.SecondaryTextColor,
  789.                     TextXAlignment = Enum.TextXAlignment.Center,
  790.                     Position = UDim2.new(0, 10, 0, 110),
  791.                     Size = UDim2.new(0, 135, 0, 30),
  792.                     BorderSizePixel = 0,
  793.                     TextSize = 15,
  794.                     ZIndex = 103,
  795.                     Visible = true,
  796.                     AutoButtonColor = false
  797.                 }, {
  798.                     Utility:Create('UIStroke', {
  799.                         Name = Title..'Button1Stroke',
  800.                         ApplyStrokeMode = 'Border',
  801.                         Color = Theme.UIStrokeColor,
  802.                         LineJoinMode = 'Round',
  803.                         Thickness = 0
  804.                     }),
  805.                     Utility:Create('UICorner', {
  806.                         Name = Title..'Button1Corner',
  807.                         CornerRadius = UDim.new(0, 5)
  808.                     })
  809.                 }),
  810.                 Utility:Create('TextButton', {
  811.                     Name = Title..'Button2',
  812.                     BackgroundColor3 = Theme.SecondaryElementColor,
  813.                     BackgroundTransparency = 1,
  814.                     TextTransparency = 1,
  815.                     Text = Button2Text,
  816.                     Font = Enum.Font.Gotham,
  817.                     TextColor3 = Theme.SecondaryTextColor,
  818.                     TextXAlignment = Enum.TextXAlignment.Center,
  819.                     Position = UDim2.new(0, 155, 0, 110),
  820.                     Size = UDim2.new(0, 135, 0, 30),
  821.                     BorderSizePixel = 0,
  822.                     TextSize = 15,
  823.                     ZIndex = 103,
  824.                     Visible = true,
  825.                     AutoButtonColor = false
  826.                 }, {
  827.                     Utility:Create('UIStroke', {
  828.                         Name = Title..'Button2Stroke',
  829.                         ApplyStrokeMode = 'Border',
  830.                         Color = Theme.UIStrokeColor,
  831.                         LineJoinMode = 'Round',
  832.                         Thickness = 0
  833.                     }),
  834.                     Utility:Create('UICorner', {
  835.                         Name = Title..'Button2Corner',
  836.                         CornerRadius = UDim.new(0, 5)
  837.                     })
  838.                 })
  839.             })
  840.  
  841.             local PromptHolder = CoreGui:WaitForChild(UIName):WaitForChild('Main'):WaitForChild('PromptHolder')
  842.             local PromptFrame = PromptHolder[Title..'PromptFrame']
  843.             local PromptFrameCorner = PromptFrame[Title..'PromptFrameCorner']
  844.             local Button1 = PromptFrame[Title..'Button1']
  845.             local Button2 = PromptFrame[Title..'Button2']
  846.             local Button1Stroke = Button1[Title..'Button1Stroke']
  847.             local Button2Stroke = Button2[Title..'Button2Stroke']
  848.             local PromptText = PromptFrame[Title..'PromptText']
  849.             local PromptTitle = PromptFrame[Title..'PromptTitle']
  850.  
  851.             local TitleTextSize = TextService:GetTextSize(Title, 20, Enum.Font.Gotham, Vector2.new(280, 0))
  852.            
  853.             Utility:Tween(PromptTitle, {Size = UDim2.new(0, TitleTextSize.X, 0, TitleTextSize.Y)}, 0.25)
  854.  
  855.             Utility:Tween(PromptHolder, {BackgroundTransparency = 0.1}, 0.25)
  856.             task.wait(0.25)
  857.             Utility:Tween(PromptFrame, {BackgroundTransparency = NotificationTransparency}, 0.25)
  858.             Utility:Tween(PromptFrame, {Size = UDim2.new(0, 300, 0, 150)}, 0.25)
  859.             Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 5)}, 0.25)
  860.             task.wait(0.25)
  861.             Utility:Tween(Button1Stroke, {Thickness = 1}, 0.25)
  862.             Utility:Tween(Button2Stroke, {Thickness = 1}, 0.25)
  863.             task.wait(0.25)
  864.             Utility:Tween(PromptText, {TextTransparency = 0}, 0.25)
  865.             Utility:Tween(PromptTitle, {TextTransparency = 0}, 0.25)
  866.             Utility:Tween(Button1, {BackgroundTransparency = 0}, 0.25)
  867.             Utility:Tween(Button1, {TextTransparency = 0}, 0.25)
  868.             Utility:Tween(Button2, {BackgroundTransparency = 0}, 0.25)
  869.             Utility:Tween(Button2, {TextTransparency = 0}, 0.25)
  870.  
  871.             Button1.MouseEnter:Connect(function(Input)
  872.                 Utility:Tween(Button1, {TextColor3 = Utility:Lighten(Theme.PrimaryTextColor)}, 0.25)
  873.             end)
  874.  
  875.             Button1.MouseLeave:Connect(function(Input)
  876.                 Utility:Tween(Button1, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  877.             end)
  878.            
  879.             Button1.MouseButton1Down:Connect(function()
  880.                 pcall(Button1Callback)
  881.                 Utility:Tween(Button1, {BackgroundTransparency = 1}, 0.25)
  882.                 Utility:Tween(Button1, {TextTransparency = 1}, 0.25)
  883.                 Utility:Tween(Button2, {BackgroundTransparency = 1}, 0.25)
  884.                 Utility:Tween(Button2, {TextTransparency = 1}, 0.25)
  885.                 Utility:Tween(PromptText, {TextTransparency = 1}, 0.25)
  886.                 Utility:Tween(PromptTitle, {TextTransparency = 1}, 0.25)
  887.                 task.wait(0.25)
  888.                 Utility:Tween(Button1Stroke, {Thickness = 0}, 0.25)
  889.                 Utility:Tween(Button2Stroke, {Thickness = 0}, 0.25)
  890.                 task.wait(0.25)
  891.                 Utility:Tween(PromptFrame, {BackgroundTransparency = 1}, 0.25)
  892.                 Utility:Tween(PromptFrame, {Size = UDim2.new(0, 0, 0, 0)}, 0.25)
  893.                 Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 100)}, 0.25)
  894.                 task.wait(0.25)
  895.                 Utility:Tween(PromptHolder, {BackgroundTransparency = 1}, 0.25)
  896.                 task.wait()
  897.                 PromptFrame:Destroy()
  898.             end)
  899.  
  900.             Button2.MouseEnter:Connect(function(Input)
  901.                 Utility:Tween(Button2, {TextColor3 = Utility:Lighten(Theme.PrimaryTextColor)}, 0.25)
  902.             end)
  903.  
  904.             Button2.MouseLeave:Connect(function(Input)
  905.                 Utility:Tween(Button2, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  906.             end)
  907.            
  908.             Button2.MouseButton1Down:Connect(function()
  909.                 pcall(Button2Callback)
  910.                 Utility:Tween(Button1, {BackgroundTransparency = 1}, 0.25)
  911.                 Utility:Tween(Button1, {TextTransparency = 1}, 0.25)
  912.                 Utility:Tween(Button2, {BackgroundTransparency = 1}, 0.25)
  913.                 Utility:Tween(Button2, {TextTransparency = 1}, 0.25)
  914.                 Utility:Tween(PromptText, {TextTransparency = 1}, 0.25)
  915.                 Utility:Tween(PromptTitle, {TextTransparency = 1}, 0.25)
  916.                 task.wait(0.25)
  917.                 Utility:Tween(Button1Stroke, {Thickness = 0}, 0.25)
  918.                 Utility:Tween(Button2Stroke, {Thickness = 0}, 0.25)
  919.                 task.wait(0.25)
  920.                 Utility:Tween(PromptFrame, {BackgroundTransparency = 1}, 0.25)
  921.                 Utility:Tween(PromptFrame, {Size = UDim2.new(0, 0, 0, 0)}, 0.25)
  922.                 Utility:Tween(PromptFrameCorner, {CornerRadius = UDim.new(0, 100)}, 0.25)
  923.                 task.wait(0.25)
  924.                 Utility:Tween(PromptHolder, {BackgroundTransparency = 1}, 0.25)
  925.                 task.wait()
  926.                 PromptFrame:Destroy()
  927.             end)
  928.         end
  929.     end
  930. end
  931.  
  932. do
  933.     Utility:DestroyUI()
  934.     BreakAllLoops = false
  935.     task.spawn(function()
  936.         while task.wait(1) do
  937.             local x = readfile('fml.txt')
  938.             if x == 'true' then
  939.                 for Index, Value in next, Ihatethisui do
  940.                     print(Index, Value)
  941.                     Ihatethisui[Index]:Break()
  942.                 end
  943.                 writefile('fml.txt', 'false')
  944.             end
  945.         end
  946.     end)
  947. end
  948.  
  949. -- // Library Functions
  950. function Library:DestroyUI()
  951.     Utility:DestroyUI()
  952. end
  953.  
  954. function Library:ToggleUI()
  955.     Utility:ToggleUI()
  956. end
  957.  
  958. function Library:SetTransparency(Transparency, NotificationBool)
  959.     local UI = CoreGui:WaitForChild('Visual UI Library | .gg/puxxCphTnK')
  960.     local Blacklist = {
  961.         'UIPadding',
  962.         'UICorner',
  963.         'UIStroke',
  964.         'UIListLayout',
  965.         'Folder'
  966.     }
  967.  
  968.     for _, Item in next, UI:GetDescendants() do
  969.         if not table.find(Blacklist, Item.ClassName) then
  970.             if Item.BackgroundTransparency ~= 1 and Transparency < 0.95 then
  971.                 Utility:Tween(Item, {BackgroundTransparency = Transparency}, 0.25)
  972.             end
  973.         end
  974.     end
  975.  
  976.     if NotificationBool then
  977.         NotificationTransparency = Transparency
  978.     end
  979. end
  980.  
  981. function Library:SaveConfig(Name)
  982.     if Name ~= '' then
  983.         if isfolder(ConfigF) then
  984.             if isfile(ConfigF..'/'..Name..'.json') then
  985.                 Library:CreatePrompt('TwoButton', 'Overwrite Config', 'A config already exists with this name, are you sure you want to overwrite it?', {
  986.                     'Yes',
  987.                     function()
  988.                         local Json = HttpService:JSONEncode(Config)
  989.                         local File = writefile(ConfigF..'/'..Name..'.json', Json)
  990.                         Library:CreateNotification('Saved Config', 'Successfully saved your config with the name, \''..Name..'.json'..'\'.', 5)
  991.                     end,
  992.                     'No',
  993.                     function()
  994.                         Library:CreateNotification('Config Not Saved', 'Config was not saved.', 5)
  995.                     end
  996.                 })
  997.             else
  998.                 local Json = HttpService:JSONEncode(Config)
  999.                 local File = writefile(ConfigF..'/'..Name..'.json', Json)
  1000.                 Library:CreateNotification('Saved Config', 'Successfully saved your config with the name, \''..Name..'.json'..'\'.', 5)
  1001.             end
  1002.         else
  1003.             makefolder(ConfigF)
  1004.             if isfile(ConfigF..'/'..Name..'.json') then
  1005.                 Library:CreatePrompt('TwoButton', 'Overwrite Config', 'A config already exists with this name, are you sure you want to overwrite it?', {
  1006.                     'Yes',
  1007.                     function()
  1008.                         local Json = HttpService:JSONEncode(Config)
  1009.                         local File = writefile(ConfigF..'/'..Name..'.json', Json)
  1010.                         Library:CreateNotification('Saved Config', 'Successfully saved your config with the name, \''..Name..'.json'..'\'.', 5)
  1011.                     end,
  1012.                     'No',
  1013.                     function()
  1014.                         Library:CreateNotification('Config Not Saved', 'Config was not saved.', 5)
  1015.                     end
  1016.                 })
  1017.             else
  1018.                 local Json = HttpService:JSONEncode(Config)
  1019.                 local File = writefile(ConfigF..'/'..Name..'.json', Json)
  1020.                 Library:CreateNotification('Saved Config', 'Successfully saved your config with the name, \''..Name..'.json'..'\'.', 5)
  1021.             end
  1022.         end
  1023.     else
  1024.         Library:CreateNotification('Config Not Saved', 'Please enter a name for the config.', 5)
  1025.     end
  1026. end
  1027.  
  1028. function Library:LoadConfig(Name)
  1029.     if isfile(ConfigF..'/'..Name..'.json') then
  1030.         Library:CreatePrompt('TwoButton', 'Load Config', 'Are you sure you want to load this config?', {
  1031.             'Yes',
  1032.             function()
  1033.                 local Config = readfile(ConfigF..'/'..Name..'.json')
  1034.                 local Table = HttpService:JSONDecode(Config)
  1035.                 for Index, Value in next, Table do
  1036.                     if Index == 'Theme_4z3s4QrUhfqt703FmiAe' then
  1037.                         local DecodedTheme = HttpService:JSONDecode(Value)
  1038.                         local UpdatedTable = {}
  1039.                         for NewIndex, NewValue in next, DecodedTheme do
  1040.                             UpdatedTable[NewIndex] = Color3.fromRGB(NewValue[1], NewValue[2], NewValue[3])
  1041.                         end
  1042.                         Library:ChangeTheme(UpdatedTable)
  1043.                     elseif type(Value) == 'table' then
  1044.                         local New = Color3.fromRGB(Value[1] * 255, Value[2] * 255, Value[3] * 255)
  1045.                         ConfigUpdates[Index]:Set(New)
  1046.                     else
  1047.                         ConfigUpdates[Index]:Set(Value)
  1048.                     end
  1049.                 end
  1050.                 Library:CreateNotification('Config Loaded', 'Successfully loaded your config with the name, \''..Name..'.json'..'\'.', 5)
  1051.             end,
  1052.             'No',
  1053.             function()
  1054.                 Library:CreateNotification('Config Not Loaded', 'Config was not loaded.', 5)
  1055.             end
  1056.         })
  1057.     else
  1058.         Library:CreateNotification('Config Not Loaded', 'Config doesn\'t exist.', 5)
  1059.     end
  1060. end
  1061.  
  1062. function Library:DeleteConfig(Name)
  1063.     if isfile(ConfigF..'/'..Name..'.json') then
  1064.         Library:CreatePrompt('TwoButton', 'Delete Config', 'Are you sure that you want to delete this config?', {
  1065.             'Yes',
  1066.             function()
  1067.                 local Json = HttpService:JSONEncode(Config)
  1068.                 local File = delfile(ConfigF..'/'..Name..'.json')
  1069.                 Library:CreateNotification('Deleted Config', 'Successfully deleted config with the name, \''..Name..'.json'..'\'.', 5)
  1070.             end,
  1071.             'No',
  1072.             function()
  1073.                 Library:CreateNotification('Config Not Deleted', 'Config was not deleted.', 5)
  1074.             end
  1075.         })
  1076.     end
  1077. end
  1078.  
  1079. function Library:GetConfigs()
  1080.     if isfolder(ConfigF) then
  1081.         local Configs = listfiles(ConfigF)
  1082.         local Table = {}
  1083.         for Index, Value in next, Configs do
  1084.             local New = Value:gsub(ConfigF..'\\', ''):gsub('.json', '')
  1085.             table.insert(Table, tostring(New))
  1086.         end
  1087.         return Table
  1088.     end
  1089. end
  1090.  
  1091. function Library:CreateWindow(HubName, GameName, IntroText, IntroIcon, ImprovePerformance, ConfigFolder, Theme)
  1092.     local ImprovePerformance = ImprovePerformance or false
  1093.     local HasCustom = false
  1094.     local HubName = HubName or 'UI Name'
  1095.     local GameName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name
  1096.     local Theme = Theme
  1097.     if not Theme then
  1098.         Theme = Themes.Default
  1099.     elseif type(Theme) == 'table' then
  1100.         Theme = Theme
  1101.         Themes['Custom'] = Theme
  1102.         HasCustom = true
  1103.     elseif type(Theme) == 'string' then
  1104.         Theme = Theme:lower()
  1105.         if Theme == 'default' then
  1106.             Theme = Themes['Default']
  1107.         elseif Theme == 'lighter' then
  1108.             Theme = Themes['Lighter']
  1109.         elseif Theme == 'light' then
  1110.             Theme = Themes['Light']
  1111.         elseif Theme == 'light+' then
  1112.             Theme = Themes['Light+']
  1113.         elseif Theme == 'discord' then
  1114.             Theme = Themes['Discord']
  1115.         elseif Theme == 'red and black' then
  1116.             Theme = Themes['Red And Black']
  1117.         elseif Theme == 'nordic dark' then
  1118.             Theme = Themes['Nordic Dark']
  1119.         elseif Theme == 'nordic light' then
  1120.             Theme = Themes['Nordic Light']
  1121.         elseif Theme == 'purple' then
  1122.             Theme = Themes['Purple']
  1123.         elseif Theme == 'sentinel' then
  1124.             Theme = Themes['Sentinel']
  1125.         elseif Theme == 'synapse x' then
  1126.             Theme = Themes['Synapse X']
  1127.         elseif Theme == 'krnl' then
  1128.             Theme = Themes['Krnl']
  1129.         elseif Theme == 'script-ware' then
  1130.             Theme = Themes['Script-Ware']
  1131.         elseif Theme == 'kiriot' then
  1132.             Theme = Themes['Kiriot']
  1133.         end
  1134.     end
  1135.     local NewTable = {}
  1136.  
  1137.     for Index, Value in next, Theme do
  1138.         NewTable[Index] = Utility:SplitColor(Value)
  1139.     end
  1140.  
  1141.     if isfile('VisualUILibraryCurrentTheme.json') then
  1142.         delfile('VisualUILibraryCurrentTheme.json')
  1143.     end
  1144.  
  1145.     ConfigF = ConfigFolder
  1146.  
  1147.     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1148.  
  1149.     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1150.  
  1151.     local Container = Utility:Create('ScreenGui', {
  1152.         Name = UIName,
  1153.         Parent = CoreGui
  1154.     }, {
  1155.         Utility:Create('Frame', {
  1156.             Name = 'Main',
  1157.             BackgroundColor3 = Theme.BackgroundColor,
  1158.             BorderSizePixel = 0,
  1159.             BackgroundTransparency = 1,
  1160.             Position = UDim2.new(0, 8, 0, 4),
  1161.             Size = UDim2.new(0, 0, 0, 0)
  1162.         }, {
  1163.             Utility:Create('UICorner', {
  1164.                 CornerRadius = UDim.new(0, 5),
  1165.                 Name = 'MainCorner'
  1166.             }),
  1167.             Utility:Create('TextLabel', {
  1168.                 Name = 'IntroText',
  1169.                 BackgroundColor3 = Theme.BackgroundColor,
  1170.                 BackgroundTransparency = 1,
  1171.                 TextTransparency = 1,
  1172.                 AnchorPoint = Vector2.new(0.5, 0.5),
  1173.                 Position = UDim2.new(0.5, 0, 0.5, -40),
  1174.                 BorderSizePixel = 0,
  1175.                 Size = UDim2.new(0, 170, 0, 20),
  1176.                 Font = Enum.Font.Gotham,
  1177.                 Text = IntroText,
  1178.                 TextColor3 = Theme.PrimaryTextColor,
  1179.                 TextSize = 18,
  1180.                 ZIndex = 2,
  1181.                 TextXAlignment = Enum.TextXAlignment.Center
  1182.             }),
  1183.             Utility:Create('ImageLabel', {
  1184.                 Name = 'IntroImage',
  1185.                 BackgroundColor3 = Theme.PrimaryElementColor,
  1186.                 BackgroundTransparency = 1,
  1187.                 ImageTransparency = 1,
  1188.                 BorderSizePixel = 0,
  1189.                 AnchorPoint = Vector2.new(0.5, 0.5),
  1190.                 Position = UDim2.new(0.5, 0, 0.5, 20),
  1191.                 ZIndex = 3,
  1192.                 Size = UDim2.new(0, 100, 0, 100),
  1193.                 Image = IntroIcon,
  1194.                 ScaleType = Enum.ScaleType.Fit
  1195.             })
  1196.         }),
  1197.     })
  1198.  
  1199.     local Main = Container.Main
  1200.    
  1201.     Utility:EnableDragging(Container.Main)
  1202.  
  1203.     Utility:Tween(Main, {BackgroundTransparency = 0}, 0.25)
  1204.     Utility:Tween(Main, {Size = UDim2.new(0, 600, 0, 0)}, 0.25)
  1205.     task.wait(0.5)
  1206.     Utility:Tween(Main, {Size = UDim2.new(0, 600, 0, 375)}, 0.25)
  1207.     task.wait(0.5)
  1208.     Utility:Tween(Main['IntroText'], {TextTransparency = 0}, 0.25)
  1209.     task.wait(0.5)
  1210.     Utility:Tween(Main['IntroImage'], {ImageTransparency = 0}, 0.25)
  1211.     task.wait(3)
  1212.     Utility:Tween(Main['IntroText'], {TextTransparency = 1}, 0.25)
  1213.     task.wait(0.5)
  1214.     Utility:Tween(Main['IntroImage'], {ImageTransparency = 1}, 0.25)
  1215.     task.wait(0.5)
  1216.     Main['IntroText']:Destroy()
  1217.     Main['IntroImage']:Destroy()
  1218.    
  1219.     Utility:Create('Frame', {
  1220.         Name = 'PromptHolder',
  1221.         Parent = Main,
  1222.         AnchorPoint = Vector2.new(0.5, 0.5),
  1223.         Position = UDim2.new(0.5, 0, 0.5, 0),
  1224.         Parent = Main,
  1225.         BorderSizePixel = 0,
  1226.         Size = UDim2.new(0, 600, 0, 375),
  1227.         ZIndex = 100,
  1228.         Visible = true,
  1229.         BackgroundTransparency = 1,
  1230.         BackgroundColor3 = Theme.BackgroundColor
  1231.     }, {
  1232.         Utility:Create('UICorner', {
  1233.             CornerRadius = UDim.new(0, 5),
  1234.             Parent = Main,
  1235.             Name = 'PromptHolderCorner'
  1236.         })
  1237.     })
  1238.     Utility:Create('Frame', {
  1239.         Name = 'Filler1',
  1240.         Position = UDim2.new(0, 170, 0, 0),
  1241.         Parent = Main,
  1242.         BorderSizePixel = 0,
  1243.         Size = UDim2.new(0, 429, 0, 9),
  1244.         ZIndex = 1,
  1245.         BackgroundColor3 = Theme.BackgroundColor
  1246.     }, {
  1247.         Utility:Create('UICorner', {
  1248.             CornerRadius = UDim.new(0, 5),
  1249.             Name = 'Filler1Corner'
  1250.         })
  1251.     })
  1252.     Utility:Create('Frame', {
  1253.         Name = 'Filler2',
  1254.         Parent = Main,
  1255.         Position = UDim2.new(0, 170, 0, 364),
  1256.         BorderSizePixel = 0,
  1257.         Size = UDim2.new(0, 429, 0, 11),
  1258.         ZIndex = 1,
  1259.         BackgroundColor3 = Theme.BackgroundColor
  1260.     }, {
  1261.         Utility:Create('UICorner', {
  1262.             CornerRadius = UDim.new(0, 5),
  1263.             Name = 'Filler2Corner'
  1264.         })
  1265.     })
  1266.     Utility:Create('Frame', {
  1267.         Name = 'Sidebar',
  1268.         BackgroundColor3 = Theme.SidebarColor,
  1269.         Parent = Main,
  1270.         BorderSizePixel = 0,
  1271.         Size = UDim2.new(0, 170, 0, 375)
  1272.     }, {
  1273.         Utility:Create('UICorner', {
  1274.             CornerRadius = UDim.new(0, 5),
  1275.             Name = 'SidebarCorner'
  1276.         }),
  1277.         Utility:Create('Frame', {
  1278.             Name = 'NamesBehind',
  1279.             Position = UDim2.new(0, 0, 0, 0),
  1280.             BorderSizePixel = 0,
  1281.             Size = UDim2.new(0, 169, 0, 55),
  1282.             ZIndex = 1,
  1283.             BackgroundColor3 = Theme.SidebarColor
  1284.         }, {
  1285.             Utility:Create('UICorner', {
  1286.                 CornerRadius = UDim.new(0, 5),
  1287.                 Name = 'NamesBehindCorner'
  1288.             })
  1289.         }),
  1290.         Utility:Create('Frame', {
  1291.             Name = 'Filler3',
  1292.             Position = UDim2.new(0, 0, 0, 368),
  1293.             BorderSizePixel = 0,
  1294.             Size = UDim2.new(0, 170, 0, 7),
  1295.             ZIndex = 1,
  1296.             BackgroundColor3 = Theme.SidebarColor
  1297.         }, {
  1298.             Utility:Create('UICorner', {
  1299.                 CornerRadius = UDim.new(0, 5),
  1300.                 Name = 'Filler3Corner'
  1301.             })
  1302.         }),
  1303.         Utility:Create('TextLabel', {
  1304.             Name = 'HubNameText',
  1305.             BackgroundColor3 = Theme.SidebarColor,
  1306.             BackgroundTransparency = 1,
  1307.             Position = UDim2.new(0, 0, 0, 6),
  1308.             BorderSizePixel = 0,
  1309.             Size = UDim2.new(0, 170, 0, 20),
  1310.             Font = Enum.Font.Gotham,
  1311.             Text = HubName,
  1312.             TextColor3 = Theme.PrimaryTextColor,
  1313.             TextSize = 18,
  1314.             ZIndex = 2,
  1315.             TextXAlignment = Enum.TextXAlignment.Left
  1316.         }, {
  1317.             Utility:Create('UIPadding', {
  1318.                 Name = 'HubNameTextPadding',
  1319.                 PaddingLeft = UDim.new(0, 7)
  1320.             })
  1321.         }),
  1322.         Utility:Create('TextLabel', {
  1323.             Name = 'GameNameText',
  1324.             BackgroundColor3 = Theme.SidebarColor,
  1325.             BackgroundTransparency = 1,
  1326.             Position = UDim2.new(0, 0, 0, 24),
  1327.             BorderSizePixel = 0,
  1328.             Size = UDim2.new(0, 170, 0, 20),
  1329.             Font = Enum.Font.Gotham,
  1330.             Text = GameName,
  1331.             TextColor3 = Theme.SecondaryTextColor,
  1332.             TextSize = 16,
  1333.             ZIndex = 2,
  1334.             TextXAlignment = Enum.TextXAlignment.Left
  1335.         }, {
  1336.             Utility:Create('UIPadding', {
  1337.                 Name = 'GameNameTextPadding',
  1338.                 PaddingLeft = UDim.new(0, 7)
  1339.             })
  1340.         }),
  1341.         Utility:Create('Frame', {
  1342.             Name = 'SidebarLine1',
  1343.             BackgroundColor3 = Theme.UIStrokeColor,
  1344.             BorderSizePixel = 0,
  1345.             Position = UDim2.new(0, 170, 0, 0),
  1346.             Size = UDim2.new(0, 1, 0, 375)
  1347.         }),
  1348.         Utility:Create('Frame', {
  1349.             Name = 'SidebarLine2',
  1350.             BackgroundColor3 = Theme.UIStrokeColor,
  1351.             BorderSizePixel = 0,
  1352.             Position = UDim2.new(0, 0, 0, 48),
  1353.             Size = UDim2.new(0, 170, 0, 1)
  1354.         }),
  1355.         Utility:Create('ScrollingFrame', {
  1356.             Name = 'TabButtonHolder',
  1357.             Active = true,
  1358.             BackgroundColor3 = Theme.SidebarColor,
  1359.             BorderSizePixel = 0,
  1360.             Position = UDim2.new(0, 0, 0, 55),
  1361.             Size = UDim2.new(0, 170, 0, 313),
  1362.             ScrollBarThickness = 0
  1363.         }, {
  1364.             Utility:Create('UIListLayout', {
  1365.                 Name = 'TabButtonHolderListLayout',
  1366.                 HorizontalAlignment = Enum.HorizontalAlignment.Center,
  1367.                 SortOrder = Enum.SortOrder.LayoutOrder,
  1368.                 Padding = UDim.new(0, 3)
  1369.             })
  1370.         })
  1371.     })
  1372.     Utility:Create('Frame', {
  1373.         Name = 'TabContainer',
  1374.         BackgroundColor3 = Theme.BackgroundColor,
  1375.         Parent = Main,
  1376.         BorderSizePixel = 0,
  1377.         Position = UDim2.new(0, 171, 0, 9),
  1378.         Size = UDim2.new(0, 429, 0, 355)
  1379.     }, {
  1380.         Utility:Create('Folder', {
  1381.             Name = 'TabsFolder'
  1382.         })
  1383.     })
  1384.  
  1385.     local HubNameObj = Container.Main.Sidebar.HubNameText
  1386.     local GameNameObj = Container.Main.Sidebar.GameNameText
  1387.     local TabButtonHolder = Container.Main.Sidebar.TabButtonHolder
  1388.     local TabButtonHolderListLayout = TabButtonHolder['TabButtonHolderListLayout']
  1389.     local PromptHolder = Container.Main.PromptHolder
  1390.  
  1391.     local HubNameTextSize = TextService:GetTextSize(HubNameObj.Text, 18, Enum.Font.Gotham, Vector2.new(410, math.huge))
  1392.     local GameNameTextSize = TextService:GetTextSize(GameNameObj.Text, 16, Enum.Font.Gotham, Vector2.new(410, math.huge))
  1393.  
  1394.     if HubNameTextSize.X >= 165 then
  1395.         local NewText = HubNameObj.Text
  1396.         local X = 0
  1397.         repeat
  1398.             NewText = NewText:sub(0, -2)
  1399.             local HubNameTextSize = TextService:GetTextSize(NewText, 18, Enum.Font.Gotham, Vector2.new(410, math.huge))
  1400.             X = HubNameTextSize.X
  1401.         until X < 165
  1402.         for _ = 1, 2 do
  1403.             NewText = NewText:sub(0, -2)
  1404.         end
  1405.         HubNameObj.Text = NewText..'...'
  1406.     end
  1407.  
  1408.     if GameNameTextSize.X >= 175 then
  1409.         local NewText = GameNameObj.Text
  1410.         local X = 0
  1411.         repeat
  1412.             NewText = NewText:sub(0, -2)
  1413.             local GameNameTextSize = TextService:GetTextSize(NewText, 18, Enum.Font.Gotham, Vector2.new(410, math.huge))
  1414.             X = GameNameTextSize.X
  1415.         until X < 175
  1416.         for _ = 1, 2 do
  1417.             NewText = NewText:sub(0, -2)
  1418.         end
  1419.         GameNameObj.Text = NewText..'...'
  1420.     end
  1421.  
  1422.     HubNameObj.InputBegan:Connect(function(Input)
  1423.         if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1424.             Library:CreatePrompt('Text', 'Hub Name', HubName, 'Close')
  1425.         end
  1426.     end)
  1427.  
  1428.     GameNameObj.InputBegan:Connect(function(Input)
  1429.         if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1430.             Library:CreatePrompt('Text', 'Game Name', GameName, 'Close')
  1431.         end
  1432.     end)
  1433.  
  1434.     function UpdateTabButtonHolderSize()
  1435.         local ContentSize = TabButtonHolderListLayout.AbsoluteContentSize.Y
  1436.  
  1437.         TabButtonHolder.CanvasSize = UDim2.new(0, 170, 0, ContentSize)
  1438.     end
  1439.    
  1440.     TabButtonHolder.ChildAdded:Connect(UpdateTabButtonHolderSize)
  1441.  
  1442.     if not ImprovePerformance then
  1443.         task.spawn(function()
  1444.             while task.wait() do
  1445.                 if ChangeTheme then
  1446.                     if not BreakAllLoops then
  1447.                         Utility:Tween(Container.Main, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1448.                         Utility:Tween(Container.Main.PromptHolder, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1449.                         Utility:Tween(Container.Main.Filler1, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1450.                         Utility:Tween(Container.Main.Filler2, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1451.                         Utility:Tween(Container.Main.Sidebar, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1452.                         Utility:Tween(Container.Main.Sidebar.NamesBehind, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1453.                         Utility:Tween(Container.Main.Sidebar.Filler3, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1454.                         Utility:Tween(Container.Main.Sidebar.HubNameText, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1455.                         Utility:Tween(Container.Main.Sidebar.HubNameText, {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  1456.                         Utility:Tween(Container.Main.Sidebar.GameNameText, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1457.                         Utility:Tween(Container.Main.Sidebar.GameNameText, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  1458.                         Utility:Tween(Container.Main.Sidebar.SidebarLine1, {BackgroundColor3 = Theme.UIStrokeColor}, 0.25)
  1459.                         Utility:Tween(Container.Main.Sidebar.SidebarLine2, {BackgroundColor3 = Theme.UIStrokeColor}, 0.25)
  1460.                         Utility:Tween(Container.Main.Sidebar.TabButtonHolder, {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1461.                         Utility:Tween(Container.Main.TabContainer, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1462.                     else
  1463.                         break
  1464.                     end
  1465.                 end
  1466.             end
  1467.         end)
  1468.     end
  1469.  
  1470.     function ChangeThemeValue()
  1471.         task.spawn(function()
  1472.             ChangeTheme = true
  1473.             task.wait()
  1474.             ChangeTheme = false
  1475.         end)
  1476.     end
  1477.  
  1478.     function Library:ChangeTheme(NewTheme)
  1479.         if not ImprovePerformance then
  1480.             if type(NewTheme) == 'table' then
  1481.                 Theme = NewTheme
  1482.                 local NewTable = {}
  1483.                 for Index, Value in next, Theme do
  1484.                     NewTable[Index] = Utility:SplitColor(Value)
  1485.                 end
  1486.                 writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1487.                 Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1488.                 ChangeThemeValue()
  1489.             elseif type(NewTheme) == 'string' then
  1490.                 NewTheme = NewTheme:lower()
  1491.                 if NewTheme == 'custom' then
  1492.                     Theme = Themes['Custom']
  1493.                     local NewTable = {}
  1494.                     for Index, Value in next, Theme do
  1495.                         NewTable[Index] = Utility:SplitColor(Value)
  1496.                     end
  1497.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1498.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1499.                     ChangeThemeValue()
  1500.                 elseif NewTheme == 'default' then
  1501.                     Theme = Themes['Default']
  1502.                     local NewTable = {}
  1503.                     for Index, Value in next, Theme do
  1504.                         NewTable[Index] = Utility:SplitColor(Value)
  1505.                     end
  1506.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1507.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1508.                     ChangeThemeValue()
  1509.                 elseif NewTheme == 'lighter' then
  1510.                     Theme = Themes['Lighter']
  1511.                     local NewTable = {}
  1512.                     for Index, Value in next, Theme do
  1513.                         NewTable[Index] = Utility:SplitColor(Value)
  1514.                     end
  1515.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1516.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1517.                     ChangeThemeValue()
  1518.                 elseif NewTheme == 'light' then
  1519.                     Theme = Themes['Light']
  1520.                     local NewTable = {}
  1521.                     for Index, Value in next, Theme do
  1522.                         NewTable[Index] = Utility:SplitColor(Value)
  1523.                     end
  1524.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1525.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1526.                     ChangeThemeValue()
  1527.                 elseif NewTheme == 'light+' then
  1528.                     Theme = Themes['Light+']
  1529.                     local NewTable = {}
  1530.                     for Index, Value in next, Theme do
  1531.                         NewTable[Index] = Utility:SplitColor(Value)
  1532.                     end
  1533.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1534.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1535.                     ChangeThemeValue()
  1536.                 elseif NewTheme == 'discord' then
  1537.                     Theme = Themes['Discord']
  1538.                     local NewTable = {}
  1539.                     for Index, Value in next, Theme do
  1540.                         NewTable[Index] = Utility:SplitColor(Value)
  1541.                     end
  1542.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1543.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1544.                     ChangeThemeValue()
  1545.                 elseif NewTheme == 'red and black' then
  1546.                     Theme = Themes['Red And Black']
  1547.                     local NewTable = {}
  1548.                     for Index, Value in next, Theme do
  1549.                         NewTable[Index] = Utility:SplitColor(Value)
  1550.                     end
  1551.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1552.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1553.                     ChangeThemeValue()
  1554.                 elseif NewTheme == 'nordic dark' then
  1555.                     Theme = Themes['Nordic Dark']
  1556.                     local NewTable = {}
  1557.                     for Index, Value in next, Theme do
  1558.                         NewTable[Index] = Utility:SplitColor(Value)
  1559.                     end
  1560.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1561.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1562.                     ChangeThemeValue()
  1563.                 elseif NewTheme == 'nordic light' then
  1564.                     Theme = Themes['Nordic Light']
  1565.                     local NewTable = {}
  1566.                     for Index, Value in next, Theme do
  1567.                         NewTable[Index] = Utility:SplitColor(Value)
  1568.                     end
  1569.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1570.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1571.                     ChangeThemeValue()
  1572.                 elseif NewTheme == 'purple' then
  1573.                     Theme = Themes['Purple']
  1574.                     local NewTable = {}
  1575.                     for Index, Value in next, Theme do
  1576.                         NewTable[Index] = Utility:SplitColor(Value)
  1577.                     end
  1578.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1579.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1580.                     ChangeThemeValue()
  1581.                 elseif NewTheme == 'sentinel' then
  1582.                     Theme = Themes['Sentinel']
  1583.                     local NewTable = {}
  1584.                     for Index, Value in next, Theme do
  1585.                         NewTable[Index] = Utility:SplitColor(Value)
  1586.                     end
  1587.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1588.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1589.                     ChangeThemeValue()
  1590.                 elseif NewTheme == 'synapse x' then
  1591.                     Theme = Themes['Synapse X']
  1592.                     local NewTable = {}
  1593.                     for Index, Value in next, Theme do
  1594.                         NewTable[Index] = Utility:SplitColor(Value)
  1595.                     end
  1596.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1597.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1598.                     ChangeThemeValue()
  1599.                 elseif NewTheme == 'krnl' then
  1600.                     Theme = Themes['Krnl']
  1601.                     local NewTable = {}
  1602.                     for Index, Value in next, Theme do
  1603.                         NewTable[Index] = Utility:SplitColor(Value)
  1604.                     end
  1605.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1606.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1607.                     ChangeThemeValue()
  1608.                 elseif NewTheme == 'script-ware' then
  1609.                     Theme = Themes['Script-Ware']
  1610.                     local NewTable = {}
  1611.                     for Index, Value in next, Theme do
  1612.                         NewTable[Index] = Utility:SplitColor(Value)
  1613.                     end
  1614.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1615.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1616.                     ChangeThemeValue()
  1617.                 elseif NewTheme == 'kiriot' then
  1618.                     Theme = Themes['Kiriot']
  1619.                     local NewTable = {}
  1620.                     for Index, Value in next, Theme do
  1621.                         NewTable[Index] = Utility:SplitColor(Value)
  1622.                     end
  1623.                     writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1624.                     Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1625.                     ChangeThemeValue()
  1626.                 end
  1627.             end
  1628.         end
  1629.     end
  1630.  
  1631.     function Library:ChangeColor(Index, Color)
  1632.         if not ImprovePerformance then
  1633.             Theme[Index] = Color
  1634.             local NewTable = {}
  1635.             for Index, Value in next, Theme do
  1636.                 NewTable[Index] = Utility:SplitColor(Value)
  1637.             end
  1638.             writefile('VisualUILibraryCurrentTheme.json', HttpService:JSONEncode(NewTable))
  1639.             Config['Theme_4z3s4QrUhfqt703FmiAe'] = HttpService:JSONEncode(NewTable)
  1640.             ChangeThemeValue()
  1641.         end
  1642.     end
  1643.  
  1644.     function Library:ReturnTheme()
  1645.         return Theme
  1646.     end
  1647.  
  1648.     function Library:GetThemes()
  1649.         local Table = {}
  1650.         for Index, Value in next, Themes do
  1651.             table.insert(Table, Index)
  1652.         end
  1653.         return Table
  1654.     end
  1655.  
  1656.     local Tabs = {}
  1657.  
  1658.     function Tabs:CreateTab(TabName, DefaultVisibility, Icon, RectOffset, RectSize)
  1659.         local TabName = TabName or 'Tab'
  1660.         local RectOffset = RectOffset or Vector2.new(0, 0)
  1661.         local RectSize = RectSize or Vector2.new(0, 0)
  1662.  
  1663.         Utility:Create('ScrollingFrame', {
  1664.             Name = TabName,
  1665.             Parent = Container.Main.TabContainer.TabsFolder,
  1666.             Active = true,
  1667.             AutomaticCanvasSize = Enum.AutomaticSize.Y,
  1668.             BackgroundColor3 = Theme.BackgroundColor,
  1669.             BackgroundTransparency = 1,
  1670.             Size = UDim2.new(0, 428, 0, 365),
  1671.             BorderSizePixel = 0,
  1672.             ScrollBarImageColor3 = Theme.ScrollBarColor,
  1673.             ScrollBarThickness = 3
  1674.         }, {
  1675.             Utility:Create('UIListLayout', {
  1676.                 Name = TabName..'ListLayout',
  1677.                 HorizontalAlignment = Enum.HorizontalAlignment.Center,
  1678.                 SortOrder = Enum.SortOrder.LayoutOrder,
  1679.                 Padding = UDim.new(0, 3)
  1680.             })
  1681.         })
  1682.         Utility:Create('Frame', {
  1683.             Name = TabName..'ButtonFrame',
  1684.             Parent = Container.Main.Sidebar.TabButtonHolder,
  1685.             BackgroundColor3 = Theme.SidebarColor,
  1686.             BackgroundTransparency = 1,
  1687.             BorderSizePixel = 0,
  1688.             Size = UDim2.new(0, 170, 0, 30)
  1689.         }, {
  1690.             Utility:Create('TextButton', {
  1691.                 Name = TabName..'Button',
  1692.                 BackgroundColor3 = Theme.SidebarColor,
  1693.                 BackgroundTransparency = 1,
  1694.                 Text = '',
  1695.                 Size = UDim2.new(0, 170, 0, 30),
  1696.                 BorderSizePixel = 0,
  1697.                 ZIndex = 2
  1698.             }),
  1699.             Utility:Create('ImageLabel', {
  1700.                 Name = TabName..'ButtonImage',
  1701.                 BackgroundColor3 = Theme.SidebarColor,
  1702.                 BackgroundTransparency = 1,
  1703.                 BorderSizePixel = 0,
  1704.                 Position = UDim2.new(0, 10, 0, 5),
  1705.                 Size = UDim2.new(0, 20, 0, 20),
  1706.                 Image = Icon,
  1707.                 ImageRectOffset = RectOffset,
  1708.                 ImageRectSize = RectSize
  1709.             }),
  1710.             Utility:Create('TextLabel', {
  1711.                 Name = TabName..'ButtonText',
  1712.                 BackgroundColor3 = Theme.SidebarColor,
  1713.                 BackgroundTransparency = 1,
  1714.                 BorderSizePixel = 0,
  1715.                 Position = UDim2.new(0, 30, 0, 3),
  1716.                 Size = UDim2.new(0, 140, 0, 24),
  1717.                 Font = Enum.Font.Gotham,
  1718.                 Text = TabName,
  1719.                 TextColor3 = Theme.PrimaryTextColor,
  1720.                 TextSize = 16,
  1721.                 TextXAlignment = Enum.TextXAlignment.Left
  1722.             }, {
  1723.                 Utility:Create('UIPadding', {
  1724.                     Name = TabName..'ButtonTextPadding',
  1725.                     PaddingLeft = UDim.new(0, 5)
  1726.                 })
  1727.             })
  1728.         })
  1729.        
  1730.         local TabFolder = Container.Main.TabContainer.TabsFolder
  1731.         local Tab = TabFolder[TabName]
  1732.         local TabButtonHolder = Container.Main.Sidebar.TabButtonHolder
  1733.         local TabButton = TabButtonHolder[TabName..'ButtonFrame'][TabName..'Button']
  1734.         local TabListLayout = Tab[TabName..'ListLayout']
  1735.  
  1736.         if not ImprovePerformance then
  1737.             task.spawn(function()
  1738.                 while task.wait() do
  1739.                     if ChangeTheme then
  1740.                         if not BreakAllLoops then
  1741.                             if Tab.Visible then
  1742.                                 Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  1743.                                 Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonImage'], {ImageColor3 = Theme.PrimaryTextColor}, 0.25)
  1744.                             else
  1745.                                 Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonText'], {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  1746.                                 Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonImage'], {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  1747.                             end
  1748.                             Utility:Tween(Tab, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1749.                             Utility:Tween(Tab, {ScrollBarImageColor3 = Theme.ScrollBarColor}, 0.25)
  1750.                             Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'], {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1751.                             Utility:Tween(TabButton, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1752.                             Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonImage'], {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1753.                             Utility:Tween(TabButtonHolder[TabName..'ButtonFrame'][TabName..'ButtonText'], {BackgroundColor3 = Theme.SidebarColor}, 0.25)
  1754.                         else
  1755.                             break
  1756.                         end
  1757.                     end
  1758.                 end
  1759.             end)
  1760.         end
  1761.        
  1762.         if DefaultVisibility then
  1763.             TabButton.Parent[TabName..'ButtonText'].TextColor3 = Theme.PrimaryTextColor
  1764.             TabButton.Parent[TabName..'ButtonImage'].ImageColor3 = Theme.PrimaryTextColor
  1765.             Tab.Visible = true
  1766.  
  1767.             for _, ITab in next, TabFolder:GetChildren()do
  1768.                 if ITab:IsA('ScrollingFrame') and ITab ~= Tab then
  1769.                     ITab.Visible = false
  1770.                 end
  1771.             end
  1772.         else
  1773.             Tab.Visible = false
  1774.             TabButton.Parent[TabName..'ButtonText'].TextColor3 = Theme.SecondaryTextColor
  1775.             TabButton.Parent[TabName..'ButtonImage'].ImageColor3 = Theme.SecondaryTextColor
  1776.         end
  1777.  
  1778.         TabButton.MouseButton1Down:Connect(function()
  1779.             for _, ITab in next, TabFolder:GetChildren() do
  1780.                 ITab.Visible = false
  1781.             end
  1782.  
  1783.             Tab.Visible = true
  1784.                
  1785.             for _, Item in next, TabButtonHolder:GetDescendants() do
  1786.                 if Item:IsA('TextLabel') then
  1787.                     Utility:Tween(Item, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  1788.                 elseif Item:IsA('ImageLabel') then
  1789.                     Utility:Tween(Item, {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  1790.                 end
  1791.             end
  1792.  
  1793.             Utility:Tween(TabButton.Parent[TabName..'ButtonText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  1794.             Utility:Tween(TabButton.Parent[TabName..'ButtonImage'], {ImageColor3 = Theme.PrimaryTextColor}, 0.25)
  1795.         end)
  1796.  
  1797.         local Sections = {}
  1798.  
  1799.         function Sections:CreateSection(Name)
  1800.             local Name = Name or 'Section'
  1801.            
  1802.             Utility:Create('Frame', {
  1803.                 Name = Name..'Section',
  1804.                 Parent = Tab,
  1805.                 BackgroundColor3 = Theme.BackgroundColor,
  1806.                 BorderSizePixel = 0,
  1807.                 Size = UDim2.new(0, 410, 0, 30),
  1808.             }, {
  1809.                 Utility:Create('TextLabel', {
  1810.                     Name = Name..'SectionLabel',
  1811.                     BackgroundColor3 = Theme.BackgroundColor,
  1812.                     BackgroundTransparency = 1,
  1813.                     BorderSizePixel = 0,
  1814.                     Size = UDim2.new(0, 410, 0, 30),
  1815.                     Font = Enum.Font.Gotham,
  1816.                     Text = Name,
  1817.                     TextColor3 = Theme.SecondaryTextColor,
  1818.                     TextSize = 14,
  1819.                     TextXAlignment = Enum.TextXAlignment.Left
  1820.                 }, {
  1821.                     Utility:Create('UIPadding', {
  1822.                         Name = Name..'SectionLabelPadding',
  1823.                         PaddingLeft = UDim.new(0, 3)
  1824.                     })
  1825.                 }),
  1826.                 Utility:Create('UICorner', {
  1827.                     Name = 'SectionCorner',
  1828.                     CornerRadius = UDim.new(0, 5)
  1829.                 }),
  1830.                 Utility:Create('UIListLayout', {
  1831.                     Name = Name..'ListLayout',
  1832.                     HorizontalAlignment = Enum.HorizontalAlignment.Center,
  1833.                     SortOrder = Enum.SortOrder.LayoutOrder,
  1834.                     Padding = UDim.new(0, 6)
  1835.                 })
  1836.             })
  1837.  
  1838.             local Section = Tab[Name..'Section']
  1839.  
  1840.             if not ImprovePerformance then
  1841.                 task.spawn(function()
  1842.                     while task.wait() do
  1843.                         if ChangeTheme then
  1844.                             if not BreakAllLoops then
  1845.                                 Utility:Tween(Section, {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1846.                                 Utility:Tween(Section[Name..'SectionLabel'], {BackgroundColor3 = Theme.BackgroundColor}, 0.25)
  1847.                                 Utility:Tween(Section[Name..'SectionLabel'], {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  1848.                             else
  1849.                                 break
  1850.                             end
  1851.                         end
  1852.                     end
  1853.                 end)
  1854.             end
  1855.            
  1856.             function UpdateSectionSize()
  1857.                 local ContentSize = Section[Name..'ListLayout'].AbsoluteContentSize
  1858.  
  1859.                 Utility:Tween(Section, {Size = UDim2.new(0, ContentSize.X, 0, ContentSize.Y)}, 0.25)
  1860.             end
  1861.  
  1862.             for _, Item in next, Section:GetChildren() do
  1863.                 RunService.RenderStepped:Connect(function()
  1864.                     if Item:IsA('Frame') then
  1865.                         Item.Changed:Connect(function(Property)
  1866.                             if Property == 'Size' then
  1867.                                 UpdateSectionSize()
  1868.                             end
  1869.                         end)
  1870.                     end
  1871.                 end)
  1872.             end
  1873.  
  1874.             UpdateSectionSize()
  1875.             Section.ChildAdded:Connect(UpdateSectionSize)
  1876.             Section.ChildRemoved:Connect(UpdateSectionSize)
  1877.  
  1878.             local Elements = {}
  1879.            
  1880.             function Elements:CreateLabel(LabelText)
  1881.                 local LabelText = LabelText or 'Label'
  1882.                 local LabelFunctions = {}
  1883.  
  1884.                 Utility:Create('Frame', {
  1885.                     Name = LabelText..'LabelHolder',
  1886.                     Parent = Section,
  1887.                     BackgroundColor3 = Theme.OtherElementColor,
  1888.                     Size = UDim2.new(0, 410, 0, 30)
  1889.                 }, {
  1890.                     Utility:Create('UICorner', {
  1891.                         CornerRadius = UDim.new(0, 5),
  1892.                         Name = LabelText..'LabelHolderCorner'
  1893.                     }),
  1894.                     Utility:Create('UIStroke', {
  1895.                         Name = LabelText..'LabelStroke',
  1896.                         ApplyStrokeMode = 'Contextual',
  1897.                         Color = Theme.UIStrokeColor,
  1898.                         LineJoinMode = 'Round',
  1899.                         Thickness = 1
  1900.                     }),
  1901.                     Utility:Create('TextLabel', {
  1902.                         Name = LabelText..'Label',
  1903.                         BackgroundColor3 = Theme.OtherElementColor,
  1904.                         BackgroundTransparency = 1,
  1905.                         Size = UDim2.new(0, 410, 0, 30),
  1906.                         Font = Enum.Font.Gotham,
  1907.                         TextColor3 = Theme.PrimaryTextColor,
  1908.                         TextSize = 16,
  1909.                         Text = LabelText,
  1910.                         TextXAlignment = Enum.TextXAlignment.Left
  1911.                     }, {
  1912.                         Utility:Create('UICorner', {
  1913.                             CornerRadius = UDim.new(0, 5),
  1914.                             Name = LabelText..'LabelCorner'
  1915.                         }),
  1916.                         Utility:Create('UIPadding', {
  1917.                             Name = LabelText..'LabelPadding',
  1918.                             PaddingLeft = UDim.new(0, 7)
  1919.                         })
  1920.                     })
  1921.                 })
  1922.  
  1923.                 UpdateSectionSize()
  1924.  
  1925.                 if not ImprovePerformance then
  1926.                     task.spawn(function()
  1927.                         while task.wait() do
  1928.                             if ChangeTheme then
  1929.                                 if not BreakAllLoops then
  1930.                                     Utility:Tween(Section[LabelText..'LabelHolder'], {BackgroundColor3 = Theme.OtherElementColor}, 0.25)
  1931.                                     Utility:Tween(Section[LabelText..'LabelHolder'][LabelText..'LabelStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  1932.                                     Utility:Tween(Section[LabelText..'LabelHolder'][LabelText..'Label'], {BackgroundColor3 = Theme.OtherElementColor}, 0.25)
  1933.                                     Utility:Tween(Section[LabelText..'LabelHolder'][LabelText..'Label'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  1934.                                 else
  1935.                                     break
  1936.                                 end
  1937.                             end
  1938.                         end
  1939.                     end)
  1940.                 end
  1941.  
  1942.                 function LabelFunctions:UpdateLabel(NewText)
  1943.                     Section[LabelText..'LabelHolder'][LabelText..'Label'].Text = NewText
  1944.                 end
  1945.                 return LabelFunctions
  1946.             end
  1947.  
  1948.             function Elements:CreateParagraph(Title, Paragraph)
  1949.                 local Title = Title or 'Title'
  1950.                 local Paragraph = Paragraph or 'Text'
  1951.                 local ParagraphFunctions = {}
  1952.  
  1953.                 Utility:Create('Frame', {
  1954.                     Name = Title..'ParagraphHolder',
  1955.                     Parent = Section,
  1956.                     BackgroundColor3 = Theme.PrimaryElementColor,
  1957.                     Size = UDim2.new(0, 410, 0, 37)
  1958.                 }, {
  1959.                     Utility:Create('UICorner', {
  1960.                         CornerRadius = UDim.new(0, 5),
  1961.                         Name = Title..'ParagraphHolderCorner'
  1962.                     }),
  1963.                     Utility:Create('UIStroke', {
  1964.                         Name = Title..'ParagraphStroke',
  1965.                         ApplyStrokeMode = 'Contextual',
  1966.                         Color = Theme.UIStrokeColor,
  1967.                         LineJoinMode = 'Round',
  1968.                         Thickness = 1
  1969.                     }),
  1970.                     Utility:Create('TextLabel', {
  1971.                         Name = Title..'ParagraphTitle',
  1972.                         BackgroundColor3 = Theme.PrimaryElementColor,
  1973.                         BackgroundTransparency = 1,
  1974.                         Position = UDim2.new(0, 0, 0, 0),
  1975.                         Size = UDim2.new(0, 410, 0, 20),
  1976.                         Font = Enum.Font.Gotham,
  1977.                         Text = Title,
  1978.                         TextColor3 = Theme.PrimaryTextColor,
  1979.                         TextSize = 16,
  1980.                         TextXAlignment = Enum.TextXAlignment.Left
  1981.                     }, {
  1982.                         Utility:Create('UICorner', {
  1983.                             CornerRadius = UDim.new(0, 5),
  1984.                             Name = Title..'ParagraphTitleCorner'
  1985.                         }),
  1986.                         Utility:Create('UIPadding', {
  1987.                             Name = Title..'ParagraphTitlePadding',
  1988.                             PaddingLeft = UDim.new(0, 7)
  1989.                         })
  1990.                     }),
  1991.                     Utility:Create('TextLabel', {
  1992.                         Name = Title..'ParagraphContent',
  1993.                         BackgroundColor3 = Theme.PrimaryElementColor,
  1994.                         BackgroundTransparency = 1,
  1995.                         Position = UDim2.new(0, 0, 0, 20),
  1996.                         Size = UDim2.new(0, 410, 0, 20),
  1997.                         Font = Enum.Font.Gotham,
  1998.                         Text = Paragraph,
  1999.                         TextColor3 = Theme.SecondaryTextColor,
  2000.                         TextWrapped = true,
  2001.                         TextSize = 14,
  2002.                         TextXAlignment = Enum.TextXAlignment.Left
  2003.                     }, {
  2004.                         Utility:Create('UICorner', {
  2005.                             CornerRadius = UDim.new(0, 5),
  2006.                             Name = Title..'ParagraphContentCorner'
  2007.                         }),
  2008.                         Utility:Create('UIPadding', {
  2009.                             Name = Title..'ParagraphContentPadding',
  2010.                             PaddingLeft = UDim.new(0, 7)
  2011.                         })
  2012.                     })
  2013.                 })
  2014.                 local Old
  2015.  
  2016.                 local ParagraphHolder = Section[Title..'ParagraphHolder']
  2017.                 local ParagraphContent = Section[Title..'ParagraphHolder'][Title..'ParagraphContent']
  2018.                 local ParagraphTitle = Section[Title..'ParagraphHolder'][Title..'ParagraphTitle']
  2019.  
  2020.                 local TextSizeOld = TextService:GetTextSize(Paragraph, 14, Enum.Font.Gotham, Vector2.new(410, math.huge))
  2021.  
  2022.                 ParagraphHolder.Size = UDim2.new(0, 410, 0, TextSizeOld.Y + 25)
  2023.                 ParagraphContent.Size = UDim2.new(0, 410, 0, TextSizeOld.Y)
  2024.  
  2025.                 UpdateSectionSize()
  2026.  
  2027.                 if not ImprovePerformance then
  2028.                     task.spawn(function()
  2029.                         while task.wait() do
  2030.                             if ChangeTheme then
  2031.                                 if not BreakAllLoops then
  2032.                                     Utility:Tween(ParagraphHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2033.                                     Utility:Tween(ParagraphHolder[Title..'ParagraphStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2034.                                     Utility:Tween(ParagraphTitle, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2035.                                     Utility:Tween(ParagraphTitle, {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2036.                                     Utility:Tween(ParagraphContent, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2037.                                     Utility:Tween(ParagraphContent, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  2038.                                 else
  2039.                                     break
  2040.                                 end
  2041.                             end
  2042.                         end
  2043.                     end)
  2044.                 end
  2045.  
  2046.                 function ParagraphFunctions:UpdateParagraph(NewTitle, NewParagraph)
  2047.                     Old = ParagraphContent.Text
  2048.                     ParagraphTitle.Text = NewTitle
  2049.                     ParagraphContent.Text = NewParagraph
  2050.                     local TextSizeNew = TextService:GetTextSize(ParagraphContent.Text, 14, Enum.Font.Gotham, Vector2.new(410, math.huge))
  2051.                     local TextSizeOld = TextService:GetTextSize(Old, 14, Enum.Font.Gotham, Vector2.new(410, math.huge))
  2052.  
  2053.                     if TextSizeNew.Y > 14 and TextSizeNew.Y > TextSizeOld.Y then
  2054.                         Tab.CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, TextSizeOld.Y + 5)
  2055.                         Section.Size = Section.Size - UDim2.new(0, 0, 0, TextSizeOld.Y + 5)
  2056.                         Tab.CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, TextSizeNew.Y + 5)
  2057.                         Section.Size = Section.Size + UDim2.new(0, 0, 0, TextSizeNew.Y + 5)
  2058.                         ParagraphHolder.Size = UDim2.new(0, 410, 0, TextSizeNew.Y + 20)
  2059.                         ParagraphContent.Size = UDim2.new(0, 410, 0, TextSizeNew.Y)
  2060.                     elseif TextSizeNew.Y < TextSizeOld.Y then
  2061.                         Tab.CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, TextSizeOld.Y + 5)
  2062.                         Section.Size = Section.Size - UDim2.new(0, 0, 0, TextSizeOld.Y + 5)
  2063.                         Tab.CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, TextSizeNew.Y + 5)
  2064.                         Section.Size = Section.Size + UDim2.new(0, 0, 0, TextSizeNew.Y + 5)
  2065.                         ParagraphHolder.Size = ParagraphHolder.Size - UDim2.new(0, 0, 0, TextSizeOld.Y)
  2066.                         ParagraphHolder.Size = UDim2.new(0, 410, 0, TextSizeNew.Y + 20)
  2067.                         ParagraphContent.Size = UDim2.new(0, 410, 0, TextSizeNew.Y)
  2068.                     end      
  2069.                 end
  2070.                 return ParagraphFunctions
  2071.             end
  2072.  
  2073.             function Elements:CreateButton(Name, Callback)
  2074.                 local Name = Name or 'Button'
  2075.                 local Callback = Callback or function() end
  2076.                 local Hovering = false
  2077.  
  2078.                 Utility:Create('Frame', {
  2079.                     Name = Name..'ButtonHolder',
  2080.                     Parent = Section,
  2081.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2082.                     Size = UDim2.new(0, 410, 0, 30)
  2083.                 }, {
  2084.                     Utility:Create('UICorner', {
  2085.                         CornerRadius = UDim.new(0, 5),
  2086.                         Name = Name..'ButtonHolderCorner'
  2087.                     }),
  2088.                     Utility:Create('UIStroke', {
  2089.                         Name = Name..'ButtonHolderStroke',
  2090.                         ApplyStrokeMode = 'Contextual',
  2091.                         Color = Theme.UIStrokeColor,
  2092.                         LineJoinMode = 'Round',
  2093.                         Thickness = 1
  2094.                     }),
  2095.                     Utility:Create('TextButton', {
  2096.                         Name = Name..'Button',
  2097.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2098.                         BackgroundTransparency = 1,
  2099.                         Size = UDim2.new(0, 410, 0, 30),
  2100.                         Font = Enum.Font.Gotham,
  2101.                         TextColor3 = Theme.PrimaryTextColor,
  2102.                         TextSize = 16,
  2103.                         TextXAlignment = Enum.TextXAlignment.Left,
  2104.                         Text = Name
  2105.                     }, {
  2106.                         Utility:Create('UICorner', {
  2107.                             CornerRadius = UDim.new(0, 5),
  2108.                             Name = 'ButtonCorner'
  2109.                         }),
  2110.                         Utility:Create('UIPadding', {
  2111.                             Name = 'ButtonPadding',
  2112.                             PaddingLeft = UDim.new(0, 7)
  2113.                         }),
  2114.                         Utility:Create('ImageLabel', {
  2115.                             Name = 'ButtonImage',
  2116.                             BackgroundColor3 = Theme.PrimaryElementColor,
  2117.                             BackgroundTransparency = 1,
  2118.                             Position = UDim2.new(0, 374, 0, 3),
  2119.                             Size = UDim2.new(0, 25, 0, 25),
  2120.                             Image = 'rbxassetid://3926307971',
  2121.                             ImageColor3 = Theme.SecondaryTextColor,
  2122.                             ImageRectOffset = Vector2.new(564, 364),
  2123.                             ImageRectSize = Vector2.new(36, 36)
  2124.                         })
  2125.                     })
  2126.                 })
  2127.  
  2128.                 UpdateSectionSize()
  2129.  
  2130.                 local ButtonHolder = Section[Name..'ButtonHolder']
  2131.                 local Button = ButtonHolder[Name..'Button']
  2132.  
  2133.                 if not ImprovePerformance then
  2134.                     task.spawn(function()
  2135.                         while task.wait() do
  2136.                             if ChangeTheme then
  2137.                                 if not BreakAllLoops then
  2138.                                     if not Hovering then
  2139.                                         Utility:Tween(ButtonHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2140.                                     end
  2141.                                     Utility:Tween(ButtonHolder[Name..'ButtonHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2142.                                     Utility:Tween(Button, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2143.                                     Utility:Tween(Button, {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2144.                                     Utility:Tween(Button['ButtonImage'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2145.                                     Utility:Tween(Button['ButtonImage'], {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  2146.                                 else
  2147.                                     break
  2148.                                 end
  2149.                             end
  2150.                         end
  2151.                     end)
  2152.                 end
  2153.  
  2154.                 Button.MouseButton1Down:Connect(function()
  2155.                     Hovering = true
  2156.                     Utility:Tween(ButtonHolder, {BackgroundColor3 = Utility:Darken(Theme.PrimaryElementColor)}, 0.25)
  2157.                     task.spawn(function()
  2158.                         Callback()
  2159.                     end)
  2160.                     task.wait(0.25)
  2161.                     Utility:Tween(ButtonHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2162.                     Hovering = false
  2163.                 end)
  2164.  
  2165.                 Button.MouseEnter:Connect(function()
  2166.                     Hovering = true
  2167.                     Utility:Tween(ButtonHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2168.                 end)
  2169.  
  2170.                 Button.MouseLeave:Connect(function()
  2171.                     Utility:Tween(ButtonHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2172.                     Hovering = false
  2173.                 end)
  2174.             end
  2175.  
  2176.             function Elements:CreateSlider(Name, MinimumValue, MaximumValue, DefaultValue, SliderColor, Callback)
  2177.                 local Name = Name or 'Slider'
  2178.                 local MinimumValue = MinimumValue or 1
  2179.                 local MaximumValue = MaximumValue or 100
  2180.                 local SliderColor = SliderColor or Color3.fromRGB(0, 125, 255)
  2181.                 local Callback = Callback or function() end
  2182.                 local CurrentValue = DefaultValue
  2183.                 local SliderFunctions = {}
  2184.                 local Hovering = false
  2185.  
  2186.                 Utility:Create('Frame', {
  2187.                     Name = Name..'SliderHolder',
  2188.                     Parent = Section,
  2189.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2190.                     Size = UDim2.new(0, 410, 0, 50)
  2191.                 }, {
  2192.                     Utility:Create('UICorner', {
  2193.                         CornerRadius = UDim.new(0, 5),
  2194.                         Name = Name..'SliderHolderCorner'
  2195.                     }),
  2196.                     Utility:Create('UIStroke', {
  2197.                         Name = Name..'SliderHolderStroke',
  2198.                         ApplyStrokeMode = 'Contextual',
  2199.                         Color = Theme.UIStrokeColor,
  2200.                         LineJoinMode = 'Round',
  2201.                         Thickness = 1
  2202.                     }),
  2203.                     Utility:Create('TextLabel', {
  2204.                         Name = 'SliderText',
  2205.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2206.                         BackgroundTransparency = 1,
  2207.                         Size = UDim2.new(0, 300, 0, 30),
  2208.                         Font = Enum.Font.Gotham,
  2209.                         Text = Name,
  2210.                         TextColor3 = Theme.PrimaryTextColor,
  2211.                         TextSize = 16,
  2212.                         TextXAlignment = Enum.TextXAlignment.Left
  2213.                     }, {
  2214.                         Utility:Create('UICorner', {
  2215.                             CornerRadius = UDim.new(0, 5),
  2216.                             Name = Name..'SliderTextCorner'
  2217.                         }),
  2218.                         Utility:Create('UIPadding', {
  2219.                             Name = Name..'SliderTextPadding',
  2220.                             PaddingLeft = UDim.new(0, 7)
  2221.                         }),
  2222.                     }),
  2223.                     Utility:Create('TextButton', {
  2224.                         Name = Name..'SliderButton',
  2225.                         BackgroundColor3 = Theme.SecondaryElementColor,
  2226.                         Position = UDim2.new(0, 7, 0, 29),
  2227.                         Size = UDim2.new(0, 395, 0, 10),
  2228.                         Text = '',
  2229.                         BorderSizePixel = 0,
  2230.                         AutoButtonColor = false
  2231.                     }, {
  2232.                         Utility:Create('UIStroke', {
  2233.                             Name = Name..'SliderButtonStroke',
  2234.                             ApplyStrokeMode = 'Contextual',
  2235.                             Color = Theme.UIStrokeColor,
  2236.                             LineJoinMode = 'Round',
  2237.                             Thickness = 1
  2238.                         }),
  2239.                         Utility:Create('UICorner', {
  2240.                             CornerRadius = UDim.new(0, 5),
  2241.                             Name = Name..'SliderButtonCorner'
  2242.                         }),
  2243.                         Utility:Create('Frame', {
  2244.                             Name = Name..'SliderTrail',
  2245.                             BackgroundColor3 = SliderColor,
  2246.                             Size = UDim2.new(0, 0, 0, 10),
  2247.                             BorderSizePixel = 0
  2248.                         }, {
  2249.                             Utility:Create('UICorner', {
  2250.                                 CornerRadius = UDim.new(0, 5),
  2251.                                 Name = Name..'SliderTrailCorner'
  2252.                             })
  2253.                         })
  2254.                     }),
  2255.                     Utility:Create('TextLabel', {
  2256.                         Name = Name..'SliderNumberText',
  2257.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2258.                         BackgroundTransparency = 1,
  2259.                         Position = UDim2.new(0, 299, 0, 0),
  2260.                         Size = UDim2.new(0, 110, 0, 30),
  2261.                         Font = Enum.Font.Gotham,
  2262.                         Text = '0',
  2263.                         TextColor3 = Theme.SecondaryTextColor,
  2264.                         TextSize = 14,
  2265.                         TextXAlignment = Enum.TextXAlignment.Right
  2266.                     }, {
  2267.                         Utility:Create('UICorner', {
  2268.                             CornerRadius = UDim.new(0, 5),
  2269.                             Name = Name..'SliderNumberTextCorner'
  2270.                         }),
  2271.                         Utility:Create('UIPadding', {
  2272.                             Name = Name..'SliderNumberTextPadding',
  2273.                             PaddingRight = UDim.new(0, 7)
  2274.                         })
  2275.                     })
  2276.                 })
  2277.  
  2278.                 local Mouse = Players.LocalPlayer:GetMouse()
  2279.                 local SliderHolder = Section[Name..'SliderHolder']
  2280.                 local SliderButton = SliderHolder[Name..'SliderButton']
  2281.                 local SliderNumber = SliderHolder[Name..'SliderNumberText']
  2282.                 local SliderTrail = SliderButton[Name..'SliderTrail']
  2283.  
  2284.                 UpdateSectionSize()
  2285.  
  2286.                 Config[Name] = CurrentValue
  2287.  
  2288.                 if not ImprovePerformance then
  2289.                     task.spawn(function()
  2290.                         while task.wait() do
  2291.                             if ChangeTheme then
  2292.                                 if not BreakAllLoops then
  2293.                                     if not Hovering then
  2294.                                         Utility:Tween(SliderHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2295.                                     end
  2296.                                     Utility:Tween(SliderHolder[Name..'SliderHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2297.                                     Utility:Tween(SliderHolder['SliderText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2298.                                     Utility:Tween(SliderHolder['SliderText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2299.                                     Utility:Tween(SliderButton, {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2300.                                     Utility:Tween(SliderButton[Name..'SliderButtonStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2301.                                     Utility:Tween(SliderNumber, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2302.                                     Utility:Tween(SliderNumber, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  2303.                                 else
  2304.                                     break
  2305.                                 end
  2306.                             end
  2307.                         end
  2308.                     end)
  2309.                 end
  2310.  
  2311.                 if DefaultValue ~= nil then
  2312.                     SliderNumber.Text = tostring(DefaultValue and math.floor((DefaultValue / MaximumValue) * (MaximumValue - MinimumValue) + MinimumValue))
  2313.                     Utility:Tween(SliderTrail, {Size = UDim2.new((DefaultValue) / MaximumValue, 0, 0, 10)}, 0.25)  
  2314.                     task.spawn(function()
  2315.                         Callback(CurrentValue)
  2316.                     end)
  2317.                 end
  2318.  
  2319.                 SliderButton.MouseButton1Down:Connect(function()
  2320.                     CurrentValue = (((tonumber(MaximumValue) - tonumber(MinimumValue)) / 395) * SliderTrail.AbsoluteSize.X) + tonumber(MinimumValue)
  2321.                     task.spawn(function()
  2322.                         Callback(CurrentValue)
  2323.                     end)
  2324.                     Utility:Tween(SliderTrail, {Size = UDim2.new(0, math.clamp(Mouse.X - SliderTrail.AbsolutePosition.X, 0, 395), 0, 10)}, 0.25)
  2325.                     MoveConnection = Mouse.Move:Connect(function()
  2326.                         SliderNumber.Text = CurrentValue
  2327.                         CurrentValue = math.floor((((tonumber(MaximumValue) - tonumber(MinimumValue)) / 395) * SliderTrail.AbsoluteSize.X) + tonumber(MinimumValue))
  2328.                         task.spawn(function()
  2329.                             Callback(CurrentValue)
  2330.                         end)
  2331.                         Config[Name] = CurrentValue
  2332.                         Utility:Tween(SliderNumber, {TextColor3 = Color3.new(255, 255, 255)}, 0.25)
  2333.                         Utility:Tween(SliderTrail, {Size = UDim2.new(0, math.clamp(Mouse.X - SliderTrail.AbsolutePosition.X, 0, 395), 0, 10)}, 0.25)
  2334.                     end)
  2335.                     ReleaseConnection = UserInputService.InputEnded:Connect(function(Input)
  2336.                         if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  2337.                             CurrentValue = math.floor((((tonumber(MaximumValue) - tonumber(MinimumValue)) / 395) * SliderTrail.AbsoluteSize.X) + tonumber(MinimumValue))
  2338.                             task.spawn(function()
  2339.                                 Callback(CurrentValue)
  2340.                             end)
  2341.                             Config[Name] = CurrentValue
  2342.                             Utility:Tween(SliderTrail, {Size = UDim2.new(0, math.clamp(Mouse.X - SliderTrail.AbsolutePosition.X, 0, 395), 0, 10)}, 0.25)
  2343.                             MoveConnection:Disconnect()
  2344.                             ReleaseConnection:Disconnect()
  2345.                         end
  2346.                     end)
  2347.                 end)
  2348.  
  2349.                 SliderHolder.MouseEnter:Connect(function()
  2350.                     Hovering = true
  2351.                     Utility:Tween(SliderHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2352.                 end)
  2353.  
  2354.                 SliderHolder.MouseLeave:Connect(function()
  2355.                     Utility:Tween(SliderHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2356.                     Hovering = false
  2357.                 end)
  2358.  
  2359.                 function SliderFunctions:Set(Value)
  2360.                     SliderNumber.Text = tostring(Value and math.floor((Value / MaximumValue) * (MaximumValue - MinimumValue) + MinimumValue))
  2361.                     Utility:Tween(SliderTrail, {Size = UDim2.new((Value) / MaximumValue, 0, 0, 10)}, 0.25)  
  2362.                     Callback(Value)
  2363.                 end
  2364.                 ConfigUpdates[Name] = SliderFunctions
  2365.                 return SliderFunctions
  2366.             end
  2367.  
  2368.             function Elements:CreateTextbox(Name, Placeholder, Callback)
  2369.                 local Name = Name or 'Textbox'
  2370.                 local Placeholder = Placeholder or 'Input'
  2371.                 local Callback = Callback or function() end
  2372.                 local Length = nil
  2373.                 local Hovering = false
  2374.  
  2375.                 Utility:Create('Frame', {
  2376.                     Name = Name..'TextboxHolder',
  2377.                     Parent = Section,
  2378.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2379.                     Size = UDim2.new(0, 410, 0, 40)
  2380.                 }, {
  2381.                     Utility:Create('UICorner', {
  2382.                         CornerRadius = UDim.new(0, 5),
  2383.                         Name = Name..'TextboxHolderCorner'
  2384.                     }),
  2385.                     Utility:Create('UIStroke', {
  2386.                         Name = Name..'TextboxHolderStroke',
  2387.                         ApplyStrokeMode = 'Contextual',
  2388.                         Color = Theme.UIStrokeColor,
  2389.                         LineJoinMode = 'Round',
  2390.                         Thickness = 1
  2391.                     }),
  2392.                     Utility:Create('TextLabel', {
  2393.                         Name = Name..'TextboxText',
  2394.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2395.                         BackgroundTransparency = 1,
  2396.                         Position = UDim2.new(0, 0, 0, 5),
  2397.                         Size = UDim2.new(0, 299, 0, 30),
  2398.                         Font = Enum.Font.Gotham,
  2399.                         Text = Name,
  2400.                         TextColor3 = Theme.PrimaryTextColor,
  2401.                         TextSize = 16,
  2402.                         TextXAlignment = Enum.TextXAlignment.Left
  2403.                     }, {
  2404.                         Utility:Create('UIPadding', {
  2405.                             Name = Name..'TextboxTextPadding',
  2406.                             PaddingLeft = UDim.new(0, 7)
  2407.                         })
  2408.                     }),
  2409.                     Utility:Create('TextBox', {
  2410.                         Name = Name..'Textbox',
  2411.                         BackgroundColor3 = Theme.SecondaryElementColor,
  2412.                         BorderSizePixel = 0,
  2413.                         AnchorPoint = Vector2.new(1, 0.5),
  2414.                         Position = UDim2.new(0, 400, 0, 20),
  2415.                         Size = UDim2.new(0, 50, 0, 25),
  2416.                         Font = Enum.Font.Gotham,
  2417.                         PlaceholderColor3 = Theme.SecondaryTextColor,
  2418.                         Text = Placeholder,
  2419.                         TextColor3 = Theme.SecondaryTextColor,
  2420.                         TextSize = 14,
  2421.                         ClearTextOnFocus = true
  2422.                     }, {
  2423.                         Utility:Create('UIStroke', {
  2424.                             Name = Name..'TextboxStroke',
  2425.                             ApplyStrokeMode = 'Border',
  2426.                             Color = Theme.UIStrokeColor,
  2427.                             LineJoinMode = 'Round',
  2428.                             Thickness = 1
  2429.                         }),
  2430.                         Utility:Create('UICorner', {
  2431.                             CornerRadius = UDim.new(0, 5),
  2432.                             Name = Name..'TextboxCorner'
  2433.                         })
  2434.                     })
  2435.                 })
  2436.  
  2437.                 local TextboxHolder = Section[Name..'TextboxHolder']
  2438.                 local Textbox = TextboxHolder[Name..'Textbox']
  2439.  
  2440.                 UpdateSectionSize()
  2441.  
  2442.                 if not ImprovePerformance then
  2443.                     task.spawn(function()
  2444.                         while task.wait() do
  2445.                             if ChangeTheme then
  2446.                                 if not BreakAllLoops then
  2447.                                     if not Hovering then
  2448.                                         Utility:Tween(TextboxHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2449.                                     end
  2450.                                     Utility:Tween(TextboxHolder[Name..'TextboxHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2451.                                     Utility:Tween(TextboxHolder[Name..'TextboxText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2452.                                     Utility:Tween(TextboxHolder[Name..'TextboxText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2453.                                     Utility:Tween(Textbox, {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2454.                                     Utility:Tween(Textbox, {PlaceholderColor3 = Theme.SecondaryTextColor}, 0.25)
  2455.                                     Utility:Tween(Textbox, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  2456.                                     Utility:Tween(Textbox[Name..'TextboxStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2457.                                 else
  2458.                                     break
  2459.                                 end
  2460.                             end
  2461.                         end
  2462.                     end)
  2463.                 end
  2464.  
  2465.                 local TextSize = TextService:GetTextSize(Placeholder, 14, Enum.Font.Gotham, Vector2.new(410, 40))
  2466.  
  2467.                 if TextSize.X < 50 then
  2468.                     Utility:Tween(Textbox, {Size = UDim2.new(0, 50, 0, 25)}, 0.25)
  2469.                 else
  2470.                     Utility:Tween(Textbox, {Size = UDim2.new(0, TextSize.X + 10, 0, 25)}, 0.25)
  2471.                 end
  2472.  
  2473.                 Textbox.Focused:Connect(function()
  2474.                     Hovering = true
  2475.                     Utility:Tween(Textbox, {BackgroundColor3 = Utility:Lighten(Theme.SecondaryElementColor)}, 0.25)
  2476.                     Utility:Tween(TextboxHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2477.                 end)
  2478.                
  2479.                 Textbox.FocusLost:Connect(function()
  2480.                     Utility:Tween(Textbox, {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2481.                     Utility:Tween(TextboxHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2482.                     task.spawn(function()
  2483.                         Callback(Textbox.Text)
  2484.                     end)
  2485.                     Hovering = false
  2486.                 end)
  2487.  
  2488.                 TextboxHolder.InputBegan:Connect(function(Input)
  2489.                     if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  2490.                         Textbox:CaptureFocus()
  2491.                     end
  2492.                 end)
  2493.  
  2494.                 Textbox.Changed:Connect(function(Property)
  2495.                     if Property == 'Text' then
  2496.                         Utility:Tween(Textbox, {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2497.  
  2498.                         local TextSize = TextService:GetTextSize(Textbox.Text, 14, Enum.Font.Gotham, Vector2.new(410, 40))
  2499.  
  2500.                         if TextSize.X < 50 then
  2501.                             Utility:Tween(Textbox, {Size = UDim2.new(0, 50, 0, 25)}, 0.25)
  2502.                         else
  2503.                             Utility:Tween(Textbox, {Size = UDim2.new(0, TextSize.X + 10, 0, 25)}, 0.25)
  2504.                         end
  2505.                     end
  2506.                 end)
  2507.  
  2508.                 TextboxHolder.MouseEnter:Connect(function()
  2509.                     Hovering = true
  2510.                     Utility:Tween(TextboxHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2511.                 end)
  2512.  
  2513.                 TextboxHolder.MouseLeave:Connect(function()
  2514.                     Utility:Tween(TextboxHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2515.                     Hovering = false
  2516.                 end)
  2517.             end
  2518.  
  2519.             function Elements:CreateKeybind(Name, Key, Callback)
  2520.                 local Name = Name or 'Keybind'
  2521.                 local Key = Key or 'E'
  2522.                 local Callback = Callback or function() end
  2523.                 local Current = Key
  2524.                 local KeybindFunctions = {}
  2525.                 local Hovering = false
  2526.  
  2527.                 Utility:Create('Frame', {
  2528.                     Name = Name..'KeybindHolder',
  2529.                     Parent = Section,
  2530.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2531.                     Size = UDim2.new(0, 410, 0, 40)
  2532.                 }, {
  2533.                     Utility:Create('UICorner', {
  2534.                         CornerRadius = UDim.new(0, 5),
  2535.                         Name = Name..'KeybindHolderCorner'
  2536.                     }),
  2537.                     Utility:Create('UIStroke', {
  2538.                         Name = Name..'KeybindHolderStroke',
  2539.                         ApplyStrokeMode = 'Contextual',
  2540.                         Color = Theme.UIStrokeColor,
  2541.                         LineJoinMode = 'Round',
  2542.                         Thickness = 1
  2543.                     }),
  2544.                     Utility:Create('TextLabel', {
  2545.                         Name = Name..'KeybindText',
  2546.                         Parent = KeybindHolder,
  2547.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2548.                         BackgroundTransparency = 1,
  2549.                         Position = UDim2.new(0, 0, 0, 5),
  2550.                         Size = UDim2.new(0, 352, 0, 30),
  2551.                         Font = Enum.Font.Gotham,
  2552.                         Text = Name,
  2553.                         TextColor3 = Theme.PrimaryTextColor,
  2554.                         TextSize = 16,
  2555.                         TextXAlignment = Enum.TextXAlignment.Left
  2556.                     }, {
  2557.                         Utility:Create('UIPadding', {
  2558.                             Name = Name..'KeybindTextPadding',
  2559.                             PaddingLeft = UDim.new(0, 7)
  2560.                         })
  2561.                     }),
  2562.                     Utility:Create('TextButton', {
  2563.                         Name = Name..'Keybind',
  2564.                         Parent = KeybindHolder,
  2565.                         BackgroundColor3 = Theme.SecondaryElementColor,
  2566.                         Position = UDim2.new(0, 376, 0, 8),
  2567.                         Size = UDim2.new(0, 25, 0, 25),
  2568.                         Font = Enum.Font.Gotham,
  2569.                         Text = Current,
  2570.                         AnchorPoint = Vector2.new(1, 0.5),
  2571.                         Position = UDim2.new(0, 400, 0, 20),
  2572.                         TextColor3 = Theme.SecondaryTextColor,
  2573.                         TextSize = 14,
  2574.                         AutoButtonColor = false
  2575.                     }, {
  2576.                         Utility:Create('UIStroke', {
  2577.                             Name = Name..'KeybindStroke',
  2578.                             ApplyStrokeMode = 'Border',
  2579.                             Color = Theme.UIStrokeColor,
  2580.                             LineJoinMode = 'Round',
  2581.                             Thickness = 1
  2582.                         }),
  2583.                         Utility:Create('UICorner', {
  2584.                             CornerRadius = UDim.new(0, 5),
  2585.                             Name = Name..'KeybindCorner'
  2586.                         })
  2587.                     })
  2588.                 })
  2589.                
  2590.                 local KeybindHolder = Section[Name..'KeybindHolder']
  2591.                 local Keybind = KeybindHolder[Name..'Keybind']
  2592.                
  2593.                 UpdateSectionSize()
  2594.  
  2595.                 Config[Name] = Current
  2596.  
  2597.                 if not ImprovePerformance then
  2598.                     task.spawn(function()
  2599.                         while task.wait() do
  2600.                             if ChangeTheme then
  2601.                                 if not BreakAllLoops then
  2602.                                     if not Hovering then
  2603.                                         Utility:Tween(KeybindHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2604.                                     end
  2605.                                     Utility:Tween(KeybindHolder[Name..'KeybindHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2606.                                     Utility:Tween(KeybindHolder[Name..'KeybindText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2607.                                     Utility:Tween(KeybindHolder[Name..'KeybindText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2608.                                     Utility:Tween(KeybindHolder[Name..'Keybind'], {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2609.                                     Utility:Tween(KeybindHolder[Name..'Keybind'], {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  2610.                                     Utility:Tween(KeybindHolder[Name..'Keybind'][Name..'KeybindStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2611.                                 else
  2612.                                     break
  2613.                                 end
  2614.                             end
  2615.                         end
  2616.                     end)
  2617.                 end
  2618.  
  2619.                 TextSize = TextService:GetTextSize(Current, 14, Enum.Font.Gotham, Vector2.new(410, 40))
  2620.                 if TextSize.X < 25 then
  2621.                     Utility:Tween(Keybind, {Size = UDim2.new(0, 25, 0, 25)}, 0.25)
  2622.                 else
  2623.                     Utility:Tween(Keybind, {Size = UDim2.new(0, TextSize.X + 10, 0, 25)}, 0.25)
  2624.                 end
  2625.  
  2626.                 Keybind.MouseButton1Click:Connect(function()
  2627.                     Keybind.Text = '. . .'
  2628.                     Utility:Tween(KeybindHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2629.                     local Input, _ = UserInputService.InputBegan:wait();
  2630.  
  2631.                     if Input.KeyCode.Name ~= 'Unknown' then
  2632.                         Keybind.Text = Input.KeyCode.Name
  2633.                         TextSize = TextService:GetTextSize(Input.KeyCode.Name, 14, Enum.Font.Gotham, Vector2.new(410, 40))
  2634.                         if TextSize.X < 25 then
  2635.                             Utility:Tween(Keybind, {Size = UDim2.new(0, 25, 0, 25)}, 0.25)
  2636.                         else
  2637.                             Utility:Tween(Keybind, {Size = UDim2.new(0, TextSize.X + 10, 0, 25)}, 0.25)
  2638.                         end
  2639.                         Current = Input.KeyCode.Name;
  2640.                         Utility:Tween(KeybindHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2641.                     end
  2642.                 end)
  2643.  
  2644.                 local Con = UserInputService.InputBegan:Connect(function(Input, GameProcessedEvent)
  2645.                     if not GameProcessedEvent then
  2646.                         if Input.KeyCode.Name == Current then
  2647.                             task.spawn(function()
  2648.                                 Callback()
  2649.                             end)
  2650.                         end
  2651.                     end
  2652.                 end)
  2653.  
  2654.                 function KeybindFunctions:Break()
  2655.                     Con:Disconnect()
  2656.                     print('x')
  2657.                 end
  2658.                 Ihatethisui[Name] = KeybindFunctions
  2659.  
  2660.                 KeybindHolder.MouseEnter:Connect(function()
  2661.                     Hovering = true
  2662.                     Utility:Tween(KeybindHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  2663.                 end)
  2664.  
  2665.                 KeybindHolder.MouseLeave:Connect(function()
  2666.                     Utility:Tween(KeybindHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2667.                     Hovering = false
  2668.                 end)
  2669.  
  2670.                 function KeybindFunctions:Set(Value)
  2671.                     Current = Value
  2672.                     Keybind.Text = Value
  2673.                 end
  2674.                 ConfigUpdates[Name] = KeybindFunctions
  2675.                 return KeybindFunctions
  2676.             end
  2677.  
  2678.             function Elements:CreateToggle(Name, Default, ToggleColor, DebounceAmount, Callback)
  2679.                 local Name = Name or 'Toggle'
  2680.                 local Default = Default or false
  2681.                 local Callback = Callback or function() end
  2682.                 local Toggled = Default
  2683.                 local ToggleColor = ToggleColor or Color3.fromRGB(0, 255, 100)
  2684.                 local Debounce = false
  2685.                 local DebounceAmount = DebounceAmount or 0.25
  2686.                 local ToggleFunctions = {}
  2687.                 local Hovering = false
  2688.  
  2689.                 Utility:Create('Frame', {
  2690.                     Name = Name..'ToggleHolder',
  2691.                     Parent = Section,
  2692.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2693.                     Size = UDim2.new(0, 410, 0, 40)
  2694.                 }, {
  2695.                     Utility:Create('UICorner', {
  2696.                         CornerRadius = UDim.new(0, 5),
  2697.                         Name = Name..'ToggleHolderCorner'
  2698.                     }),
  2699.                     Utility:Create('UIStroke', {
  2700.                         Name = Name..'ToggleHolderStroke',
  2701.                         ApplyStrokeMode = 'Contextual',
  2702.                         Color = Theme.UIStrokeColor,
  2703.                         LineJoinMode = 'Round',
  2704.                         Thickness = 1
  2705.                     }),
  2706.                     Utility:Create('TextLabel', {
  2707.                         Name = Name..'ToggleText',
  2708.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2709.                         BackgroundTransparency = 1,
  2710.                         Position = UDim2.new(0, 0, 0, 5),
  2711.                         Size = UDim2.new(0, 344, 0, 30),
  2712.                         Font = Enum.Font.Gotham,
  2713.                         Text = Name,
  2714.                         TextColor3 = Theme.PrimaryTextColor,
  2715.                         TextSize = 16,
  2716.                         TextXAlignment = Enum.TextXAlignment.Left
  2717.                     }, {
  2718.                         Utility:Create('UIPadding', {
  2719.                             Name = Name..'ToggleTextPadding',
  2720.                             PaddingLeft = UDim.new(0, 7)
  2721.                         })
  2722.                     }),
  2723.                     Utility:Create('Frame', {
  2724.                         Name = Name..'Toggle',
  2725.                         BackgroundColor3 = Theme.SecondaryElementColor,
  2726.                         Position = UDim2.new(0, 352, 0, 8),
  2727.                         Size = UDim2.new(0, 50, 0, 25)        
  2728.                     }, {
  2729.                         Utility:Create('UIStroke', {
  2730.                             Name = Name..'ToggleStroke',
  2731.                             ApplyStrokeMode = 'Contextual',
  2732.                             Color = Theme.UIStrokeColor,
  2733.                             LineJoinMode = 'Round',
  2734.                             Thickness = 1
  2735.                         }),
  2736.                         Utility:Create('UICorner', {
  2737.                             CornerRadius = UDim.new(0, 25),
  2738.                             Name = Name..'ToggleCorner'
  2739.                         }),
  2740.                         Utility:Create('ImageLabel', {
  2741.                             Name = Name..'ToggleCircle',
  2742.                             BackgroundColor3 = Theme.PrimaryElementColor,
  2743.                             BackgroundTransparency = 1,
  2744.                             Position = UDim2.new(0, 5, 0, 5),
  2745.                             Size = UDim2.new(0, 15, 0, 15),
  2746.                             Image = 'rbxassetid://3570695787',
  2747.                             ScaleType = Enum.ScaleType.Slice,
  2748.                             SliceCenter = Rect.new(100, 100, 100, 100),
  2749.                             SliceScale = 0.120,
  2750.                         })
  2751.                     }),
  2752.                     Utility:Create('TextButton', {
  2753.                         Name = Name..'ToggleButton',
  2754.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2755.                         BackgroundTransparency = 1,
  2756.                         BorderSizePixel = 0,
  2757.                         Position = UDim2.new(0, 0, 0, 0),
  2758.                         Size = UDim2.new(0, 410, 0, 40),
  2759.                         Font = Enum.Font.SourceSans,
  2760.                         Text = '',
  2761.                         TextColor3 = Color3.fromRGB(0, 0, 0),
  2762.                         TextSize = 14
  2763.                     }, {
  2764.                         Utility:Create('UICorner', {
  2765.                             CornerRadius = UDim.new(0, 5),
  2766.                             Name = Name..'ToggleButtonCorner'
  2767.                         })
  2768.                     })
  2769.                 })
  2770.  
  2771.                 local ToggleHolder = Section[Name..'ToggleHolder']
  2772.                 local ToggleButton = ToggleHolder[Name..'ToggleButton']
  2773.                 local Toggle = ToggleHolder[Name..'Toggle']
  2774.                 local Circle = Toggle[Name..'ToggleCircle']
  2775.  
  2776.                 UpdateSectionSize()
  2777.  
  2778.                 Config[Name] = Toggled
  2779.  
  2780.                 if not ImprovePerformance then
  2781.                     task.spawn(function()
  2782.                         while task.wait() do
  2783.                             if ChangeTheme then
  2784.                                 if not BreakAllLoops then
  2785.                                     if not Hovering then
  2786.                                         Utility:Tween(ToggleHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2787.                                     end
  2788.                                     Utility:Tween(ToggleHolder[Name..'ToggleHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2789.                                     Utility:Tween(ToggleHolder[Name..'ToggleText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2790.                                     Utility:Tween(ToggleHolder[Name..'ToggleText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  2791.                                     Utility:Tween(ToggleHolder[Name..'Toggle'][Name..'ToggleCircle'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2792.                                     Utility:Tween(ToggleHolder[Name..'Toggle'][Name..'ToggleStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  2793.                                     Utility:Tween(ToggleHolder[Name..'ToggleButton'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  2794.                                 else
  2795.                                     break
  2796.                                 end
  2797.                             end
  2798.                         end
  2799.                     end)
  2800.                 end
  2801.  
  2802.                 if not ImprovePerformance then
  2803.                     task.spawn(function()
  2804.                         while task.wait() do
  2805.                             if ChangeTheme then
  2806.                                 if not BreakAllLoops then
  2807.                                     if Toggled == true then
  2808.                                         Utility:Tween(Toggle, {BackgroundColor3 = ToggleColor}, 0.25)
  2809.                                     else
  2810.                                         Utility:Tween(ToggleHolder[Name..'Toggle'], {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2811.                                     end
  2812.                                 else
  2813.                                     break
  2814.                                 end
  2815.                             end
  2816.                         end
  2817.                     end)
  2818.                 end
  2819.  
  2820.                 if Default then
  2821.                     task.spawn(function()                    
  2822.                         pcall(Callback, Default)
  2823.                     end)
  2824.                     Utility:Tween(Toggle, {BackgroundColor3 = ToggleColor}, 0.25)
  2825.                     Utility:Tween(Circle, {Position = UDim2.new(0, 30, 0, 5)}, 0.25)
  2826.                 end
  2827.  
  2828.                 ToggleButton.MouseButton1Down:Connect(function()
  2829.                     if not Debounce then
  2830.                         Toggled = not Toggled
  2831.                         task.spawn(function()                    
  2832.                             pcall(Callback, Toggled)
  2833.                         end)
  2834.                         Debounce = true
  2835.                         if Toggled then
  2836.                             Utility:Tween(Toggle, {BackgroundColor3 = ToggleColor}, 0.25)
  2837.                             Utility:Tween(Circle, {Position = UDim2.new(0, 30, 0, 5)}, 0.25)
  2838.                         else
  2839.                             Utility:Tween(Toggle, {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2840.                             Utility:Tween(Circle, {Position = UDim2.new(0, 5, 0, 5)}, 0.25)
  2841.                         end
  2842.                         task.wait(DebounceAmount)
  2843.                         Debounce = false
  2844.                     end
  2845.                 end)
  2846.  
  2847.                 ToggleHolder.MouseEnter:Connect(function()
  2848.                     Hovering = true
  2849.                     Utility:Tween(ToggleHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  2850.                 end)
  2851.  
  2852.                 ToggleHolder.MouseLeave:Connect(function()
  2853.                     Utility:Tween(ToggleHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  2854.                     Hovering = false
  2855.                 end)
  2856.  
  2857.                 function ToggleFunctions:Set(Value)
  2858.                     Toggled = Value
  2859.                     task.spawn(function()
  2860.                         pcall(Callback, Toggled)
  2861.                     end)
  2862.                     if Toggled then
  2863.                         Utility:Tween(Toggle, {BackgroundColor3 = ToggleColor}, 0.25)
  2864.                         Utility:Tween(Circle, {Position = UDim2.new(0, 30, 0, 5)}, 0.25)
  2865.                     else
  2866.                         Utility:Tween(Toggle, {BackgroundColor3 = Theme.SecondaryElementColor}, 0.25)
  2867.                         Utility:Tween(Circle, {Position = UDim2.new(0, 5, 0, 5)}, 0.25)
  2868.                     end
  2869.                 end
  2870.                 ConfigUpdates[Name] = ToggleFunctions
  2871.                 return ToggleFunctions
  2872.             end
  2873.  
  2874.             function Elements:CreateDropdown(Name, List, Default, DebounceAmount, Callback)
  2875.                 local Name = Name or 'Dropdown'
  2876.                 local List = List or {}
  2877.                 local Callback = Callback or function() end
  2878.                 local DebounceAmount = DebounceAmount or 0.25
  2879.                 local Default = Default or nil
  2880.                 local SelectedItem = 'None'
  2881.                 local Opened = false
  2882.                 local Debounce = false
  2883.                 local DropdownFunctions = {}
  2884.                 local Hovering = false
  2885.  
  2886.                 Utility:Create('Frame', {
  2887.                     Name = Name..'DropdownHolder',
  2888.                     Parent = Section,
  2889.                     BackgroundColor3 = Theme.PrimaryElementColor,
  2890.                     Size = UDim2.new(0, 410, 0, 40)
  2891.                 }, {
  2892.                     Utility:Create('UICorner', {
  2893.                         CornerRadius = UDim.new(0, 5),
  2894.                         Name = Name..'DropdownHolderCorner'
  2895.                     }),
  2896.                     Utility:Create('UIStroke', {
  2897.                         Name = Name..'DropdownHolderStroke',
  2898.                         ApplyStrokeMode = 'Contextual',
  2899.                         Color = Theme.UIStrokeColor,
  2900.                         LineJoinMode = 'Round',
  2901.                         Thickness = 1
  2902.                     }),
  2903.                     Utility:Create('TextLabel', {
  2904.                         Name = Name..'DropdownText',
  2905.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2906.                         BackgroundTransparency = 1,
  2907.                         Position = UDim2.new(0, 0, 0, 5),
  2908.                         Size = UDim2.new(0, 200, 0, 30),
  2909.                         Font = Enum.Font.Gotham,
  2910.                         Text = Name,
  2911.                         TextColor3 = Theme.PrimaryTextColor,
  2912.                         TextSize = 16,
  2913.                         TextXAlignment = Enum.TextXAlignment.Left
  2914.                     }, {
  2915.                         Utility:Create('UIPadding', {
  2916.                             Name = Name..'DropdownTextPadding',
  2917.                             PaddingLeft = UDim.new(0, 7)
  2918.                         })
  2919.                     }),
  2920.                     Utility:Create('ImageLabel', {
  2921.                         Name = Name..'DropdownIcon',
  2922.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2923.                         BackgroundTransparency = 1,
  2924.                         BorderSizePixel = 0,
  2925.                         Position = UDim2.new(0, 377, 0, 8),
  2926.                         Rotation = 270,
  2927.                         Size = UDim2.new(0, 25, 0, 25),
  2928.                         Image = 'rbxassetid://3926305904',
  2929.                         ImageColor3 = Theme.SecondaryTextColor,
  2930.                         ImageRectOffset = Vector2.new(964, 284),
  2931.                         ImageRectSize = Vector2.new(36, 36)
  2932.                     }),
  2933.                     Utility:Create('TextLabel', {
  2934.                         Name = Name..'DropdownSelectedText',
  2935.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2936.                         BackgroundTransparency = 1,
  2937.                         Position = UDim2.new(0, 199, 0, 8),
  2938.                         Size = UDim2.new(0, 176, 0, 25),
  2939.                         Font = Enum.Font.Gotham,
  2940.                         Text = SelectedItem,
  2941.                         TextColor3 = Theme.SecondaryTextColor,
  2942.                         TextSize = 14,
  2943.                         TextXAlignment = Enum.TextXAlignment.Right
  2944.                     }, {
  2945.                         Utility:Create('UICorner', {
  2946.                             CornerRadius = UDim.new(0, 5),
  2947.                             Name = Name..'DropdownSelectedTextCorner'
  2948.                         }),
  2949.                         Utility:Create('UIPadding', {
  2950.                             Name = Name..'DropdownSelectedTextPadding',
  2951.                             PaddingRight = UDim.new(0, 7)
  2952.                         })
  2953.                     }),
  2954.                     Utility:Create('ScrollingFrame', {
  2955.                         Name = Name..'DropList',
  2956.                         Active = true,
  2957.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2958.                         BorderSizePixel = 0,
  2959.                         Position = UDim2.new(0, 0, 1, 0),
  2960.                         Size = UDim2.new(0, 410, 0, 30),
  2961.                         Visible = false,
  2962.                         ScrollBarImageColor3 = Theme.ScrollBarColor,
  2963.                         ScrollBarThickness = 3
  2964.                     }, {
  2965.                         Utility:Create('UIStroke', {
  2966.                             Name = Name..'DropListStroke',
  2967.                             ApplyStrokeMode = 'Contextual',
  2968.                             Color = Theme.UIStrokeColor,
  2969.                             LineJoinMode = 'Round',
  2970.                             Thickness = 1
  2971.                         }),
  2972.                         Utility:Create('UIListLayout', {
  2973.                             Name = Name..'DropListLayout',
  2974.                             SortOrder = Enum.SortOrder.LayoutOrder
  2975.                         }),
  2976.                         Utility:Create('UICorner', {
  2977.                             CornerRadius = UDim.new(0, 5),
  2978.                             Name = Name..'DropdownListCorner'
  2979.                         })
  2980.                     }),
  2981.                     Utility:Create('TextButton', {
  2982.                         Name = Name..'DropdownButton',
  2983.                         BackgroundColor3 = Theme.PrimaryElementColor,
  2984.                         BackgroundTransparency = 1,
  2985.                         BorderSizePixel = 0,
  2986.                         Position = UDim2.new(0, 0, 0, 0),
  2987.                         Size = UDim2.new(0, 410, 0, 40),
  2988.                         Font = Enum.Font.SourceSans,
  2989.                         Text = '',
  2990.                         TextColor3 = Color3.fromRGB(0, 0, 0),
  2991.                         TextSize = 14
  2992.                     }, {
  2993.                         Utility:Create('UICorner', {
  2994.                             CornerRadius = UDim.new(0, 5),
  2995.                             Name = Name..'DropdownButtonCorner'
  2996.                         })
  2997.                     })
  2998.                 })
  2999.                 Utility:Create('Frame', {
  3000.                     Name = Name..'DropdownFiller',
  3001.                     Parent = Section,
  3002.                     Visible = false,
  3003.                     BackgroundTransparency = 1,
  3004.                     Size = UDim2.new(0, 410, 0, 0)
  3005.                 })
  3006.  
  3007.                 local DropdownHolder = Section[Name..'DropdownHolder']
  3008.                 local DropList = DropdownHolder[Name..'DropList']
  3009.                 local DropdownButton = DropdownHolder[Name..'DropdownButton']
  3010.                 local DropdownIcon = DropdownHolder[Name..'DropdownIcon']
  3011.                 local DropdownSelectedText = DropdownHolder[Name..'DropdownSelectedText']
  3012.                 local DropListLayout = DropList[Name..'DropListLayout']
  3013.                 local DropdownFiller = Section[Name..'DropdownFiller']
  3014.  
  3015.                 UpdateSectionSize()
  3016.  
  3017.                 Config[Name] = Default
  3018.  
  3019.                 if not ImprovePerformance then
  3020.                     task.spawn(function()
  3021.                         while task.wait() do
  3022.                             if ChangeTheme then
  3023.                                 if not BreakAllLoops then
  3024.                                     if not Hovering then
  3025.                                         Utility:Tween(DropdownHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3026.                                     end
  3027.                                     Utility:Tween(DropdownHolder[Name..'DropdownHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3028.                                     Utility:Tween(DropdownHolder[Name..'DropdownText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3029.                                     Utility:Tween(DropdownHolder[Name..'DropdownText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  3030.                                     Utility:Tween(DropdownIcon, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3031.                                     Utility:Tween(DropdownIcon, {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  3032.                                     Utility:Tween(DropdownSelectedText, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3033.                                     Utility:Tween(DropdownSelectedText, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  3034.                                     Utility:Tween(DropList, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3035.                                     Utility:Tween(DropList, {ScrollBarImageColor3 = Theme.ScrollBarColor}, 0.25)
  3036.                                     Utility:Tween(DropList[Name..'DropListStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3037.                                     Utility:Tween(DropdownButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3038.                                 else
  3039.                                     break
  3040.                                 end
  3041.                             end
  3042.                         end
  3043.                     end)
  3044.                 end
  3045.  
  3046.                 DropdownButton.MouseButton1Click:Connect(function()
  3047.                     task.wait(0.25)
  3048.                     if not Debounce then
  3049.                         if Opened then
  3050.                             Opened = false
  3051.                             Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3052.                             Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3053.                             Utility:Tween(DropdownIcon, {Rotation = 270}, 0.25)
  3054.                             if #List <= 5 then
  3055.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3056.                                 Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3057.                             else
  3058.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 150)}, 0.25)
  3059.                                 Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 150)}, 0.25)
  3060.                             end
  3061.                             Debounce = true
  3062.                             task.wait(DebounceAmount)
  3063.                             Debounce = false
  3064.                             DropList.Visible = false
  3065.                             DropdownFiller.Visible = false
  3066.                            
  3067.                         else
  3068.                             Opened = true
  3069.                             DropdownFiller.Visible = true
  3070.                             DropList.Visible = true
  3071.                             if #List <= 5 then
  3072.                                 Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3073.                                 Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, DropListLayout.AbsoluteContentSize.Y - 6)}, 0.25)
  3074.                                 Utility:Tween(DropList, {CanvasSize = UDim2.new(0, 400, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3075.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3076.                                 Utility:Tween(Section, {Size = Section.Size + UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3077.                             else
  3078.                                 Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 150)}, 0.25)
  3079.                                 Utility:Tween(DropList, {CanvasSize = UDim2.new(0, 400, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3080.                                 Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 144)}, 0.25)
  3081.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, 150)}, 0.25)
  3082.                                 Utility:Tween(Section, {Size = Section.Size + UDim2.new(0, 0, 0, 150)}, 0.25)
  3083.                             end
  3084.                             Utility:Tween(DropdownIcon, {Rotation = 90}, 0.25)
  3085.                             Debounce = true
  3086.                             task.wait(DebounceAmount)
  3087.                             Debounce = false
  3088.                         end
  3089.                     end
  3090.                 end)
  3091.  
  3092.                 for _, Item in next, List do
  3093.                     Utility:Create('TextButton', {
  3094.                         Name = Item..'OptionButton',
  3095.                         Parent = DropList,
  3096.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3097.                         BorderSizePixel = 0,
  3098.                         Size = UDim2.new(0, 410, 0, 30),
  3099.                         Font = Enum.Font.SourceSans,
  3100.                         TextColor3 = Theme.SecondaryTextColor,
  3101.                         TextSize = 16,
  3102.                         AutoButtonColor = false,
  3103.                         Text = Item,
  3104.                         TextXAlignment = Enum.TextXAlignment.Left
  3105.                     }, {
  3106.                         Utility:Create('UIPadding', {
  3107.                             Name = Item..'OptionButtonPadding',
  3108.                             PaddingLeft = UDim.new(0, 7)
  3109.                         }),
  3110.                         Utility:Create('UICorner', {
  3111.                             CornerRadius = UDim.new(0, 5),
  3112.                             Name = Item..'OptionButtonCorner'
  3113.                         })
  3114.                     })
  3115.  
  3116.                     local OptionButton = DropList[Item..'OptionButton']
  3117.  
  3118.                     if not ImprovePerformance then
  3119.                         task.spawn(function()
  3120.                             while task.wait() do
  3121.                                 if ChangeTheme then
  3122.                                     if not BreakAllLoops then
  3123.                                         if not Hovering then
  3124.                                             Utility:Tween(OptionButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3125.                                         end
  3126.                                         Utility:Tween(OptionButton, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  3127.                                     else
  3128.                                         break
  3129.                                     end
  3130.                                 end
  3131.                             end
  3132.                         end)
  3133.                     end
  3134.  
  3135.                     OptionButton.MouseEnter:Connect(function()
  3136.                         Hovering = true
  3137.                         Utility:Tween(OptionButton, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  3138.                     end)
  3139.    
  3140.                     OptionButton.MouseLeave:Connect(function()
  3141.                         Utility:Tween(OptionButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  3142.                         Hovering = false
  3143.                     end)
  3144.  
  3145.                     OptionButton.MouseButton1Click:Connect(function()
  3146.                         for _, Button in next, DropList:GetChildren() do
  3147.                             if Button:IsA('TextButton') then
  3148.                                 Utility:Tween(Button, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3149.                             end
  3150.                         end
  3151.                         Utility:Tween(OptionButton, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  3152.                         DropdownSelectedText.Text = Item
  3153.                         Callback(Item)
  3154.                         Config[Name] = Item
  3155.                         Opened = false
  3156.                         if #List <= 5 then
  3157.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3158.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3159.                         else
  3160.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 150)}, 0.25)
  3161.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 150)}, 0.25)
  3162.                         end
  3163.                         Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3164.                         Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3165.                         Utility:Tween(DropdownIcon, {Rotation = 270}, 0.25)
  3166.                         task.wait(0.25)
  3167.                         DropList.Visible = false
  3168.                         DropdownFiller.Visible = false
  3169.                     end)
  3170.                 end
  3171.  
  3172.                 if Default ~= nil then
  3173.                     local Option = DropList[Default..'OptionButton']
  3174.                     Utility:Tween(Option, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  3175.                     DropdownSelectedText.Text = Default
  3176.                     Callback(Default)
  3177.                 end
  3178.  
  3179.                 DropdownHolder.MouseEnter:Connect(function()
  3180.                     Hovering = true
  3181.                     Utility:Tween(DropdownHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  3182.                 end)
  3183.  
  3184.                 DropdownHolder.MouseLeave:Connect(function()
  3185.                     Utility:Tween(DropdownHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  3186.                     Hovering = false
  3187.                 end)
  3188.  
  3189.                 function DropdownFunctions:Set(Value)
  3190.                     SelectedItem = tostring(Value)
  3191.                     DropdownSelectedText = tostring(Value)
  3192.                     Callback(Value)
  3193.                 end
  3194.                 ConfigUpdates[Name] = DropdownFunctions
  3195.  
  3196.                 function DropdownFunctions:UpdateDropdown(NewList)
  3197.                     task.wait(0.25)
  3198.                     local NewList = NewList or {}
  3199.                     if Opened then
  3200.                         Opened = false
  3201.                         Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3202.                         Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3203.                         Utility:Tween(DropdownIcon, {Rotation = 270}, 0.25)
  3204.                         if #List <= 5 then
  3205.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3206.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3207.                         else
  3208.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 150)}, 0.25)
  3209.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 150)}, 0.25)
  3210.                         end
  3211.                         DropList.Visible = false
  3212.                         DropdownFiller.Visible = false
  3213.                     end
  3214.                     task.wait(0.25)
  3215.                     for _, Item in next, DropList:GetChildren() do
  3216.                         if Item:IsA('TextButton') then
  3217.                             Item:Destroy()
  3218.                         end
  3219.                     end
  3220.                     List = NewList
  3221.  
  3222.                     if Opened then
  3223.                         Opened = false
  3224.                         Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3225.                         Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3226.                         Utility:Tween(DropdownIcon, {Rotation = 270}, 0.25)
  3227.                         if #List <= 5 then
  3228.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y + 150)}, 0.25)
  3229.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y + 150)}, 0.25)
  3230.                         else
  3231.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 90)}, 0.25)
  3232.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 90)}, 0.25)
  3233.                         end
  3234.                         Debounce = true
  3235.                         task.wait(DebounceAmount)
  3236.                         Debounce = false
  3237.                         DropList.Visible = false
  3238.                         DropdownFiller.Visible = false
  3239.                     end
  3240.  
  3241.                     for _, Item in next, NewList do
  3242.                         Utility:Create('TextButton', {
  3243.                             Name = Item..'OptionButton',
  3244.                             Parent = DropList,
  3245.                             BackgroundColor3 = Theme.PrimaryElementColor,
  3246.                             BorderSizePixel = 0,
  3247.                             Size = UDim2.new(0, 410, 0, 30),
  3248.                             Font = Enum.Font.SourceSans,
  3249.                             TextColor3 = Theme.SecondaryTextColor,
  3250.                             TextSize = 16,
  3251.                             AutoButtonColor = false,
  3252.                             Text = Item,
  3253.                             TextXAlignment = Enum.TextXAlignment.Left
  3254.                         }, {
  3255.                             Utility:Create('UIPadding', {
  3256.                                 Name = Item..'OptionButtonPadding',
  3257.                                 PaddingLeft = UDim.new(0, 7)
  3258.                             }),
  3259.                             Utility:Create('UICorner', {
  3260.                                 CornerRadius = UDim.new(0, 5),
  3261.                                 Name = Item..'OptionButtonCorner'
  3262.                             })
  3263.                         })
  3264.  
  3265.                         UpdateSectionSize()
  3266.  
  3267.                         if #List == 0 then
  3268.                             DropdownSelectedText.Text = 'None'
  3269.                             SelectedItem = 'None'
  3270.                         end
  3271.    
  3272.                         local OptionButton = DropList[Item..'OptionButton']
  3273.  
  3274.                         if not ImprovePerformance then
  3275.                             task.spawn(function()
  3276.                                 while task.wait() do
  3277.                                     if ChangeTheme then
  3278.                                         if not BreakAllLoops then
  3279.                                             if not Hovering then
  3280.                                                 Utility:Tween(OptionButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3281.                                             end
  3282.                                             Utility:Tween(OptionButton, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  3283.                                         else
  3284.                                             break
  3285.                                         end
  3286.                                     end
  3287.                                 end
  3288.                             end)
  3289.                         end
  3290.  
  3291.                         OptionButton.MouseEnter:Connect(function()
  3292.                             Hovering = true
  3293.                             Utility:Tween(OptionButton, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  3294.                         end)
  3295.        
  3296.                         OptionButton.MouseLeave:Connect(function()
  3297.                             Utility:Tween(OptionButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  3298.                             Hovering = false
  3299.                         end)
  3300.    
  3301.                         OptionButton.MouseButton1Click:Connect(function()
  3302.                             for _, Button in next, DropList:GetChildren() do
  3303.                                 if Button:IsA('TextButton') then
  3304.                                     Utility:Tween(Button, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3305.                                 end
  3306.                             end
  3307.                             Utility:Tween(OptionButton, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.25)
  3308.                             DropdownSelectedText.Text = tostring(Item)
  3309.                             Callback(Item)
  3310.                             Config[Name] = Item
  3311.                             task.wait(0.5)
  3312.                             Opened = false
  3313.                             if #NewList <= 5 then
  3314.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3315.                                 Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, DropListLayout.AbsoluteContentSize.Y)}, 0.25)
  3316.                             else
  3317.                                 Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 150)}, 0.25)
  3318.                                 Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 150)}, 0.25)
  3319.                             end
  3320.                             Utility:Tween(DropdownFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3321.                             Utility:Tween(DropList, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3322.                             Utility:Tween(DropdownIcon, {Rotation = 270}, 0.25)
  3323.                             task.wait(0.25)
  3324.                             DropList.Visible = false
  3325.                             DropdownFiller.Visible = false
  3326.                         end)
  3327.                     end
  3328.                 end
  3329.                 return DropdownFunctions
  3330.             end
  3331.  
  3332.             function Elements:CreateColorpicker(Name, DefaultColor, DebounceAmount, Callback, ...)
  3333.                 local Name = Name or 'Colorpicker'
  3334.                 local xArgs = ...
  3335.                 local Args = xArgs or {}
  3336.                 local Callback = Callback or function() end
  3337.                 local DebounceAmount = DebounceAmount or 0.25
  3338.                 local DefaultColor = DefaultColor or Color3.fromRGB(0, 125, 255)
  3339.                 local Debounce = false
  3340.                 local Opened = false
  3341.                 local H, S, V = Color3.toHSV(DefaultColor)
  3342.                 local ColorpickerFunctions = {}
  3343.                 local Hovering = false
  3344.  
  3345.                 Utility:Create('Frame', {
  3346.                     Name = Name..'ColorpickerHolder',
  3347.                     Parent = Section,
  3348.                     BackgroundColor3 = Theme.PrimaryElementColor,
  3349.                     Size = UDim2.new(0, 410, 0, 40)
  3350.                 }, {
  3351.                     Utility:Create('UICorner', {
  3352.                         CornerRadius = UDim.new(0, 5),
  3353.                         Name = Name..'ColorpickerHolderCorner'
  3354.                     }),
  3355.                     Utility:Create('UIStroke', {
  3356.                         Name = Name..'ColorpickerHolderStroke',
  3357.                         ApplyStrokeMode = 'Contextual',
  3358.                         Color = Theme.UIStrokeColor,
  3359.                         LineJoinMode = 'Round',
  3360.                         Thickness = 1
  3361.                     }),
  3362.                     Utility:Create('TextLabel', {
  3363.                         Name = Name..'ColorpickerText',
  3364.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3365.                         BackgroundTransparency = 1,
  3366.                         Position = UDim2.new(0, 0, 0, 5),
  3367.                         Size = UDim2.new(0, 200, 0, 30),
  3368.                         Font = Enum.Font.Gotham,
  3369.                         Text = Name,
  3370.                         TextColor3 = Theme.PrimaryTextColor,
  3371.                         TextSize = 16,
  3372.                         TextXAlignment = Enum.TextXAlignment.Left,
  3373.                     }, {
  3374.                         Utility:Create('UIPadding', {
  3375.                             Name = Name..'ColorpickerTextPadding',
  3376.                             PaddingLeft = UDim.new(0, 7)
  3377.                         })
  3378.                     }),
  3379.                     Utility:Create('TextButton', {
  3380.                         Name = Name..'ColorpickerButton',
  3381.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3382.                         BackgroundTransparency = 1,
  3383.                         Size = UDim2.new(0, 410, 0, 40),
  3384.                         ZIndex = 2,
  3385.                         Font = Enum.Font.Gotham,
  3386.                         Text = '',
  3387.                         TextColor3 = Theme.SecondaryTextColor,
  3388.                         TextSize = 14
  3389.                     }, {
  3390.                         Utility:Create('UICorner', {
  3391.                             CornerRadius = UDim.new(0, 5),
  3392.                             Name = Name..'ColorpickerButtonCorner'
  3393.                         })
  3394.                     }),
  3395.                     Utility:Create('Frame', {
  3396.                         Name = Name..'ColorpickerDropdown',
  3397.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3398.                         BorderSizePixel = 0,
  3399.                         Position = UDim2.new(0, 0, 0, 40),
  3400.                         Size = UDim2.new(0, 410, 0, 114),
  3401.                         Visible = false
  3402.                     }, {
  3403.                         Utility:Create('UICorner', {
  3404.                             CornerRadius = UDim.new(0, 5),
  3405.                             Name = Name..'ColorpickerDropdownCorner'
  3406.                         }),
  3407.                         Utility:Create('UIStroke', {
  3408.                             Name = Name..'ColorpickerDropdownStroke',
  3409.                             ApplyStrokeMode = 'Contextual',
  3410.                             Color = Theme.UIStrokeColor,
  3411.                             LineJoinMode = 'Round',
  3412.                             Thickness = 1
  3413.                         }),
  3414.                         Utility:Create('ImageButton', {
  3415.                             Name = Name..'RGBPicker',
  3416.                             BackgroundColor3 = Theme.PrimaryElementColor,
  3417.                             Position = UDim2.new(0, 38, 0, 7),
  3418.                             Size = UDim2.new(0, 300, 0, 100),
  3419.                             Image = 'rbxassetid://6523286724'
  3420.                         }, {
  3421.                             Utility:Create('UICorner', {
  3422.                                 CornerRadius = UDim.new(0, 5),
  3423.                                 Name = Name..'RGBPickerCorner'
  3424.                             }),
  3425.                             Utility:Create('ImageLabel', {
  3426.                                 Name = Name..'RGBPickerCircle',
  3427.                                 BackgroundColor3 = Color3.fromRGB(0, 0, 0),
  3428.                                 BackgroundTransparency = 1,
  3429.                                 Position = UDim2.new(0, 293, 0, -7),
  3430.                                 Size = UDim2.new(0, 14, 0, 14),
  3431.                                 Image = 'rbxassetid://3926309567',
  3432.                                 ImageColor3 = Color3.fromRGB(0, 0, 0),
  3433.                                 ImageRectOffset = Vector2.new(628, 420),
  3434.                                 ImageRectSize = Vector2.new(48, 48)
  3435.                             }),
  3436.                             Utility:Create('UIStroke', {
  3437.                                 Name = Name..'RGBPickerStroke',
  3438.                                 ApplyStrokeMode = 'Contextual',
  3439.                                 Color = Theme.UIStrokeColor,
  3440.                                 LineJoinMode = 'Round',
  3441.                                 Thickness = 1
  3442.                             }),
  3443.                         }),
  3444.                         Utility:Create('ImageButton', {
  3445.                             Name = Name..'DarknessPicker',
  3446.                             BackgroundColor3 = Theme.PrimaryElementColor,
  3447.                             Position = UDim2.new(0, 346, 0, 7),
  3448.                             Size = UDim2.new(0, 25, 0, 100),
  3449.                             Image = 'rbxassetid://6523291212'
  3450.                         }, {
  3451.                             Utility:Create('UICorner', {
  3452.                                 CornerRadius = UDim.new(0, 5),
  3453.                                 Name = Name..'DarknessPickerCorner'
  3454.                             }),
  3455.                             Utility:Create('ImageLabel', {
  3456.                                 Name = Name..'DarknessPickerCircle',
  3457.                                 BackgroundColor3 = Color3.fromRGB(0, 0, 0),
  3458.                                 BackgroundTransparency = 1,
  3459.                                 AnchorPoint = Vector2.new(0.5, 0),
  3460.                                 Position = UDim2.new(0.5, 0, 0, -6),
  3461.                                 Size = UDim2.new(0, 14, 0, 14),
  3462.                                 Image = 'rbxassetid://3926309567',
  3463.                                 ImageColor3 = Color3.fromRGB(0, 0, 0),
  3464.                                 ImageRectOffset = Vector2.new(628, 420),
  3465.                                 ImageRectSize = Vector2.new(48, 48)
  3466.                             }),
  3467.                             Utility:Create('UIStroke', {
  3468.                                 Name = Name..'DarknessPickerStroke',
  3469.                                 ApplyStrokeMode = 'Contextual',
  3470.                                 Color = Theme.UIStrokeColor,
  3471.                                 LineJoinMode = 'Round',
  3472.                                 Thickness = 1
  3473.                             }),
  3474.                         })
  3475.                     }),
  3476.                     Utility:Create('Frame', {
  3477.                         Name = Name..'ColorpickerPreview',
  3478.                         Position = UDim2.new(0, 377, 0, 8),
  3479.                         Size = UDim2.new(0, 25, 0, 25)
  3480.                     }, {
  3481.                         Utility:Create('UICorner', {
  3482.                             CornerRadius = UDim.new(0, 5),
  3483.                             Name = Name..'ColorpickerPreviewCorner'
  3484.                         })
  3485.                     })
  3486.                 })
  3487.                 Utility:Create('Frame', {
  3488.                     Name = Name..'ColorpickerFiller',
  3489.                     Parent = Section,
  3490.                     Visible = false,
  3491.                     BackgroundTransparency = 1,
  3492.                     Size = UDim2.new(0, 410, 0, 0)
  3493.                 })
  3494.  
  3495.                 local ColorpickerHolder = Section[Name..'ColorpickerHolder']
  3496.                 local ColorpickerButton = ColorpickerHolder[Name..'ColorpickerButton']
  3497.                 local ColorpickerDropdown = ColorpickerHolder[Name..'ColorpickerDropdown']
  3498.                 local RGBPicker = ColorpickerDropdown[Name..'RGBPicker']
  3499.                 local RGBPickerCircle = RGBPicker[Name..'RGBPickerCircle']
  3500.                 local DarknessPicker = ColorpickerDropdown[Name..'DarknessPicker']
  3501.                 local DarknessPickerCircle = DarknessPicker[Name..'DarknessPickerCircle']
  3502.                 local ColorpickerPreview = ColorpickerHolder[Name..'ColorpickerPreview']
  3503.                 local ColorpickerFiller = Section[Name..'ColorpickerFiller']
  3504.                
  3505.                 UpdateSectionSize()
  3506.  
  3507.                 if not Args[1] == true then
  3508.                     Config[Name] = Utility:SplitColor(DefaultColor)
  3509.                 end
  3510.  
  3511.                 if not ImprovePerformance then
  3512.                     task.spawn(function()
  3513.                         while task.wait() do
  3514.                             if ChangeTheme then
  3515.                                 if not BreakAllLoops then
  3516.                                     if not Hovering then
  3517.                                         Utility:Tween(ColorpickerHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3518.                                     end
  3519.                                     Utility:Tween(ColorpickerHolder[Name..'ColorpickerHolderStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3520.                                     Utility:Tween(ColorpickerHolder[Name..'ColorpickerText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3521.                                     Utility:Tween(ColorpickerHolder[Name..'ColorpickerText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  3522.                                     Utility:Tween(ColorpickerButton, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3523.                                     Utility:Tween(ColorpickerButton, {TextColor3 = Theme.SecondaryTextColor}, 0.25)
  3524.                                     Utility:Tween(ColorpickerDropdown, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3525.                                     Utility:Tween(ColorpickerDropdown[Name..'ColorpickerDropdownStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3526.                                     Utility:Tween(RGBPicker, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3527.                                     Utility:Tween(RGBPicker[Name..'RGBPickerStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3528.                                     Utility:Tween(DarknessPicker, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3529.                                     Utility:Tween(DarknessPicker[Name..'DarknessPickerStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3530.                                 else
  3531.                                     break
  3532.                                 end
  3533.                             end
  3534.                         end
  3535.                     end)
  3536.                 end
  3537.  
  3538.                 if DefaultColor ~= nil then
  3539.                     Color = {H, S, V}
  3540.                     local FinalColor = Color3.fromHSV(Color[1], Color[2], Color[3])
  3541.                     ColorpickerPreview.BackgroundColor3 = FinalColor
  3542.                     Callback(FinalColor)
  3543.                 end
  3544.  
  3545.                 ColorpickerButton.MouseButton1Click:Connect(function()
  3546.                     if not Debounce then
  3547.                         if Opened then
  3548.                             Opened = false
  3549.                             Utility:Tween(ColorpickerFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3550.                             Utility:Tween(RGBPicker, {Size = UDim2.new(0, 300, 0, 0)}, 0.25)
  3551.                             Utility:Tween(DarknessPicker, {Size = UDim2.new(0, 25, 0, 0)}, 0.25)
  3552.                             Utility:Tween(ColorpickerDropdown, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3553.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 0, 0, 114)}, 0.25)
  3554.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 0, 0, 114)}, 0.25)
  3555.                             UpdateSectionSize()
  3556.                             Debounce = true
  3557.                             task.wait(DebounceAmount)
  3558.                             Debounce = false
  3559.                             ColorpickerDropdown.Visible = false
  3560.                             ColorpickerFiller.Visible = false
  3561.                         else
  3562.                             Opened = true
  3563.                             ColorpickerFiller.Visible = true
  3564.                             ColorpickerDropdown.Visible = true
  3565.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, 114)}, 0.25)
  3566.                             Utility:Tween(Section, {Size = Section.Size + UDim2.new(0, 0, 0, 114)}, 0.25)
  3567.                             Utility:Tween(ColorpickerDropdown, {Size = UDim2.new(0, 410, 0, 114)}, 0.25)
  3568.                             Utility:Tween(RGBPicker, {Size = UDim2.new(0, 300, 0, 100)}, 0.25)
  3569.                             Utility:Tween(DarknessPicker, {Size = UDim2.new(0, 25, 0, 100)}, 0.25)
  3570.                             Utility:Tween(ColorpickerFiller, {Size = UDim2.new(0, 410, 0, 110)}, 0.25)
  3571.                             UpdateSectionSize()
  3572.                             Debounce = true
  3573.                             task.wait(DebounceAmount)
  3574.                             Debounce = false
  3575.                         end
  3576.                     end
  3577.                 end)
  3578.  
  3579.                 ColorpickerHolder.MouseEnter:Connect(function()
  3580.                     Hovering = true
  3581.                     Utility:Tween(ColorpickerHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  3582.                 end)
  3583.  
  3584.                 ColorpickerHolder.MouseLeave:Connect(function()
  3585.                     Utility:Tween(ColorpickerHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  3586.                     Hovering = false
  3587.                 end)
  3588.  
  3589.                 local Mouse = Players.LocalPlayer:GetMouse()
  3590.                 local Color = {1, 1, 1}
  3591.                 local RGBPicked = false
  3592.                 local DarknessPicked = false
  3593.  
  3594.                 -- // Based off xHeptc's functions | https://v3rmillion.net/member.php?action=profile&uid=1347047
  3595.                    
  3596.                 Mouse.Move:Connect(function()
  3597.                     if RGBPicked then
  3598.                         local MouseXPosition = Mouse.X - RGBPicker.AbsolutePosition.X
  3599.                         local MouseYPosition = Mouse.Y - RGBPicker.AbsolutePosition.Y
  3600.  
  3601.                         local CircleXSize = RGBPickerCircle.AbsoluteSize.X / 2
  3602.                         local CircleYSize = RGBPickerCircle.AbsoluteSize.Y / 2
  3603.  
  3604.                         local MaximumXPosition = RGBPicker.AbsoluteSize.X
  3605.                         local MaximumYPosition = RGBPicker.AbsoluteSize.Y
  3606.  
  3607.                         if MouseXPosition < 0 then MouseXPosition = 0 end
  3608.                         if MouseYPosition < 0 then MouseYPosition = 0 end
  3609.  
  3610.                         if MouseXPosition > MaximumXPosition then MouseXPosition = MaximumXPosition end
  3611.                         if MouseYPosition > MaximumYPosition then MouseYPosition = MaximumYPosition end
  3612.  
  3613.                         MouseXPosition = MouseXPosition / MaximumXPosition
  3614.                         MouseYPosition = MouseYPosition / MaximumYPosition
  3615.  
  3616.                         RGBPickerCircle.Position = UDim2.new(MouseXPosition, -CircleXSize, MouseYPosition, -CircleYSize)
  3617.  
  3618.                         Color = {1 - MouseXPosition, 1 - tostring(MouseYPosition), Color[3]}
  3619.  
  3620.                         local HSVColor = Color3.fromHSV(Color[1], Color[2], Color[3])
  3621.  
  3622.                         ColorpickerPreview.BackgroundColor3 = HSVColor
  3623.  
  3624.                         Callback(HSVColor)
  3625.  
  3626.                         if not Args[1] == true then
  3627.                             Config[Name] = Utility:SplitColor(HSVColor)
  3628.                         end
  3629.  
  3630.                     elseif DarknessPicked then
  3631.                         local MouseYPosition = Mouse.Y - DarknessPicker.AbsolutePosition.Y
  3632.  
  3633.                         local CircleYSize = DarknessPickerCircle.AbsoluteSize.Y / 2
  3634.  
  3635.                         local MaximumYPosition = DarknessPicker.AbsoluteSize.Y
  3636.  
  3637.                         if MouseYPosition < 0 then MouseYPosition = 0 end
  3638.                         if MouseYPosition > MaximumYPosition then MouseYPosition = MaximumYPosition end
  3639.  
  3640.                         MouseYPosition = MouseYPosition / MaximumYPosition
  3641.  
  3642.                         DarknessPickerCircle.Position = UDim2.new(0.5, 0, MouseYPosition, -CircleYSize)
  3643.  
  3644.                         DarknessPickerCircle.ImageColor3 = Color3.fromHSV(0, 0, MouseYPosition)
  3645.  
  3646.                         Color = {Color[1], Color[2], 1 - MouseYPosition}
  3647.  
  3648.                         local HSVColor = Color3.fromHSV(Color[1], Color[2], Color[3])
  3649.  
  3650.                         ColorpickerPreview.BackgroundColor3 = HSVColor
  3651.  
  3652.                         Callback(HSVColor)
  3653.  
  3654.                         if not Args[1] == true then
  3655.                             Config[Name] = Utility:SplitColor(HSVColor)
  3656.                         end
  3657.                     end
  3658.                 end)
  3659.  
  3660.                 UserInputService.InputEnded:Connect(function(Input)
  3661.                     if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  3662.                         if DarknessPicked then
  3663.                             DarknessPicked = false
  3664.                         elseif RGBPicked then
  3665.                             RGBPicked = false
  3666.                         end
  3667.                     end
  3668.                 end)
  3669.                 -- // End
  3670.  
  3671.                 RGBPicker.MouseButton1Down:Connect(function()
  3672.                     RGBPicked = true
  3673.                 end)
  3674.  
  3675.                 DarknessPicker.MouseButton1Down:Connect(function()
  3676.                     DarknessPicked = true
  3677.                 end)
  3678.                
  3679.                 function ColorpickerFunctions:Set(Value)
  3680.                     Color = Color3.fromRGB(Value.R, Value.G, Value.B)
  3681.                     ColorpickerPreview.BackgroundColor3 = Color
  3682.                     Callback(Color)
  3683.                 end
  3684.                 ConfigUpdates[Name] = ColorpickerFunctions
  3685.                 return ColorpickerFunctions
  3686.             end
  3687.  
  3688.             function Elements:CreateImage(Name, URL, ImageSize)
  3689.                 local Name = Name or 'Image'
  3690.                 local URL = URL or 'rbxassetid://10579405264'
  3691.                 local ImageSize = ImageSize or UDim2.new(0, 100, 0, 100)
  3692.                 local ImageFunctions = {}
  3693.                 local Debounce = false
  3694.                 local DebounceAmount = 0.25
  3695.                 local Opened = false
  3696.                 local Debounce2 = false
  3697.                 local Debounce2Amount = 0.5
  3698.                 local Hovering = false
  3699.  
  3700.                 Utility:Create('Frame', {
  3701.                     Name = Name..'ImageHolder',
  3702.                     Parent = Section,
  3703.                     BackgroundColor3 = Theme.PrimaryElementColor,
  3704.                     Size = UDim2.new(0, 410, 0, 40)
  3705.                 }, {
  3706.                     Utility:Create('UICorner', {
  3707.                         CornerRadius = UDim.new(0, 5),
  3708.                         Name = Name..'ImageHolderCorner'
  3709.                     }),
  3710.                     Utility:Create('UIStroke', {
  3711.                         Name = Name..'ImageStroke',
  3712.                         ApplyStrokeMode = 'Contextual',
  3713.                         Color = Theme.UIStrokeColor,
  3714.                         LineJoinMode = 'Round',
  3715.                         Thickness = 1
  3716.                     }),
  3717.                     Utility:Create('TextLabel', {
  3718.                         Name = Name..'ImageText',
  3719.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3720.                         BackgroundTransparency = 1,
  3721.                         Position = UDim2.new(0, 0, 0, 5),
  3722.                         Size = UDim2.new(0, 200, 0, 30),
  3723.                         Font = Enum.Font.Gotham,
  3724.                         Text = Name,
  3725.                         TextColor3 = Theme.PrimaryTextColor,
  3726.                         TextSize = 16,
  3727.                         TextXAlignment = Enum.TextXAlignment.Left
  3728.                     }, {
  3729.                         Utility:Create('UIPadding', {
  3730.                             Name = Name..'ImageTextPadding',
  3731.                             PaddingLeft = UDim.new(0, 7)
  3732.                         })
  3733.                     }),
  3734.                     Utility:Create('ImageLabel', {
  3735.                         Name = Name..'ImageIcon',
  3736.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3737.                         BackgroundTransparency = 1,
  3738.                         BorderSizePixel = 0,
  3739.                         Position = UDim2.new(0, 377, 0, 8),
  3740.                         Size = UDim2.new(0, 25, 0, 25),
  3741.                         Image = 'rbxassetid://3926305904',
  3742.                         ImageColor3 = Theme.SecondaryTextColor,
  3743.                         ImageRectOffset = Vector2.new(764, 124),
  3744.                         ImageRectSize = Vector2.new(36, 36)
  3745.                     }),
  3746.                     Utility:Create('ScrollingFrame', {
  3747.                         Name = Name..'ImageDropdown',
  3748.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3749.                         BorderSizePixel = 0,
  3750.                         Position = UDim2.new(0, 0, 1, 0),
  3751.                         Size = UDim2.new(0, 410, 0, 30),
  3752.                         ClipsDescendants = true,
  3753.                         Visible = false,
  3754.                         ScrollBarImageColor3 = Theme.ScrollBarColor,
  3755.                         ScrollBarThickness = 3,
  3756.                         Active = true
  3757.                     }, {
  3758.                         Utility:Create('UIStroke', {
  3759.                             Name = Name..'ImageDropdownStroke',
  3760.                             ApplyStrokeMode = 'Contextual',
  3761.                             Color = Theme.UIStrokeColor,
  3762.                             LineJoinMode = 'Round',
  3763.                             Thickness = 1
  3764.                         }),
  3765.                         Utility:Create('UIListLayout', {
  3766.                             Name = Name..'ImageDropdownListLayout',
  3767.                             SortOrder = Enum.SortOrder.LayoutOrder,
  3768.                             HorizontalAlignment = 'Center',
  3769.                             VerticalAlignment = 'Center'
  3770.                         }),
  3771.                         Utility:Create('ImageLabel', {
  3772.                             Name = Name..'Image',
  3773.                             BackgroundColor3 = Theme.PrimaryElementColor,
  3774.                             BackgroundTransparency = 1,
  3775.                             BorderSizePixel = 0,
  3776.                             Image = URL,
  3777.                             ScaleType = 'Fit'
  3778.                         })
  3779.                     }),
  3780.                     Utility:Create('TextButton', {
  3781.                         Name = Name..'ImageButton',
  3782.                         BackgroundColor3 = Theme.PrimaryElementColor,
  3783.                         BackgroundTransparency = 1,
  3784.                         BorderSizePixel = 0,
  3785.                         Position = UDim2.new(0, 0, 0, 0),
  3786.                         Size = UDim2.new(0, 410, 0, 40),
  3787.                         Font = Enum.Font.SourceSans,
  3788.                         Text = '',
  3789.                         TextColor3 = Color3.fromRGB(0, 0, 0),
  3790.                         TextSize = 14
  3791.                     }, {
  3792.                         Utility:Create('UICorner', {
  3793.                             CornerRadius = UDim.new(0, 5),
  3794.                             Name = Name..'ImageButtonCorner'
  3795.                         })
  3796.                     })
  3797.                 })
  3798.                 Utility:Create('Frame', {
  3799.                     Name = Name..'ImageFiller',
  3800.                     Parent = Section,
  3801.                     Visible = false,
  3802.                     BackgroundTransparency = 1,
  3803.                     Size = UDim2.new(0, 410, 0, 0)
  3804.                 })
  3805.  
  3806.  
  3807.                 local ImageHolder = Section[Name..'ImageHolder']
  3808.                 local ImageIcon = ImageHolder[Name..'ImageIcon']
  3809.                 local ImageDropdown = ImageHolder[Name..'ImageDropdown']
  3810.                 local Image = ImageDropdown[Name..'Image']
  3811.                 local Button = ImageHolder[Name..'ImageButton']
  3812.                 local ImageFiller = Section[Name..'ImageFiller']
  3813.                 local ImageDropdownListLayout = ImageDropdown[Name..'ImageDropdownListLayout']
  3814.  
  3815.                 UpdateSectionSize()
  3816.  
  3817.                 if not ImprovePerformance then
  3818.                     task.spawn(function()
  3819.                         while task.wait() do
  3820.                             if ChangeTheme then
  3821.                                 if not BreakAllLoops then
  3822.                                     if not Hovering then
  3823.                                         Utility:Tween(ImageHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3824.                                     end
  3825.                                     Utility:Tween(ImageHolder[Name..'ImageStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3826.                                     Utility:Tween(ImageHolder[Name..'ImageText'], {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3827.                                     Utility:Tween(ImageHolder[Name..'ImageText'], {TextColor3 = Theme.PrimaryTextColor}, 0.25)
  3828.                                     Utility:Tween(ImageIcon, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3829.                                     Utility:Tween(ImageIcon, {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  3830.                                     Utility:Tween(ImageDropdown, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3831.                                     Utility:Tween(ImageDropdown, {ScrollBarImageColor3 = Theme.ScrollBarColor}, 0.25)
  3832.                                     Utility:Tween(ImageDropdown[Name..'ImageDropdownStroke'], {Color = Theme.UIStrokeColor}, 0.25)
  3833.                                     Utility:Tween(Image, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3834.                                     Utility:Tween(Button, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.25)
  3835.                                 else
  3836.                                     break
  3837.                                 end
  3838.                             end
  3839.                         end
  3840.                     end)
  3841.                 end
  3842.  
  3843.                 local function UpdateImageCanvas()
  3844.                     local ContentSize = ImageDropdownListLayout.AbsoluteContentSize
  3845.  
  3846.                     ImageDropdown.CanvasSize = UDim2.new(0, ContentSize.X, 0, ContentSize.Y)
  3847.                 end
  3848.  
  3849.                 UpdateImageCanvas()
  3850.  
  3851.                 Button.MouseButton1Click:Connect(function()
  3852.                     if not Debounce then
  3853.                         if Opened then
  3854.                             Opened = false
  3855.                             Utility:Tween(ImageFiller, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3856.                             Utility:Tween(ImageDropdown, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3857.                             Utility:Tween(ImageIcon, {ImageColor3 = Theme.SecondaryTextColor}, 0.25)
  3858.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize - UDim2.new(0, 400, 0, ImageSize.Y.Offset + 10)}, 0.25)
  3859.                             Utility:Tween(Section, {Size = Section.Size - UDim2.new(0, 400, 0, ImageSize.Y.Offset + 10)}, 0.25)
  3860.                             Utility:Tween(Image, {Size = UDim2.new(0, 410, 0, 0)}, 0.25)
  3861.                             UpdateImageCanvas()
  3862.                             UpdateSectionSize()
  3863.                             Debounce = true
  3864.                             task.wait(DebounceAmount)
  3865.                             Debounce = false
  3866.                             ImageDropdown.Visible = false
  3867.                             ImageFiller.Visible = false
  3868.                         else
  3869.                             Opened = true
  3870.                             ImageFiller.Visible = true
  3871.                             ImageDropdown.Visible = true
  3872.                             Utility:Tween(ImageDropdown, {Size = UDim2.new(0, 410, 0, ImageSize.Y.Offset + 10)}, 0.25)
  3873.                             Utility:Tween(ImageFiller, {Size = UDim2.new(0, 410, 0, ImageSize.Y.Offset + 10 - 6)}, 0.25)
  3874.                             Utility:Tween(Tab, {CanvasSize = Tab.CanvasSize + UDim2.new(0, 0, 0, ImageSize.Y.Offset + 10)}, 0.25)
  3875.                             Utility:Tween(Section, {Size = Section.Size + UDim2.new(0, 0, 0, ImageSize.Y.Offset + 10)}, 0.25)
  3876.                             Utility:Tween(Image, {Size = ImageSize}, 0.25)
  3877.                             UpdateImageCanvas()
  3878.                             UpdateSectionSize()
  3879.                             Utility:Tween(ImageIcon, {ImageColor3 = Theme.PrimaryTextColor}, 0.25)
  3880.                             Debounce = true
  3881.                             task.wait(DebounceAmount)
  3882.                             Debounce = false
  3883.                         end
  3884.                     end
  3885.                 end)
  3886.  
  3887.                 Image.InputBegan:Connect(function(Input)
  3888.                     if not Debounce2 then
  3889.                         task.spawn(function()
  3890.                             Debounce2 = true
  3891.                             task.wait(Debounce2Amount)
  3892.                             Debounce2 = false
  3893.                         end)
  3894.                         UpdateImageCanvas()
  3895.                         if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  3896.                             Utility:Tween(Image, {Size = UDim2.new(0, Image.Size.X.Offset * 2, 0, Image.Size.Y.Offset * 2)}, 0.25)
  3897.                             UpdateImageCanvas()
  3898.                         elseif Input.UserInputType == Enum.UserInputType.MouseButton2 and Image.Size ~= ImageSize then
  3899.                             Utility:Tween(Image, {Size = UDim2.new(0, Image.Size.X.Offset / 2, 0, Image.Size.Y.Offset / 2)}, 0.25)
  3900.                             UpdateImageCanvas()
  3901.                         end
  3902.                     end
  3903.                 end)
  3904.  
  3905.                 Image.Changed:Connect(function(Property)
  3906.                     if Property == 'Size' then
  3907.                         if Image.Size == ImageSize then
  3908.                             Utility:Tween(ImageDropdown, {CanvasSize = ImageSize}, 0.25)
  3909.                         end
  3910.                     end
  3911.                 end)
  3912.  
  3913.                 ImageHolder.MouseEnter:Connect(function()
  3914.                     Hovering = true
  3915.                     Utility:Tween(ImageHolder, {BackgroundColor3 = Utility:Lighten(Theme.PrimaryElementColor)}, 0.5)
  3916.                 end)
  3917.  
  3918.                 ImageHolder.MouseLeave:Connect(function()
  3919.                     Hovering = false
  3920.                     Utility:Tween(ImageHolder, {BackgroundColor3 = Theme.PrimaryElementColor}, 0.5)
  3921.                    
  3922.                 end)
  3923.  
  3924.                 function ImageFunctions:UpdateImage(NewURL, NewSize)
  3925.                     ImageSize = NewSize
  3926.                     URL = NewUrl
  3927.                     Image.Image = NewURL
  3928.                     UpdateImageCanvas()
  3929.                 end
  3930.                 return ImageFunctions
  3931.             end
  3932.             return Elements
  3933.         end
  3934.         return Sections
  3935.     end
  3936.     return Tabs
  3937. end
  3938. return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement