Advertisement
goku13l

UI-Libraries

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