Advertisement
magnetos

GUI

Feb 4th, 2023 (edited)
920
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 231.82 KB | None | 0 0
  1. --[[ Credits
  2.     Matas#3535 @matas - Created UI
  3.     bored#9316 @wally hub user - Helped make library
  4. ]]
  5. getgenv().MagnetGUIToggled = false
  6. -- // Variables
  7. local ws = game:GetService("Workspace")
  8. local uis = game:GetService("UserInputService")
  9. local rs = game:GetService("RunService")
  10. local hs = game:GetService("HttpService")
  11. local plrs = game:GetService("Players")
  12. local stats = game:GetService("Stats")
  13. -- UI Variables
  14. local library = {
  15.     drawings = {},
  16.     hidden = {},
  17.     connections = {},
  18.     pointers = {},
  19.     began = {},
  20.     ended = {},
  21.     changed = {},
  22.     folders = {
  23.         main = "magnet",
  24.         assets = "magnet/assets",
  25.         configs = "magnet/configs"
  26.     },
  27.     shared = {
  28.         initialized = false,
  29.         fps = 0,
  30.         ping = 0
  31.     }
  32. }
  33. --
  34. if not isfolder(library.folders.main) then
  35.     makefolder(library.folders.main)
  36. end
  37. --
  38. if not isfolder(library.folders.assets) then
  39.     makefolder(library.folders.assets)
  40. end
  41. --
  42. if not isfolder(library.folders.configs) then
  43.     makefolder(library.folders.configs)
  44. end
  45. --
  46. local utility = {}
  47. local pages = {}
  48. local sections = {}
  49. -- Theme Variables
  50. --local themes = {}
  51. local theme = {
  52.     accent = Color3.fromRGB(50, 100, 255),
  53.     light_contrast = Color3.fromRGB(30, 30, 30),
  54.     dark_contrast = Color3.fromRGB(20, 20, 20),
  55.     outline = Color3.fromRGB(0, 0, 0),
  56.     inline = Color3.fromRGB(50, 50, 50),
  57.     textcolor = Color3.fromRGB(255, 255, 255),
  58.     textborder = Color3.fromRGB(0, 0, 0),
  59.     cursoroutline = Color3.fromRGB(10, 10, 10),
  60.     font = 2,
  61.     textsize = 16
  62. }
  63. -- // Utility Functions
  64. do
  65.     function utility:Size(xScale,xOffset,yScale,yOffset,instance)
  66.         if instance then
  67.             local x = xScale*instance.Size.x+xOffset
  68.             local y = yScale*instance.Size.y+yOffset
  69.             --
  70.             return Vector2.new(x,y)
  71.         else
  72.             local vx,vy = ws.CurrentCamera.ViewportSize.x,ws.CurrentCamera.ViewportSize.y
  73.             --
  74.             local x = xScale*vx+xOffset
  75.             local y = yScale*vy+yOffset
  76.             --
  77.             return Vector2.new(x,y)
  78.         end
  79.     end
  80.     --
  81.     function utility:Position(xScale,xOffset,yScale,yOffset,instance)
  82.         if instance then
  83.             local x = instance.Position.x+xScale*instance.Size.x+xOffset
  84.             local y = instance.Position.y+yScale*instance.Size.y+yOffset
  85.             --
  86.             return Vector2.new(x,y)
  87.         else
  88.             local vx,vy = ws.CurrentCamera.ViewportSize.x,ws.CurrentCamera.ViewportSize.y
  89.             --
  90.             local x = xScale*vx+xOffset
  91.             local y = yScale*vy+yOffset
  92.             --
  93.             return Vector2.new(x,y)
  94.         end
  95.     end
  96.     --
  97.     function utility:Create(instanceType, instanceOffset, instanceProperties, instanceParent)
  98.         local instanceType = instanceType or "Frame"
  99.         local instanceOffset = instanceOffset or {Vector2.new(0,0)}
  100.         local instanceProperties = instanceProperties or {}
  101.         local instanceHidden = false
  102.         local instance = nil
  103.         --
  104.         if instanceType == "Frame" or instanceType == "frame" then
  105.             local frame = Drawing.new("Square")
  106.             frame.Visible = true
  107.             frame.Filled = true
  108.             frame.Thickness = 0
  109.             frame.Color = Color3.fromRGB(255,255,255)
  110.             frame.Size = Vector2.new(100,100)
  111.             frame.Position = Vector2.new(0,0)
  112.             frame.ZIndex = 50
  113.             frame.Transparency = library.shared.initialized and 1 or 0
  114.             instance = frame
  115.         elseif instanceType == "TextLabel" or instanceType == "textlabel" then
  116.             local text = Drawing.new("Text")
  117.             text.Font = 3
  118.             text.Visible = true
  119.             text.Outline = true
  120.             text.Center = false
  121.             text.Color = Color3.fromRGB(255,255,255)
  122.             text.ZIndex = 50
  123.             text.Transparency = library.shared.initialized and 1 or 0
  124.             instance = text
  125.         elseif instanceType == "Triangle" or instanceType == "triangle" then
  126.             local frame = Drawing.new("Triangle")
  127.             frame.Visible = true
  128.             frame.Filled = true
  129.             frame.Thickness = 0
  130.             frame.Color = Color3.fromRGB(255,255,255)
  131.             frame.ZIndex = 50
  132.             frame.Transparency = library.shared.initialized and 1 or 0
  133.             instance = frame
  134.         elseif instanceType == "Image" or instanceType == "image" then
  135.             local image = Drawing.new("Image")
  136.             image.Size = Vector2.new(12,19)
  137.             image.Position = Vector2.new(0,0)
  138.             image.Visible = true
  139.             image.ZIndex = 50
  140.             image.Transparency = library.shared.initialized and 1 or 0
  141.             instance = image
  142.         elseif instanceType == "Circle" or instanceType == "circle" then
  143.             local circle = Drawing.new("Circle")
  144.             circle.Visible = false
  145.             circle.Color = Color3.fromRGB(255, 0, 0)
  146.             circle.Thickness = 1
  147.             circle.NumSides = 30
  148.             circle.Filled = true
  149.             circle.Transparency = 1
  150.             circle.ZIndex = 50
  151.             circle.Radius = 50
  152.             circle.Transparency = library.shared.initialized and 1 or 0
  153.             instance = circle
  154.         elseif instanceType == "Quad" or instanceType == "quad" then
  155.             local quad = Drawing.new("Quad")
  156.             quad.Visible = false
  157.             quad.Color = Color3.fromRGB(255, 255, 255)
  158.             quad.Thickness = 1.5
  159.             quad.Transparency = 1
  160.             quad.ZIndex = 50
  161.             quad.Filled = false
  162.             quad.Transparency = library.shared.initialized and 1 or 0
  163.             instance = quad
  164.         elseif instanceType == "Line" or instanceType == "line" then
  165.             local line = Drawing.new("Line")
  166.             line.Visible = false
  167.             line.Color = Color3.fromRGB(255, 255, 255)
  168.             line.Thickness = 1.5
  169.             line.Transparency = 1
  170.             line.Thickness = 1.5
  171.             line.ZIndex = 50
  172.             line.Transparency = library.shared.initialized and 1 or 0
  173.             instance = line
  174.         end
  175.         --
  176.         if instance then
  177.             for i, v in pairs(instanceProperties) do
  178.                 if i == "Hidden" or i == "hidden" then
  179.                     instanceHidden = true
  180.                 else
  181.                     if library.shared.initialized then
  182.                         instance[i] = v
  183.                     else
  184.                         if i ~= "Transparency" then
  185.                             instance[i] = v
  186.                         end
  187.                     end
  188.                 end
  189.                 --[[if typeof(v) == "Color3" then
  190.                     local found_theme = utility:Find(theme, v)
  191.                     if found_theme then
  192.                         themes[found_theme] = themes[found_theme] or {}
  193.                         themes[found_theme][i] = themes[found_theme][i]
  194.                         table.insert(themes[found_theme][i], instance)
  195.                     end
  196.                 end]]
  197.             end
  198.             --
  199.             if not instanceHidden then
  200.                 library.drawings[#library.drawings + 1] = {instance, instanceOffset, instanceProperties["Transparency"] or 1}
  201.             else
  202.                 library.hidden[#library.hidden + 1] = {instance}
  203.             end
  204.             --
  205.             if instanceParent then
  206.                 instanceParent[#instanceParent + 1] = instance
  207.             end
  208.             --
  209.             return instance
  210.         end
  211.     end
  212.     --
  213.     function utility:UpdateOffset(instance, instanceOffset)
  214.         for i,v in pairs(library.drawings) do
  215.             if v[1] == instance then
  216.                 v[2] = instanceOffset
  217.             end
  218.         end
  219.     end
  220.     --
  221.     function utility:UpdateTransparency(instance, instanceTransparency)
  222.         for i,v in pairs(library.drawings) do
  223.             if v[1] == instance then
  224.                 v[3] = instanceTransparency
  225.             end
  226.         end
  227.     end
  228.     --
  229.     function utility:Remove(instance, hidden)
  230.         local ind = 0
  231.         --
  232.         for i,v in pairs(hidden and library.hidden or library.drawings) do
  233.             if v[1] == instance then
  234.                 ind = i
  235.                 if hidden then
  236.                     v[1] = nil
  237.                 else
  238.                     v[2] = nil
  239.                     v[1] = nil
  240.                 end
  241.             end
  242.         end
  243.         --
  244.         table.remove(hidden and library.hidden or library.drawings, ind)
  245.         instance:Remove()
  246.     end
  247.     --
  248.     function utility:GetSubPrefix(str)
  249.         local str = tostring(str):gsub(" ","")
  250.         local var = ""
  251.         --
  252.         if #str == 2 then
  253.             local sec = string.sub(str,#str,#str+1)
  254.             var = sec == "1" and "st" or sec == "2" and "nd" or sec == "3" and "rd" or "th"
  255.         end
  256.         --
  257.         return var
  258.     end
  259.     --
  260.     function utility:Connection(connectionType, connectionCallback)
  261.         local connection = connectionType:Connect(connectionCallback)
  262.         library.connections[#library.connections + 1] = connection
  263.         --
  264.         return connection
  265.     end
  266.     --
  267.     function utility:Disconnect(connection)
  268.         for i,v in pairs(library.connections) do
  269.             if v == connection then
  270.                 library.connections[i] = nil
  271.                 v:Disconnect()
  272.             end
  273.         end
  274.     end
  275.     --
  276.     function utility:MouseLocation()
  277.         return uis:GetMouseLocation()
  278.     end
  279.     --
  280.     function utility:MouseOverDrawing(values, valuesAdd)
  281.         local valuesAdd = valuesAdd or {}
  282.         local values = {
  283.             (values[1] or 0) + (valuesAdd[1] or 0),
  284.             (values[2] or 0) + (valuesAdd[2] or 0),
  285.             (values[3] or 0) + (valuesAdd[3] or 0),
  286.             (values[4] or 0) + (valuesAdd[4] or 0)
  287.         }
  288.         --
  289.         local mouseLocation = utility:MouseLocation()
  290.         return (mouseLocation.x >= values[1] and mouseLocation.x <= (values[1] + (values[3] - values[1]))) and (mouseLocation.y >= values[2] and mouseLocation.y <= (values[2] + (values[4] - values[2])))
  291.     end
  292.     --
  293.     function utility:GetTextBounds(text, textSize, font)
  294.         local textbounds = Vector2.new(0, 0)
  295.         --
  296.         local textlabel = utility:Create("TextLabel", {Vector2.new(0, 0)}, {
  297.             Text = text,
  298.             Size = textSize,
  299.             Font = font,
  300.             Hidden = true
  301.         })
  302.         --
  303.         textbounds = textlabel.TextBounds
  304.         utility:Remove(textlabel, true)
  305.         --
  306.         return textbounds
  307.     end
  308.     --
  309.     function utility:GetScreenSize()
  310.         return ws.CurrentCamera.ViewportSize
  311.     end
  312.     --
  313.     function utility:LoadImage(instance, imageName, imageLink)
  314.         local data
  315.         --
  316.         if isfile(library.folders.assets.."/"..imageName..".png") then
  317.             data = readfile(library.folders.assets.."/"..imageName..".png")
  318.         else
  319.             if imageLink then
  320.                 data = game:HttpGet(imageLink)
  321.                 writefile(library.folders.assets.."/"..imageName..".png", data)
  322.             else
  323.                 return
  324.             end
  325.         end
  326.         --
  327.         if data and instance then
  328.             instance.Data = data
  329.         end
  330.     end
  331.     --
  332.     function utility:Lerp(instance, instanceTo, instanceTime)
  333.         local currentTime = 0
  334.         local currentIndex = {}
  335.         local connection
  336.         --
  337.         for i,v in pairs(instanceTo) do
  338.             currentIndex[i] = instance[i]
  339.         end
  340.         --
  341.         local function lerp()
  342.             for i,v in pairs(instanceTo) do
  343.                 instance[i] = ((v - currentIndex[i]) * currentTime / instanceTime) + currentIndex[i]
  344.             end
  345.         end
  346.         --
  347.         connection = rs.RenderStepped:Connect(function(delta)
  348.             if currentTime < instanceTime then
  349.                 currentTime = currentTime + delta
  350.                 lerp()
  351.             else
  352.                 connection:Disconnect()
  353.             end
  354.         end)
  355.     end
  356.     --
  357.     function utility:Combine(table1, table2)
  358.         local table3 = {}
  359.         for i,v in pairs(table1) do table3[i] = v end
  360.         local t = #table3
  361.         for z,x in pairs(table2) do table3[z + t] = x end
  362.         return table3
  363.     end
  364. end
  365. -- // Library Functions
  366. do
  367.     library.__index = library
  368.     pages.__index = pages
  369.     sections.__index = sections
  370.     --
  371.     function library:New(info)
  372.         local info = info or {}
  373.         local name = info.name or info.Name or info.title or info.Title or "UI Title"
  374.         local size = info.size or info.Size or Vector2.new(504,604)
  375.         local accent = info.accent or info.Accent or info.color or info.Color or theme.accent
  376.         --
  377.         theme.accent = accent
  378.         --
  379.         local window = {pages = {}, isVisible = false, uibind = Enum.KeyCode.RightControl, currentPage = nil, fading = false, dragging = false, drag = Vector2.new(0,0), currentContent = {frame = nil, dropdown = nil, multibox = nil, colorpicker = nil, keybind = nil}}
  380.         --
  381.         local main_frame = utility:Create("Frame", {Vector2.new(0,0)}, {
  382.             Size = utility:Size(0, size.X, 0, size.Y),
  383.             Position = utility:Position(0.5, -(size.X/2) ,0.5, -(size.Y/2)),
  384.             Color = theme.outline
  385.         });window["main_frame"] = main_frame
  386.         --
  387.         local frame_inline = utility:Create("Frame", {Vector2.new(1,1), main_frame}, {
  388.             Size = utility:Size(1, -2, 1, -2, main_frame),
  389.             Position = utility:Position(0, 1, 0, 1, main_frame),
  390.             Color = theme.accent
  391.         })
  392.         --
  393.         local inner_frame = utility:Create("Frame", {Vector2.new(1,1), frame_inline}, {
  394.             Size = utility:Size(1, -2, 1, -2, frame_inline),
  395.             Position = utility:Position(0, 1, 0, 1, frame_inline),
  396.             Color = theme.light_contrast
  397.         })
  398.         --
  399.         local title = utility:Create("TextLabel", {Vector2.new(4,2), inner_frame}, {
  400.             Text = name,
  401.             Size = theme.textsize,
  402.             Font = theme.font,
  403.             Color = theme.textcolor,
  404.             OutlineColor = theme.textborder,
  405.             Position = utility:Position(0, 4, 0, 2, inner_frame)
  406.         })
  407.         --
  408.         local inner_frame_inline = utility:Create("Frame", {Vector2.new(4,18), inner_frame}, {
  409.             Size = utility:Size(1, -8, 1, -22, inner_frame),
  410.             Position = utility:Position(0, 4, 0, 18, inner_frame),
  411.             Color = theme.inline
  412.         })
  413.         --
  414.         local inner_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline}, {
  415.             Size = utility:Size(1, -2, 1, -2, inner_frame_inline),
  416.             Position = utility:Position(0, 1, 0, 1, inner_frame_inline),
  417.             Color = theme.outline
  418.         })
  419.         --
  420.         local back_frame = utility:Create("Frame", {Vector2.new(1,1), inner_frame_inline2}, {
  421.             Size = utility:Size(1, -2, 1, -2, inner_frame_inline2),
  422.             Position = utility:Position(0, 1, 0, 1, inner_frame_inline2),
  423.             Color = theme.dark_contrast
  424.         });window["back_frame"] = back_frame
  425.         --
  426.         local tab_frame_inline = utility:Create("Frame", {Vector2.new(4,24), back_frame}, {
  427.             Size = utility:Size(1, -8, 1, -28, back_frame),
  428.             Position = utility:Position(0, 4, 0, 24, back_frame),
  429.             Color = theme.outline
  430.         })
  431.         --
  432.         local tab_frame_inline2 = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline}, {
  433.             Size = utility:Size(1, -2, 1, -2, tab_frame_inline),
  434.             Position = utility:Position(0, 1, 0, 1, tab_frame_inline),
  435.             Color = theme.inline
  436.         })
  437.         --
  438.         local tab_frame = utility:Create("Frame", {Vector2.new(1,1), tab_frame_inline2}, {
  439.             Size = utility:Size(1, -2, 1, -2, tab_frame_inline2),
  440.             Position = utility:Position(0, 1, 0, 1, tab_frame_inline2),
  441.             Color = theme.light_contrast
  442.         });window["tab_frame"] = tab_frame
  443.         --
  444.         function window:GetConfig()
  445.             local config = {}
  446.             --
  447.             for i,v in pairs(library.pointers) do
  448.                 if typeof(v:Get()) == "table" and v:Get().Transparency then
  449.                     local hue, sat, val = v:Get().Color:ToHSV()
  450.                     config[i] = {Color = {hue, sat, val}, Transparency = v:Get().Transparency}
  451.                 else
  452.                     config[i] = v:Get()
  453.                 end
  454.             end
  455.             --
  456.             return game:GetService("HttpService"):JSONEncode(config)
  457.         end
  458.         --
  459.         function window:LoadConfig(config)
  460.             local config = hs:JSONDecode(config)
  461.             --
  462.             for i,v in pairs(config) do
  463.                 if library.pointers[i] then
  464.                     library.pointers[i]:Set(v)
  465.                 end
  466.             end
  467.         end
  468.         --
  469.         function window:Move(vector)
  470.             for i,v in pairs(library.drawings) do
  471.                 if v[2][2] then
  472.                     v[1].Position = utility:Position(0, v[2][1].X, 0, v[2][1].Y, v[2][2])
  473.                 else
  474.                     v[1].Position = utility:Position(0, vector.X, 0, vector.Y)
  475.                 end
  476.             end
  477.         end
  478.         --
  479.         function window:CloseContent()
  480.             if window.currentContent.dropdown and window.currentContent.dropdown.open then
  481.                 local dropdown = window.currentContent.dropdown
  482.                 dropdown.open = not dropdown.open
  483.                 utility:LoadImage(dropdown.dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  484.                 --
  485.                 for i,v in pairs(dropdown.holder.drawings) do
  486.                     utility:Remove(v)
  487.                 end
  488.                 --
  489.                 dropdown.holder.drawings = {}
  490.                 dropdown.holder.buttons = {}
  491.                 dropdown.holder.inline = nil
  492.                 --
  493.                 window.currentContent.frame = nil
  494.                 window.currentContent.dropdown = nil
  495.             elseif window.currentContent.multibox and window.currentContent.multibox.open then
  496.                 local multibox = window.currentContent.multibox
  497.                 multibox.open = not multibox.open
  498.                 utility:LoadImage(multibox.multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  499.                 --
  500.                 for i,v in pairs(multibox.holder.drawings) do
  501.                     utility:Remove(v)
  502.                 end
  503.                 --
  504.                 multibox.holder.drawings = {}
  505.                 multibox.holder.buttons = {}
  506.                 multibox.holder.inline = nil
  507.                 --
  508.                 window.currentContent.frame = nil
  509.                 window.currentContent.multibox = nil
  510.             elseif window.currentContent.colorpicker and window.currentContent.colorpicker.open then
  511.                 local colorpicker = window.currentContent.colorpicker
  512.                 colorpicker.open = not colorpicker.open
  513.                 --
  514.                 for i,v in pairs(colorpicker.holder.drawings) do
  515.                     utility:Remove(v)
  516.                 end
  517.                 --
  518.                 colorpicker.holder.drawings = {}
  519.                 --
  520.                 window.currentContent.frame = nil
  521.                 window.currentContent.colorpicker = nil
  522.             elseif window.currentContent.keybind and window.currentContent.keybind.open then
  523.                 local modemenu = window.currentContent.keybind.modemenu
  524.                 window.currentContent.keybind.open = not window.currentContent.keybind.open
  525.                 --
  526.                 for i,v in pairs(modemenu.drawings) do
  527.                     utility:Remove(v)
  528.                 end
  529.                 --
  530.                 modemenu.drawings = {}
  531.                 modemenu.buttons = {}
  532.                 modemenu.frame = nil
  533.                 --
  534.                 window.currentContent.frame = nil
  535.                 window.currentContent.keybind = nil
  536.             end
  537.         end
  538.         --
  539.         function window:IsOverContent()
  540.             local isOver = false
  541.             --
  542.             if window.currentContent.frame and utility:MouseOverDrawing({window.currentContent.frame.Position.X,window.currentContent.frame.Position.Y,window.currentContent.frame.Position.X + window.currentContent.frame.Size.X,window.currentContent.frame.Position.Y + window.currentContent.frame.Size.Y}) then
  543.                 isOver = true
  544.             end
  545.             --
  546.             return isOver
  547.         end
  548.         --
  549.         function window:Unload()
  550.             for i,v in pairs(library.connections) do
  551.                 v:Disconnect()
  552.                 v = nil
  553.             end
  554.             --
  555.             for i,v in next, library.hidden do
  556.                 if v[1] and v[1].Remove ~= nil then
  557.                     local instance = v[1]
  558.                     v[1] = nil
  559.                     v = nil
  560.                     instance:Remove()
  561.                 end
  562.             end
  563.             --
  564.             for i,v in pairs(library.drawings) do
  565.                 if v[1] and v[1].Remove ~= nil then
  566.                     local instance = v[1]
  567.                     v[1] = nil
  568.                     v = nil
  569.                     instance:Remove()
  570.                 end
  571.             end
  572.             --
  573.             for i,v in pairs(library.began) do
  574.                 v = nil
  575.             end
  576.             --
  577.             for i,v in pairs(library.ended) do
  578.                 v = nil
  579.             end
  580.             --
  581.             for i,v in pairs(library.changed) do
  582.                 v = nil
  583.             end
  584.             --
  585.             library.drawings = nil
  586.             library.hidden = nil
  587.             library.connections = nil
  588.             library.began = nil
  589.             library.ended = nil
  590.             library.changed = nil
  591.             --
  592.             uis.MouseIconEnabled = true
  593.         end
  594.         --
  595.         function window:Watermark(info)
  596.             window.watermark = {visible = false}
  597.             --
  598.             local info = info or {}
  599.             local watermark_name = info.name or info.Name or info.title or info.Title or string.format("$$ Splix || uid : %u || ping : %u || fps : %u", 1, 100, 200)
  600.             --
  601.             local text_bounds = utility:GetTextBounds(watermark_name, theme.textsize, theme.font)
  602.             --
  603.             local watermark_outline = utility:Create("Frame", {Vector2.new(100,38/2-10)}, {
  604.                 Size = utility:Size(0, text_bounds.X+20, 0, 21),
  605.                 Position = utility:Position(0, 100, 0, 38/2-10),
  606.                 Hidden = true,
  607.                 ZIndex = 60,
  608.                 Color = theme.outline,
  609.                 Visible = window.watermark.visible
  610.             })window.watermark.outline = watermark_outline
  611.             --
  612.             local watermark_inline = utility:Create("Frame", {Vector2.new(1,1), watermark_outline}, {
  613.                 Size = utility:Size(1, -2, 1, -2, watermark_outline),
  614.                 Position = utility:Position(0, 1, 0, 1, watermark_outline),
  615.                 Hidden = true,
  616.                 ZIndex = 60,
  617.                 Color = theme.inline,
  618.                 Visible = window.watermark.visible
  619.             })
  620.             --
  621.             local watermark_frame = utility:Create("Frame", {Vector2.new(1,1), watermark_inline}, {
  622.                 Size = utility:Size(1, -2, 1, -2, watermark_inline),
  623.                 Position = utility:Position(0, 1, 0, 1, watermark_inline),
  624.                 Hidden = true,
  625.                 ZIndex = 60,
  626.                 Color = theme.light_contrast,
  627.                 Visible = window.watermark.visible
  628.             })
  629.             --
  630.             local watermark_accent = utility:Create("Frame", {Vector2.new(0,0), watermark_frame}, {
  631.                 Size = utility:Size(1, 0, 0, 1, watermark_frame),
  632.                 Position = utility:Position(0, 0, 0, 0, watermark_frame),
  633.                 Hidden = true,
  634.                 ZIndex = 60,
  635.                 Color = theme.accent,
  636.                 Visible = window.watermark.visible
  637.             })
  638.             --
  639.             local watermark_title = utility:Create("TextLabel", {Vector2.new(2 + 6,4), watermark_outline}, {
  640.                 Text = string.format("splix - fps : %u - uid : %u", 35, 2),
  641.                 Size = theme.textsize,
  642.                 Font = theme.font,
  643.                 Color = theme.textcolor,
  644.                 OutlineColor = theme.textborder,
  645.                 Hidden = true,
  646.                 ZIndex = 60,
  647.                 Position = utility:Position(0, 2 + 6, 0, 4, watermark_outline),
  648.                 Visible = window.watermark.visible
  649.             })
  650.             --
  651.             function window.watermark:UpdateSize()
  652.                 watermark_outline.Size = utility:Size(0, watermark_title.TextBounds.X + 4 + (6*2), 0, 21)
  653.                 watermark_inline.Size = utility:Size(1, -2, 1, -2, watermark_outline)
  654.                 watermark_frame.Size = utility:Size(1, -2, 1, -2, watermark_inline)
  655.                 watermark_accent.Size = utility:Size(1, 0, 0, 1, watermark_frame)
  656.             end
  657.             --
  658.             function window.watermark:Visibility()
  659.                 watermark_outline.Visible = window.watermark.visible
  660.                 watermark_inline.Visible = window.watermark.visible
  661.                 watermark_frame.Visible = window.watermark.visible
  662.                 watermark_accent.Visible = window.watermark.visible
  663.                 watermark_title.Visible = window.watermark.visible
  664.             end
  665.             --
  666.             function window.watermark:Update(updateType, updateValue)
  667.                 if updateType == "Visible" then
  668.                     window.watermark.visible = updateValue
  669.                     window.watermark:Visibility()
  670.                 end
  671.             end
  672.             --
  673.             utility:Connection(rs.RenderStepped, function(fps)
  674.                 library.shared.fps = math.round(1 / fps)
  675.                 library.shared.ping = tonumber(string.split(stats.Network.ServerStatsItem["Data Ping"]:GetValueString(), " ")[1] .. "")
  676.             end)
  677.             --
  678.             watermark_title.Text = string.format("$$ Splix || uid : %u || ping : %i || fps : %u", 1, tostring(library.shared.ping), library.shared.fps)
  679.             window.watermark:UpdateSize()
  680.             --
  681.             spawn(function()
  682.                 while wait(0.1) do
  683.                     watermark_title.Text = string.format("$$ Splix || uid : %u || ping : %i || fps : %u", 1, tostring(library.shared.ping), library.shared.fps)
  684.                     window.watermark:UpdateSize()
  685.                 end
  686.             end)
  687.             --
  688.             return window.watermark
  689.         end
  690.         --
  691.         function window:KeybindsList(info)
  692.             window.keybindslist = {visible = false, keybinds = {}}
  693.             --
  694.             local info = info or {}
  695.             --
  696.             local keybindslist_outline = utility:Create("Frame", {Vector2.new(10,(utility:GetScreenSize().Y/2)-200)}, {
  697.                 Size = utility:Size(0, 150, 0, 22),
  698.                 Position = utility:Position(0, 10, 0.4, 0),
  699.                 Hidden = true,
  700.                 ZIndex = 55,
  701.                 Color = theme.outline,
  702.                 Visible = window.keybindslist.visible
  703.             })window.keybindslist.outline = keybindslist_outline
  704.             --
  705.             local keybindslist_inline = utility:Create("Frame", {Vector2.new(1,1), keybindslist_outline}, {
  706.                 Size = utility:Size(1, -2, 1, -2, keybindslist_outline),
  707.                 Position = utility:Position(0, 1, 0, 1, keybindslist_outline),
  708.                 Hidden = true,
  709.                 ZIndex = 55,
  710.                 Color = theme.inline,
  711.                 Visible = window.keybindslist.visible
  712.             })
  713.             --
  714.             local keybindslist_frame = utility:Create("Frame", {Vector2.new(1,1), keybindslist_inline}, {
  715.                 Size = utility:Size(1, -2, 1, -2, keybindslist_inline),
  716.                 Position = utility:Position(0, 1, 0, 1, keybindslist_inline),
  717.                 Hidden = true,
  718.                 ZIndex = 55,
  719.                 Color = theme.light_contrast,
  720.                 Visible = window.keybindslist.visible
  721.             })
  722.             --
  723.             local keybindslist_accent = utility:Create("Frame", {Vector2.new(0,0), keybindslist_frame}, {
  724.                 Size = utility:Size(1, 0, 0, 1, keybindslist_frame),
  725.                 Position = utility:Position(0, 0, 0, 0, keybindslist_frame),
  726.                 Hidden = true,
  727.                 ZIndex = 55,
  728.                 Color = theme.accent,
  729.                 Visible = window.keybindslist.visible
  730.             })
  731.             --
  732.             local keybindslist_title = utility:Create("TextLabel", {Vector2.new(keybindslist_outline.Size.X/2,4), keybindslist_outline}, {
  733.                 Text = "- Keybinds -",
  734.                 Size = theme.textsize,
  735.                 Font = theme.font,
  736.                 Color = theme.textcolor,
  737.                 OutlineColor = theme.textborder,
  738.                 Center = true,
  739.                 Hidden = true,
  740.                 ZIndex = 55,
  741.                 Position = utility:Position(0.5, 0, 0, 5, keybindslist_outline),
  742.                 Visible = window.keybindslist.visible
  743.             })
  744.             --
  745.             function window.keybindslist:Resort()
  746.                 local index = 0
  747.                 for i,v in pairs(window.keybindslist.keybinds) do
  748.                     v:Move(0 + (index*17))
  749.                     --
  750.                     index = index + 1
  751.                 end
  752.             end
  753.             --
  754.             function window.keybindslist:Add(keybindname, keybindvalue)
  755.                 if keybindname and keybindvalue and not window.keybindslist.keybinds[keybindname] then
  756.                     local keybindTable = {}
  757.                     --
  758.                     local keybind_outline = utility:Create("Frame", {Vector2.new(0,keybindslist_outline.Size.Y-1), keybindslist_outline}, {
  759.                         Size = utility:Size(1, 0, 0, 18, keybindslist_outline),
  760.                         Position = utility:Position(0, 0, 1, -1, keybindslist_outline),
  761.                         Hidden = true,
  762.                         ZIndex = 55,
  763.                         Color = theme.outline,
  764.                         Visible = window.keybindslist.visible
  765.                     })
  766.                     --
  767.                     local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  768.                         Size = utility:Size(1, -2, 1, -2, keybind_outline),
  769.                         Position = utility:Position(0, 1, 0, 1, keybind_outline),
  770.                         Hidden = true,
  771.                         ZIndex = 55,
  772.                         Color = theme.inline,
  773.                         Visible = window.keybindslist.visible
  774.                     })
  775.                     --
  776.                     local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  777.                         Size = utility:Size(1, -2, 1, -2, keybind_inline),
  778.                         Position = utility:Position(0, 1, 0, 1, keybind_inline),
  779.                         Hidden = true,
  780.                         ZIndex = 55,
  781.                         Color = theme.dark_contrast,
  782.                         Visible = window.keybindslist.visible
  783.                     })
  784.                     --
  785.                     local keybind_title = utility:Create("TextLabel", {Vector2.new(4,3), keybind_outline}, {
  786.                         Text = keybindname,
  787.                         Size = theme.textsize,
  788.                         Font = theme.font,
  789.                         Color = theme.textcolor,
  790.                         OutlineColor = theme.textborder,
  791.                         Center = false,
  792.                         Hidden = true,
  793.                         ZIndex = 55,
  794.                         Position = utility:Position(0, 4, 0, 3, keybind_outline),
  795.                         Visible = window.keybindslist.visible
  796.                     })
  797.                     --
  798.                     local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X - 4 - utility:GetTextBounds(keybindname, theme.textsize, theme.font).X,3), keybind_outline}, {
  799.                         Text = "["..keybindvalue.."]",
  800.                         Size = theme.textsize,
  801.                         Font = theme.font,
  802.                         Color = theme.textcolor,
  803.                         OutlineColor = theme.textborder,
  804.                         Hidden = true,
  805.                         ZIndex = 55,
  806.                         Position = utility:Position(1, -4 - utility:GetTextBounds(keybindname, theme.textsize, theme.font).X, 0, 3, keybind_outline),
  807.                         Visible = window.keybindslist.visible
  808.                     })
  809.                     --
  810.                     function keybindTable:Move(yPos)
  811.                         keybind_outline.Position = utility:Position(0, 0, 1, -1 + yPos, keybindslist_outline)
  812.                         keybind_inline.Position = utility:Position(0, 1, 0, 1, keybind_outline)
  813.                         keybind_frame.Position = utility:Position(0, 1, 0, 1, keybind_inline)
  814.                         keybind_title.Position = utility:Position(0, 4, 0, 3, keybind_outline)
  815.                         keybind_value.Position = utility:Position(1, -4 - keybind_value.TextBounds.X, 0, 3, keybind_outline)
  816.                     end
  817.                     --
  818.                     function keybindTable:Remove()
  819.                         utility:Remove(keybind_outline, true)
  820.                         utility:Remove(keybind_inline, true)
  821.                         utility:Remove(keybind_frame, true)
  822.                         utility:Remove(keybind_title, true)
  823.                         utility:Remove(keybind_value, true)
  824.                         --
  825.                         window.keybindslist.keybinds[keybindname] = nil
  826.                         keybindTable = nil
  827.                     end
  828.                     --
  829.                     function keybindTable:Visibility()
  830.                         keybind_outline.Visible = window.keybindslist.visible
  831.                         keybind_inline.Visible = window.keybindslist.visible
  832.                         keybind_frame.Visible = window.keybindslist.visible
  833.                         keybind_title.Visible = window.keybindslist.visible
  834.                         keybind_value.Visible = window.keybindslist.visible
  835.                     end
  836.                     --
  837.                     window.keybindslist.keybinds[keybindname] = keybindTable
  838.                     window.keybindslist:Resort()
  839.                 end
  840.             end
  841.             --
  842.             function window.keybindslist:Remove(keybindname)
  843.                 if keybindname and window.keybindslist.keybinds[keybindname] then
  844.                     window.keybindslist.keybinds[keybindname]:Remove()
  845.                     window.keybindslist.keybinds[keybindname] = nil
  846.                     window.keybindslist:Resort()
  847.                 end
  848.             end
  849.             --
  850.             function window.keybindslist:Visibility()
  851.                 keybindslist_outline.Visible = window.keybindslist.visible
  852.                 keybindslist_inline.Visible = window.keybindslist.visible
  853.                 keybindslist_frame.Visible = window.keybindslist.visible
  854.                 keybindslist_accent.Visible = window.keybindslist.visible
  855.                 keybindslist_title.Visible = window.keybindslist.visible
  856.                 --
  857.                 for i,v in pairs(window.keybindslist.keybinds) do
  858.                     v:Visibility()
  859.                 end
  860.             end
  861.             --
  862.             function window.keybindslist:Update(updateType, updateValue)
  863.                 if updateType == "Visible" then
  864.                     window.keybindslist.visible = updateValue
  865.                     window.keybindslist:Visibility()
  866.                 end
  867.             end
  868.             --
  869.             utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  870.                 keybindslist_outline.Position = utility:Position(0, 10, 0.4, 0)
  871.                 keybindslist_inline.Position = utility:Position(0, 1, 0, 1, keybindslist_outline)
  872.                 keybindslist_frame.Position = utility:Position(0, 1, 0, 1, keybindslist_inline)
  873.                 keybindslist_accent.Position = utility:Position(0, 0, 0, 0, keybindslist_frame)
  874.                 keybindslist_title.Position = utility:Position(0.5, 0, 0, 5, keybindslist_outline)
  875.                 --
  876.                 window.keybindslist:Resort()
  877.             end)
  878.         end
  879.         --
  880.         function window:Cursor(info)
  881.             window.cursor = {}
  882.             --
  883.             local cursor = utility:Create("Triangle", nil, {
  884.                 Color = theme.cursoroutline,
  885.                 Thickness = 2.5,
  886.                 Filled = false,
  887.                 ZIndex = 65,
  888.                 Hidden = true
  889.             });window.cursor["cursor"] = cursor
  890.             --
  891.             local cursor_inline = utility:Create("Triangle", nil, {
  892.                 Color = theme.accent,
  893.                 Filled = true,
  894.                 Thickness = 0,
  895.                 ZIndex = 65,
  896.                 Hidden = true
  897.             });window.cursor["cursor_inline"] = cursor_inline
  898.             --
  899.             utility:Connection(rs.RenderStepped, function()
  900.                 local mouseLocation = utility:MouseLocation()
  901.                 --
  902.                 cursor.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  903.                 cursor.PointB = Vector2.new(mouseLocation.X + 16, mouseLocation.Y + 6)
  904.                 cursor.PointC = Vector2.new(mouseLocation.X + 6, mouseLocation.Y + 16)
  905.                 --
  906.                 cursor_inline.PointA = Vector2.new(mouseLocation.X, mouseLocation.Y)
  907.                 cursor_inline.PointB = Vector2.new(mouseLocation.X + 16, mouseLocation.Y + 6)
  908.                 cursor_inline.PointC = Vector2.new(mouseLocation.X + 6, mouseLocation.Y + 16)
  909.             end)
  910.             --
  911.             uis.MouseIconEnabled = false
  912.             --
  913.             return window.cursor
  914.         end
  915.         --
  916.         function window:Fade()
  917.             window.fading = true
  918.             MagnetGUIToggled = not MagnetGUIToggled
  919.             local NewTransparency = MagnetGUIToggled == true and 1 or 0
  920.            
  921.             window.isVisible = MagnetGUIToggled
  922.            
  923.             for i,v in next, window.drawings do
  924.                 utility:Lerp(v[1], {Transparency = NewTransparency}, 0.25)
  925.             end
  926.            
  927.             window.cursor["cursor"].Transparency = window.isVisible and 1 or 0
  928.             window.cursor["cursor_inline"].Transparency = window.isVisible and 1 or 0
  929.             uis.MouseIconEnabled = not window.isVisible
  930.  
  931.             window.fading = false
  932.         end
  933.         --
  934.         function window:Initialize()
  935.             window.pages[1]:Show()
  936.             --
  937.             for i,v in pairs(window.pages) do
  938.                 v:Update()
  939.             end
  940.             --
  941.             library.shared.initialized = true
  942.             --
  943.             window:Watermark()
  944.             window:KeybindsList()
  945.             window:Cursor()
  946.             --
  947.             window:Fade()
  948.         end
  949.         --
  950.         library.began[#library.began + 1] = function(Input)
  951.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.isVisible and utility:MouseOverDrawing({main_frame.Position.X,main_frame.Position.Y,main_frame.Position.X + main_frame.Size.X,main_frame.Position.Y + 20}) then
  952.                 local mouseLocation = utility:MouseLocation()
  953.                 --
  954.                 window.dragging = true
  955.                 window.drag = Vector2.new(mouseLocation.X - main_frame.Position.X, mouseLocation.Y - main_frame.Position.Y)
  956.             end
  957.         end
  958.         --
  959.         library.ended[#library.ended + 1] = function(Input)
  960.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and window.dragging then
  961.                 window.dragging = false
  962.                 window.drag = Vector2.new(0, 0)
  963.             end
  964.         end
  965.         --
  966.         library.changed[#library.changed + 1] = function(Input)
  967.             if window.dragging and window.isVisible then
  968.                 local mouseLocation = utility:MouseLocation()
  969.                 if utility:GetScreenSize().Y-main_frame.Size.Y-5 > 5 then
  970.                     local move = Vector2.new(math.clamp(mouseLocation.X - window.drag.X, 5, utility:GetScreenSize().X-main_frame.Size.X-5), math.clamp(mouseLocation.Y - window.drag.Y, 5, utility:GetScreenSize().Y-main_frame.Size.Y-5))
  971.                     window:Move(move)
  972.                 else
  973.                     local move = Vector2.new(mouseLocation.X - window.drag.X, mouseLocation.Y - window.drag.Y)
  974.                     window:Move(move)
  975.                 end
  976.             end
  977.         end
  978.         --
  979.         library.began[#library.began + 1] = function(Input)
  980.             if Input.KeyCode == window.uibind then
  981.                 window:Fade()
  982.             end
  983.             --[[
  984.             if Input.KeyCode == Enum.KeyCode.P then
  985.                 local plrs = game:GetService("Players")
  986.                 local plr = plrs.LocalPlayer
  987.                 if #plrs:GetPlayers() <= 1 then
  988.                     plr:Kick("\nRejoining...")
  989.                     wait()
  990.                     game:GetService('TeleportService'):Teleport(game.PlaceId, plr)
  991.                 else
  992.                     game:GetService('TeleportService'):TeleportToPlaceInstance(game.PlaceId, game.JobId, plr)
  993.                 end
  994.             end]]
  995.         end
  996.         --
  997.         utility:Connection(uis.InputBegan,function(Input)
  998.             for _, func in pairs(library.began) do
  999.                 if not window.dragging then
  1000.                     local e,s = pcall(function()
  1001.                         func(Input)
  1002.                     end)
  1003.                 else
  1004.                     break
  1005.                 end
  1006.             end
  1007.         end)
  1008.         --
  1009.         utility:Connection(uis.InputEnded,function(Input)
  1010.             for _, func in pairs(library.ended) do
  1011.                 local e,s = pcall(function()
  1012.                     func(Input)
  1013.                 end)
  1014.             end
  1015.         end)
  1016.         --
  1017.         utility:Connection(uis.InputChanged,function()
  1018.             for _, func in pairs(library.changed) do
  1019.                 local e,s = pcall(function()
  1020.                     func()
  1021.                 end)
  1022.             end
  1023.         end)
  1024.         --
  1025.         utility:Connection(ws.CurrentCamera:GetPropertyChangedSignal("ViewportSize"),function()
  1026.             window:Move(Vector2.new((utility:GetScreenSize().X/2) - (size.X/2), (utility:GetScreenSize().Y/2) - (size.Y/2)))
  1027.         end)
  1028.         --
  1029.         return setmetatable(window, library)
  1030.     end
  1031.     --
  1032.     function library:Page(info)
  1033.         local info = info or {}
  1034.         local name = info.name or info.Name or info.title or info.Title or "New Page"
  1035.         --
  1036.         local window = self
  1037.         --
  1038.         local page = {open = false, sections = {}, sectionOffset = {left = 0, right = 0}, window = window}
  1039.         --
  1040.         local position = 4
  1041.         --
  1042.         for i,v in pairs(window.pages) do
  1043.             position = position + (v.page_button.Size.X+2)
  1044.         end
  1045.         --
  1046.         local textbounds = utility:GetTextBounds(name, theme.textsize, theme.font)
  1047.         --
  1048.         local page_button = utility:Create("Frame", {Vector2.new(position,4), window.back_frame}, {
  1049.             Size = utility:Size(0, textbounds.X+20, 0, 21),
  1050.             Position = utility:Position(0, position, 0, 4, window.back_frame),
  1051.             Color = theme.outline
  1052.         });page["page_button"] = page_button
  1053.         --
  1054.         local page_button_inline = utility:Create("Frame", {Vector2.new(1,1), page_button}, {
  1055.             Size = utility:Size(1, -2, 1, -1, page_button),
  1056.             Position = utility:Position(0, 1, 0, 1, page_button),
  1057.             Color = theme.inline
  1058.         });page["page_button_inline"] = page_button_inline
  1059.         --
  1060.         local page_button_color = utility:Create("Frame", {Vector2.new(1,1), page_button_inline}, {
  1061.             Size = utility:Size(1, -2, 1, -1, page_button_inline),
  1062.             Position = utility:Position(0, 1, 0, 1, page_button_inline),
  1063.             Color = theme.dark_contrast
  1064.         });page["page_button_color"] = page_button_color
  1065.         --
  1066.         local page_button_title = utility:Create("TextLabel", {Vector2.new(utility:Position(0.5, 0, 0, 2, page_button_color).X - page_button_color.Position.X,2), page_button_color}, {
  1067.             Text = name,
  1068.             Size = theme.textsize,
  1069.             Font = theme.font,
  1070.             Color = theme.textcolor,
  1071.             Center = true,
  1072.             OutlineColor = theme.textborder,
  1073.             Position = utility:Position(0.5, 0, 0, 2, page_button_color)
  1074.         })
  1075.         --
  1076.         window.pages[#window.pages + 1] = page
  1077.         --
  1078.         function page:Update()
  1079.             page.sectionOffset["left"] = 0
  1080.             page.sectionOffset["right"] = 0
  1081.             --
  1082.             for i,v in pairs(page.sections) do
  1083.                 utility:UpdateOffset(v.section_inline, {Vector2.new(v.side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][v.side]), window.tab_frame})
  1084.                 page.sectionOffset[v.side] = page.sectionOffset[v.side] + v.section_inline.Size.Y + 5
  1085.             end
  1086.             --
  1087.             window:Move(window.main_frame.Position)
  1088.         end
  1089.         --
  1090.         function page:Show()
  1091.             if window.currentPage then
  1092.                 window.currentPage.page_button_color.Size = utility:Size(1, -2, 1, -1, window.currentPage.page_button_inline)
  1093.                 window.currentPage.page_button_color.Color = theme.dark_contrast
  1094.                 window.currentPage.open = false
  1095.                 --
  1096.                 for i,v in pairs(window.currentPage.sections) do
  1097.                     for z,x in pairs(v.visibleContent) do
  1098.                         x.Visible = false
  1099.                     end
  1100.                 end
  1101.                 --
  1102.                 window:CloseContent()
  1103.             end
  1104.             --
  1105.             window.currentPage = page
  1106.             page_button_color.Size = utility:Size(1, -2, 1, 0, page_button_inline)
  1107.             page_button_color.Color = theme.light_contrast
  1108.             page.open = true
  1109.             --
  1110.             for i,v in pairs(page.sections) do
  1111.                 for z,x in pairs(v.visibleContent) do
  1112.                     x.Visible = true
  1113.                 end
  1114.             end
  1115.         end
  1116.         --
  1117.         library.began[#library.began + 1] = function(Input)
  1118.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and utility:MouseOverDrawing({page_button.Position.X,page_button.Position.Y,page_button.Position.X + page_button.Size.X,page_button.Position.Y + page_button.Size.Y}) and window.currentPage ~= page then
  1119.                 page:Show()
  1120.             end
  1121.         end
  1122.         --
  1123.         return setmetatable(page, pages)
  1124.     end
  1125.     --
  1126.     function pages:Section(info)
  1127.         local info = info or {}
  1128.         local name = info.name or info.Name or info.title or info.Title or "New Section"
  1129.         local side = info.side or info.Side or "left"
  1130.         side = side:lower()
  1131.         local window = self.window
  1132.         local page = self
  1133.         local section = {window = window, page = page, visibleContent = {}, currentAxis = 20, side = side}
  1134.         --
  1135.         local section_inline = utility:Create("Frame", {Vector2.new(side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][side]), window.tab_frame}, {
  1136.             Size = utility:Size(0.5, -7, 0, 22, window.tab_frame),
  1137.             Position = utility:Position(side == "right" and 0.5 or 0, side == "right" and 2 or 5, 0, 5 + page.sectionOffset[side], window.tab_frame),
  1138.             Color = theme.inline,
  1139.             Visible = page.open
  1140.         }, section.visibleContent);section["section_inline"] = section_inline
  1141.         --
  1142.         local section_outline = utility:Create("Frame", {Vector2.new(1,1), section_inline}, {
  1143.             Size = utility:Size(1, -2, 1, -2, section_inline),
  1144.             Position = utility:Position(0, 1, 0, 1, section_inline),
  1145.             Color = theme.outline,
  1146.             Visible = page.open
  1147.         }, section.visibleContent);section["section_outline"] = section_outline
  1148.         --
  1149.         local section_frame = utility:Create("Frame", {Vector2.new(1,1), section_outline}, {
  1150.             Size = utility:Size(1, -2, 1, -2, section_outline),
  1151.             Position = utility:Position(0, 1, 0, 1, section_outline),
  1152.             Color = theme.dark_contrast,
  1153.             Visible = page.open
  1154.         }, section.visibleContent);section["section_frame"] = section_frame
  1155.         --
  1156.         local section_accent = utility:Create("Frame", {Vector2.new(0,0), section_frame}, {
  1157.             Size = utility:Size(1, 0, 0, 2, section_frame),
  1158.             Position = utility:Position(0, 0, 0, 0, section_frame),
  1159.             Color = theme.accent,
  1160.             Visible = page.open
  1161.         }, section.visibleContent);section["section_accent"] = section_accent
  1162.         --
  1163.         local section_title = utility:Create("TextLabel", {Vector2.new(3,3), section_frame}, {
  1164.             Text = name,
  1165.             Size = theme.textsize,
  1166.             Font = theme.font,
  1167.             Color = theme.textcolor,
  1168.             OutlineColor = theme.textborder,
  1169.             Position = utility:Position(0, 3, 0, 3, section_frame),
  1170.             Visible = page.open
  1171.         }, section.visibleContent);section["section_title"] = section_title
  1172.         --
  1173.         function section:Update()
  1174.             section_inline.Size = utility:Size(0.5, -7, 0, section.currentAxis+4, window.tab_frame)
  1175.             section_outline.Size = utility:Size(1, -2, 1, -2, section_inline)
  1176.             section_frame.Size = utility:Size(1, -2, 1, -2, section_outline)
  1177.         end
  1178.         --
  1179.         page.sectionOffset[side] = page.sectionOffset[side] + 100 + 5
  1180.         page.sections[#page.sections + 1] = section
  1181.         --
  1182.         return setmetatable(section, sections)
  1183.     end
  1184.     --
  1185.     function pages:MultiSection(info)
  1186.         local info = info or {}
  1187.         local msections = info.sections or info.Sections or {}
  1188.         local side = info.side or info.Side or "left"
  1189.         local size = info.size or info.Size or 150
  1190.         side = side:lower()
  1191.         local window = self.window
  1192.         local page = self
  1193.         local multiSection = {window = window, page = page, sections = {}, backup = {}, visibleContent = {}, currentSection = nil, xAxis = 0, side = side}
  1194.         --
  1195.         local multiSection_inline = utility:Create("Frame", {Vector2.new(side == "right" and (window.tab_frame.Size.X/2)+2 or 5,5 + page["sectionOffset"][side]), window.tab_frame}, {
  1196.             Size = utility:Size(0.5, -7, 0, size, window.tab_frame),
  1197.             Position = utility:Position(side == "right" and 0.5 or 0, side == "right" and 2 or 5, 0, 5 + page.sectionOffset[side], window.tab_frame),
  1198.             Color = theme.inline,
  1199.             Visible = page.open
  1200.         }, multiSection.visibleContent);multiSection["section_inline"] = multiSection_inline
  1201.         --
  1202.         local multiSection_outline = utility:Create("Frame", {Vector2.new(1,1), multiSection_inline}, {
  1203.             Size = utility:Size(1, -2, 1, -2, multiSection_inline),
  1204.             Position = utility:Position(0, 1, 0, 1, multiSection_inline),
  1205.             Color = theme.outline,
  1206.             Visible = page.open
  1207.         }, multiSection.visibleContent);multiSection["section_outline"] = multiSection_outline
  1208.         --
  1209.         local multiSection_frame = utility:Create("Frame", {Vector2.new(1,1), multiSection_outline}, {
  1210.             Size = utility:Size(1, -2, 1, -2, multiSection_outline),
  1211.             Position = utility:Position(0, 1, 0, 1, multiSection_outline),
  1212.             Color = theme.dark_contrast,
  1213.             Visible = page.open
  1214.         }, multiSection.visibleContent);multiSection["section_frame"] = multiSection_frame
  1215.         --
  1216.         local multiSection_backFrame = utility:Create("Frame", {Vector2.new(0,2), multiSection_frame}, {
  1217.             Size = utility:Size(1, 0, 0, 17, multiSection_frame),
  1218.             Position = utility:Position(0, 0, 0, 2, multiSection_frame),
  1219.             Color = theme.light_contrast,
  1220.             Visible = page.open
  1221.         }, multiSection.visibleContent)
  1222.         --
  1223.         local multiSection_bottomFrame = utility:Create("Frame", {Vector2.new(0,multiSection_backFrame.Size.Y - 1), multiSection_backFrame}, {
  1224.             Size = utility:Size(1, 0, 0, 1, multiSection_backFrame),
  1225.             Position = utility:Position(0, 0, 1, -1, multiSection_backFrame),
  1226.             Color = theme.outline,
  1227.             Visible = page.open
  1228.         }, multiSection.visibleContent)
  1229.         --
  1230.         local multiSection_accent = utility:Create("Frame", {Vector2.new(0,0), multiSection_frame}, {
  1231.             Size = utility:Size(1, 0, 0, 2, multiSection_frame),
  1232.             Position = utility:Position(0, 0, 0, 0, multiSection_frame),
  1233.             Color = theme.accent,
  1234.             Visible = page.open
  1235.         }, multiSection.visibleContent);multiSection["section_accent"] = multiSection_accent
  1236.         --
  1237.         for i,v in pairs(msections) do
  1238.             local msection = {window = window, page = page, currentAxis = 24, sections = {}, visibleContent = {}, section_inline = multiSection_inline, section_outline = multiSection_outline, section_frame = multiSection_frame, section_accent = multiSection_accent}
  1239.             --
  1240.             local textBounds = utility:GetTextBounds(v, theme.textsize, theme.font)
  1241.             --
  1242.             local msection_frame = utility:Create("Frame", {Vector2.new(multiSection.xAxis,0), multiSection_backFrame}, {
  1243.                 Size = utility:Size(0, textBounds.X + 14, 1, -1, multiSection_backFrame),
  1244.                 Position = utility:Position(0, multiSection.xAxis, 0, 0, multiSection_backFrame),
  1245.                 Color = i == 1 and theme.dark_contrast or theme.light_contrast,
  1246.                 Visible = page.open
  1247.             }, multiSection.visibleContent);msection["msection_frame"] = msection_frame
  1248.             --
  1249.             local msection_line = utility:Create("Frame", {Vector2.new(msection_frame.Size.X,0), msection_frame}, {
  1250.                 Size = utility:Size(0, 1, 1, 0, msection_frame),
  1251.                 Position = utility:Position(1, 0, 0, 0, msection_frame),
  1252.                 Color = theme.outline,
  1253.                 Visible = page.open
  1254.             }, multiSection.visibleContent)
  1255.             --
  1256.             local msection_title = utility:Create("TextLabel", {Vector2.new(msection_frame.Size.X * 0.5,1), msection_frame}, {
  1257.                 Text = v,
  1258.                 Size = theme.textsize,
  1259.                 Font = theme.font,
  1260.                 Color = theme.textcolor,
  1261.                 OutlineColor = theme.textborder,
  1262.                 Center = true,
  1263.                 Position = utility:Position(0.5, 0, 0, 1, msection_frame),
  1264.                 Visible = page.open
  1265.             }, multiSection.visibleContent)
  1266.             --
  1267.             local msection_bottomline = utility:Create("Frame", {Vector2.new(0,msection_frame.Size.Y), msection_frame}, {
  1268.                 Size = utility:Size(1, 0, 0, 1, msection_frame),
  1269.                 Position = utility:Position(0, 0, 1, 0, msection_frame),
  1270.                 Color = i == 1 and theme.dark_contrast or theme.outline,
  1271.                 Visible = page.open
  1272.             }, multiSection.visibleContent);msection["msection_bottomline"] = msection_bottomline
  1273.             --
  1274.             function msection:Update()
  1275.                 if multiSection.currentSection == msection then
  1276.                     multiSection.visibleContent = utility:Combine(multiSection.backup, multiSection.currentSection.visibleContent)
  1277.                 else
  1278.                     for z,x in pairs(msection.visibleContent) do
  1279.                         x.Visible = false
  1280.                     end
  1281.                 end
  1282.             end
  1283.             --
  1284.             library.began[#library.began + 1] = function(Input)
  1285.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and page.open and  utility:MouseOverDrawing({msection_frame.Position.X,msection_frame.Position.Y,msection_frame.Position.X + msection_frame.Size.X,msection_frame.Position.Y + msection_frame.Size.Y}) and multiSection.currentSection ~= msection and not window:IsOverContent() then
  1286.                     multiSection.currentSection.msection_frame.Color = theme.light_contrast
  1287.                     multiSection.currentSection.msection_bottomline.Color = theme.outline
  1288.                     --
  1289.                     for i,v in pairs(multiSection.currentSection.visibleContent) do
  1290.                         v.Visible = false
  1291.                     end
  1292.                     --
  1293.                     multiSection.currentSection = msection
  1294.                     msection_frame.Color = theme.dark_contrast
  1295.                     msection_bottomline.Color = theme.dark_contrast
  1296.                     --
  1297.                     for i,v in pairs(multiSection.currentSection.visibleContent) do
  1298.                         v.Visible = true
  1299.                     end
  1300.                     --
  1301.                     multiSection.visibleContent = utility:Combine(multiSection.backup, multiSection.currentSection.visibleContent)
  1302.                 end
  1303.             end
  1304.             --
  1305.             if i == 1 then
  1306.                 multiSection.currentSection = msection
  1307.             end
  1308.             --
  1309.             multiSection.sections[#multiSection.sections + 1] = setmetatable(msection, sections)
  1310.             multiSection.xAxis = multiSection.xAxis + textBounds.X + 15
  1311.         end
  1312.         --
  1313.         for z,x in pairs(multiSection.visibleContent) do
  1314.             multiSection.backup[z] = x
  1315.         end
  1316.         --
  1317.         page.sectionOffset[side] = page.sectionOffset[side] + 100 + 5
  1318.         page.sections[#page.sections + 1] = multiSection
  1319.         --
  1320.         return table.unpack(multiSection.sections)
  1321.     end
  1322.     --
  1323.     function sections:Label(info)
  1324.         local info = info or {}
  1325.         local name = info.name or info.Name or info.title or info.Title or "New Label"
  1326.         local middle = info.middle or info.Middle or false
  1327.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  1328.         --
  1329.         local window = self.window
  1330.         local page = self.page
  1331.         local section = self
  1332.         --
  1333.         local label = {axis = section.currentAxis}
  1334.         --
  1335.         local label_title = utility:Create("TextLabel", {Vector2.new(middle and (section.section_frame.Size.X/2) or 4,label.axis), section.section_frame}, {
  1336.             Text = name,
  1337.             Size = theme.textsize,
  1338.             Font = theme.font,
  1339.             Color = theme.textcolor,
  1340.             OutlineColor = theme.textborder,
  1341.             Center = middle,
  1342.             Position = utility:Position(middle and 0.5 or 0, middle and 0 or 4, 0, 0, section.section_frame),
  1343.             Visible = page.open
  1344.         }, section.visibleContent)
  1345.         --
  1346.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  1347.             library.pointers[tostring(pointer)] = label
  1348.         end
  1349.         --
  1350.         section.currentAxis = section.currentAxis + label_title.TextBounds.Y + 4
  1351.         section:Update()
  1352.         --
  1353.         return label
  1354.     end
  1355.     --
  1356.     function sections:Toggle(info)
  1357.         local info = info or {}
  1358.         local name = info.name or info.Name or info.title or info.Title or "New Toggle"
  1359.         local def = info.def or info.Def or info.default or info.Default or false
  1360.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  1361.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  1362.         --
  1363.         local window = self.window
  1364.         local page = self.page
  1365.         local section = self
  1366.         --
  1367.         local toggle = {axis = section.currentAxis, current = def, addedAxis = 0, colorpickers = 0, keybind = nil}
  1368.         --
  1369.         local toggle_outline = utility:Create("Frame", {Vector2.new(4,toggle.axis), section.section_frame}, {
  1370.             Size = utility:Size(0, 15, 0, 15),
  1371.             Position = utility:Position(0, 4, 0, toggle.axis, section.section_frame),
  1372.             Color = theme.outline,
  1373.             Visible = page.open
  1374.         }, section.visibleContent)
  1375.         --
  1376.         local toggle_inline = utility:Create("Frame", {Vector2.new(1,1), toggle_outline}, {
  1377.             Size = utility:Size(1, -2, 1, -2, toggle_outline),
  1378.             Position = utility:Position(0, 1, 0, 1, toggle_outline),
  1379.             Color = theme.inline,
  1380.             Visible = page.open
  1381.         }, section.visibleContent)
  1382.         --
  1383.         local toggle_frame = utility:Create("Frame", {Vector2.new(1,1), toggle_inline}, {
  1384.             Size = utility:Size(1, -2, 1, -2, toggle_inline),
  1385.             Position = utility:Position(0, 1, 0, 1, toggle_inline),
  1386.             Color = toggle.current == true and theme.accent or theme.light_contrast,
  1387.             Visible = page.open
  1388.         }, section.visibleContent)
  1389.         --
  1390.         local toggle__gradient = utility:Create("Image", {Vector2.new(0,0), toggle_frame}, {
  1391.             Size = utility:Size(1, 0, 1, 0, toggle_frame),
  1392.             Position = utility:Position(0, 0, 0 , 0, toggle_frame),
  1393.             Transparency = 0.5,
  1394.             Visible = page.open
  1395.         }, section.visibleContent)
  1396.         --
  1397.         local toggle_title = utility:Create("TextLabel", {Vector2.new(23,toggle.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  1398.             Text = name,
  1399.             Size = theme.textsize,
  1400.             Font = theme.font,
  1401.             Color = theme.textcolor,
  1402.             OutlineColor = theme.textborder,
  1403.             Position = utility:Position(0, 23, 0, toggle.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  1404.             Visible = page.open
  1405.         }, section.visibleContent)
  1406.         --
  1407.         utility:LoadImage(toggle__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  1408.         --
  1409.         function toggle:Get()
  1410.             return toggle.current
  1411.         end
  1412.         --
  1413.         function toggle:Set(bool)
  1414.             if bool or not bool then
  1415.                 toggle.current = bool
  1416.                 toggle_frame.Color = toggle.current == true and theme.accent or theme.light_contrast
  1417.                 --
  1418.                 callback(toggle.current)
  1419.             end
  1420.         end
  1421.         --
  1422.         library.began[#library.began + 1] = function(Input)
  1423.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and toggle_outline.Visible and window.isVisible and page.open and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + toggle.axis, section.section_frame.Position.X + section.section_frame.Size.X - toggle.addedAxis, section.section_frame.Position.Y + toggle.axis + 15}) and not window:IsOverContent() then
  1424.                 toggle.current = not toggle.current
  1425.                 toggle_frame.Color = toggle.current == true and theme.accent or theme.light_contrast
  1426.                 --
  1427.                 callback(toggle.current)
  1428.                 --
  1429.                 if toggle.keybind and toggle.keybind.active then toggle.keybind.active = false window.keybindslist:Remove(toggle.keybind.keybindname) end
  1430.             end
  1431.         end
  1432.         --
  1433.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  1434.             library.pointers[tostring(pointer)] = toggle
  1435.         end
  1436.         --
  1437.         section.currentAxis = section.currentAxis + 15 + 4
  1438.         section:Update()
  1439.         --
  1440.         function toggle:Colorpicker(info)
  1441.             local info = info or {}
  1442.             local cpinfo = info.info or info.Info or name
  1443.             local def = info.def or info.Def or info.default or info.Default or Color3.fromRGB(255, 0, 0)
  1444.             local transp = info.transparency or info.Transparency or info.transp or info.Transp or info.alpha or info.Alpha or nil
  1445.             local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  1446.             local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  1447.             --
  1448.             local hh, ss, vv = def:ToHSV()
  1449.             local colorpicker = {toggle, axis = toggle.axis, index = toggle.colorpickers, current = {hh, ss, vv , (transp or 0)}, holding = {picker = false, huepicker = false, transparency = false}, holder = {inline = nil, picker = nil, picker_cursor = nil, huepicker = nil, huepicker_cursor = {}, transparency = nil, transparencybg = nil, transparency_cursor = {}, drawings = {}}}
  1450.             --
  1451.             local colorpicker_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(toggle.colorpickers == 0 and (30+4) or (64 + 4)),colorpicker.axis), section.section_frame}, {
  1452.                 Size = utility:Size(0, 30, 0, 15),
  1453.                 Position = utility:Position(1, -(toggle.colorpickers == 0 and (30+4) or (64 + 4)), 0, colorpicker.axis, section.section_frame),
  1454.                 Color = theme.outline,
  1455.                 Visible = page.open
  1456.             }, section.visibleContent)
  1457.             --
  1458.             local colorpicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_outline}, {
  1459.                 Size = utility:Size(1, -2, 1, -2, colorpicker_outline),
  1460.                 Position = utility:Position(0, 1, 0, 1, colorpicker_outline),
  1461.                 Color = theme.inline,
  1462.                 Visible = page.open
  1463.             }, section.visibleContent)
  1464.             --
  1465.             local colorpicker__transparency
  1466.             if transp then
  1467.                 colorpicker__transparency = utility:Create("Image", {Vector2.new(1,1), colorpicker_inline}, {
  1468.                     Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  1469.                     Position = utility:Position(0, 1, 0 , 1, colorpicker_inline),
  1470.                     Visible = page.open
  1471.                 }, section.visibleContent)
  1472.             end
  1473.             --
  1474.             local colorpicker_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_inline}, {
  1475.                 Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  1476.                 Position = utility:Position(0, 1, 0, 1, colorpicker_inline),
  1477.                 Color = def,
  1478.                 Transparency = transp and (1 - transp) or 1,
  1479.                 Visible = page.open
  1480.             }, section.visibleContent)
  1481.             --
  1482.             local colorpicker__gradient = utility:Create("Image", {Vector2.new(0,0), colorpicker_frame}, {
  1483.                 Size = utility:Size(1, 0, 1, 0, colorpicker_frame),
  1484.                 Position = utility:Position(0, 0, 0 , 0, colorpicker_frame),
  1485.                 Transparency = 0.5,
  1486.                 Visible = page.open
  1487.             }, section.visibleContent)
  1488.             --
  1489.             if transp then
  1490.                 utility:LoadImage(colorpicker__transparency, "cptransp", "https://i.imgur.com/IIPee2A.png")
  1491.             end
  1492.             utility:LoadImage(colorpicker__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  1493.             --
  1494.             function colorpicker:Set(color, transp_val)
  1495.                 if typeof(color) == "table" then
  1496.                     if color.Color and color.Transparency then
  1497.                         local h, s, v = table.unpack(color.Color)
  1498.                         colorpicker.current = {h, s, v , color.Transparency}
  1499.                         colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1500.                         colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  1501.                         callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  1502.                     else
  1503.                         colorpicker.current = color
  1504.                         colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1505.                         colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  1506.                         callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  1507.                     end
  1508.                 elseif typeof(color) == "color3" then
  1509.                     local h, s, v = color:ToHSV()
  1510.                     colorpicker.current = {h, s, v, (transp_val or 0)}
  1511.                     colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1512.                     colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  1513.                     callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  1514.                 end
  1515.             end
  1516.             --
  1517.             function colorpicker:Refresh()
  1518.                 local mouseLocation = utility:MouseLocation()
  1519.                 if colorpicker.open and colorpicker.holder.picker and colorpicker.holding.picker then
  1520.                     colorpicker.current[2] = math.clamp(mouseLocation.X - colorpicker.holder.picker.Position.X, 0, colorpicker.holder.picker.Size.X) / colorpicker.holder.picker.Size.X
  1521.                     --
  1522.                     colorpicker.current[3] = 1-(math.clamp(mouseLocation.Y - colorpicker.holder.picker.Position.Y, 0, colorpicker.holder.picker.Size.Y) / colorpicker.holder.picker.Size.Y)
  1523.                     --
  1524.                     colorpicker.holder.picker_cursor.Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker.holder.picker)
  1525.                     --
  1526.                     utility:UpdateOffset(colorpicker.holder.picker_cursor, {Vector2.new((colorpicker.holder.picker.Size.X*colorpicker.current[2])-3,(colorpicker.holder.picker.Size.Y*(1-colorpicker.current[3]))-3), colorpicker.holder.picker})
  1527.                     --
  1528.                     if colorpicker.holder.transparencybg then
  1529.                         colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1530.                     end
  1531.                 elseif colorpicker.open and colorpicker.holder.huepicker and colorpicker.holding.huepicker then
  1532.                     colorpicker.current[1] = (math.clamp(mouseLocation.Y - colorpicker.holder.huepicker.Position.Y, 0, colorpicker.holder.huepicker.Size.Y) / colorpicker.holder.huepicker.Size.Y)
  1533.                     --
  1534.                     colorpicker.holder.huepicker_cursor[1].Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker.holder.huepicker)
  1535.                     colorpicker.holder.huepicker_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[1])
  1536.                     colorpicker.holder.huepicker_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[2])
  1537.                     colorpicker.holder.huepicker_cursor[3].Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  1538.                     --
  1539.                     utility:UpdateOffset(colorpicker.holder.huepicker_cursor[1], {Vector2.new(-3,(colorpicker.holder.huepicker.Size.Y*colorpicker.current[1])-3), colorpicker.holder.huepicker})
  1540.                     --
  1541.                     colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  1542.                     --
  1543.                     if colorpicker.holder.transparency_cursor and colorpicker.holder.transparency_cursor[3] then
  1544.                         colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  1545.                     end
  1546.                     --
  1547.                     if colorpicker.holder.transparencybg then
  1548.                         colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1549.                     end
  1550.                 elseif colorpicker.open and colorpicker.holder.transparency and colorpicker.holding.transparency then
  1551.                     colorpicker.current[4] = 1 - (math.clamp(mouseLocation.X - colorpicker.holder.transparency.Position.X, 0, colorpicker.holder.transparency.Size.X) / colorpicker.holder.transparency.Size.X)
  1552.                     --
  1553.                     colorpicker.holder.transparency_cursor[1].Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker.holder.transparency)
  1554.                     colorpicker.holder.transparency_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[1])
  1555.                     colorpicker.holder.transparency_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[2])
  1556.                     colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  1557.                     colorpicker_frame.Transparency = (1 - colorpicker.current[4])
  1558.                     --
  1559.                     utility:UpdateTransparency(colorpicker_frame, (1 - colorpicker.current[4]))
  1560.                     utility:UpdateOffset(colorpicker.holder.transparency_cursor[1], {Vector2.new((colorpicker.holder.transparency.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker.holder.transparency})
  1561.                     --
  1562.                     colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  1563.                 end
  1564.                 --
  1565.                 colorpicker:Set(colorpicker.current)
  1566.             end
  1567.             --
  1568.             function colorpicker:Get()
  1569.                 return {Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), Transparency = colorpicker.current[4]}
  1570.             end
  1571.             --
  1572.             library.began[#library.began + 1] = function(Input)
  1573.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and colorpicker_outline.Visible then
  1574.                     if colorpicker.open and colorpicker.holder.inline and utility:MouseOverDrawing({colorpicker.holder.inline.Position.X, colorpicker.holder.inline.Position.Y, colorpicker.holder.inline.Position.X + colorpicker.holder.inline.Size.X, colorpicker.holder.inline.Position.Y + colorpicker.holder.inline.Size.Y}) then
  1575.                         if colorpicker.holder.picker and utility:MouseOverDrawing({colorpicker.holder.picker.Position.X - 2, colorpicker.holder.picker.Position.Y - 2, colorpicker.holder.picker.Position.X - 2 + colorpicker.holder.picker.Size.X + 4, colorpicker.holder.picker.Position.Y - 2 + colorpicker.holder.picker.Size.Y + 4}) then
  1576.                             colorpicker.holding.picker = true
  1577.                             colorpicker:Refresh()
  1578.                         elseif colorpicker.holder.huepicker and utility:MouseOverDrawing({colorpicker.holder.huepicker.Position.X - 2, colorpicker.holder.huepicker.Position.Y - 2, colorpicker.holder.huepicker.Position.X - 2 + colorpicker.holder.huepicker.Size.X + 4, colorpicker.holder.huepicker.Position.Y - 2 + colorpicker.holder.huepicker.Size.Y + 4}) then
  1579.                             colorpicker.holding.huepicker = true
  1580.                             colorpicker:Refresh()
  1581.                         elseif colorpicker.holder.transparency and utility:MouseOverDrawing({colorpicker.holder.transparency.Position.X - 2, colorpicker.holder.transparency.Position.Y - 2, colorpicker.holder.transparency.Position.X - 2 + colorpicker.holder.transparency.Size.X + 4, colorpicker.holder.transparency.Position.Y - 2 + colorpicker.holder.transparency.Size.Y + 4}) then
  1582.                             colorpicker.holding.transparency = true
  1583.                             colorpicker:Refresh()
  1584.                         end
  1585.                     elseif utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (colorpicker.index == 0 and (30 + 4 + 2) or (64 + 4 + 2))), section.section_frame.Position.Y + colorpicker.axis, section.section_frame.Position.X + section.section_frame.Size.X - (colorpicker.index == 1 and 36 or 0), section.section_frame.Position.Y + colorpicker.axis + 15}) and not window:IsOverContent() then
  1586.                         if not colorpicker.open then
  1587.                             window:CloseContent()
  1588.                             colorpicker.open = not colorpicker.open
  1589.                             --
  1590.                             local colorpicker_open_outline = utility:Create("Frame", {Vector2.new(4,colorpicker.axis + 19), section.section_frame}, {
  1591.                                 Size = utility:Size(1, -8, 0, transp and 219 or 200, section.section_frame),
  1592.                                 Position = utility:Position(0, 4, 0, colorpicker.axis + 19, section.section_frame),
  1593.                                 Color = theme.outline
  1594.                             }, colorpicker.holder.drawings);colorpicker.holder.inline = colorpicker_open_outline
  1595.                             --
  1596.                             local colorpicker_open_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_outline}, {
  1597.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_outline),
  1598.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_outline),
  1599.                                 Color = theme.inline
  1600.                             }, colorpicker.holder.drawings)
  1601.                             --
  1602.                             local colorpicker_open_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_inline}, {
  1603.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_inline),
  1604.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_inline),
  1605.                                 Color = theme.dark_contrast
  1606.                             }, colorpicker.holder.drawings)
  1607.                             --
  1608.                             local colorpicker_open_accent = utility:Create("Frame", {Vector2.new(0,0), colorpicker_open_frame}, {
  1609.                                 Size = utility:Size(1, 0, 0, 2, colorpicker_open_frame),
  1610.                                 Position = utility:Position(0, 0, 0, 0, colorpicker_open_frame),
  1611.                                 Color = theme.accent
  1612.                             }, colorpicker.holder.drawings)
  1613.                             --
  1614.                             local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,2), colorpicker_open_frame}, {
  1615.                                 Text = cpinfo,
  1616.                                 Size = theme.textsize,
  1617.                                 Font = theme.font,
  1618.                                 Color = theme.textcolor,
  1619.                                 OutlineColor = theme.textborder,
  1620.                                 Position = utility:Position(0, 4, 0, 2, colorpicker_open_frame),
  1621.                             }, colorpicker.holder.drawings)
  1622.                             --
  1623.                             local colorpicker_open_picker_outline = utility:Create("Frame", {Vector2.new(4,17), colorpicker_open_frame}, {
  1624.                                 Size = utility:Size(1, -27, 1, transp and -40 or -21, colorpicker_open_frame),
  1625.                                 Position = utility:Position(0, 4, 0, 17, colorpicker_open_frame),
  1626.                                 Color = theme.outline
  1627.                             }, colorpicker.holder.drawings)
  1628.                             --
  1629.                             local colorpicker_open_picker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_outline}, {
  1630.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_outline),
  1631.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_outline),
  1632.                                 Color = theme.inline
  1633.                             }, colorpicker.holder.drawings)
  1634.                             --
  1635.                             local colorpicker_open_picker_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_inline}, {
  1636.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_inline),
  1637.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_inline),
  1638.                                 Color = Color3.fromHSV(colorpicker.current[1],1,1)
  1639.                             }, colorpicker.holder.drawings);colorpicker.holder.background = colorpicker_open_picker_bg
  1640.                             --
  1641.                             local colorpicker_open_picker_image = utility:Create("Image", {Vector2.new(0,0), colorpicker_open_picker_bg}, {
  1642.                                 Size = utility:Size(1, 0, 1, 0, colorpicker_open_picker_bg),
  1643.                                 Position = utility:Position(0, 0, 0 , 0, colorpicker_open_picker_bg),
  1644.                             }, colorpicker.holder.drawings);colorpicker.holder.picker = colorpicker_open_picker_image
  1645.                             --
  1646.                             local colorpicker_open_picker_cursor = utility:Create("Image", {Vector2.new((colorpicker_open_picker_image.Size.X*colorpicker.current[2])-3,(colorpicker_open_picker_image.Size.Y*(1-colorpicker.current[3]))-3), colorpicker_open_picker_image}, {
  1647.                                 Size = utility:Size(0, 6, 0, 6, colorpicker_open_picker_image),
  1648.                                 Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker_open_picker_image),
  1649.                             }, colorpicker.holder.drawings);colorpicker.holder.picker_cursor = colorpicker_open_picker_cursor
  1650.                             --
  1651.                             local colorpicker_open_huepicker_outline = utility:Create("Frame", {Vector2.new(colorpicker_open_frame.Size.X-19,17), colorpicker_open_frame}, {
  1652.                                 Size = utility:Size(0, 15, 1, transp and -40 or -21, colorpicker_open_frame),
  1653.                                 Position = utility:Position(1, -19, 0, 17, colorpicker_open_frame),
  1654.                                 Color = theme.outline
  1655.                             }, colorpicker.holder.drawings)
  1656.                             --
  1657.                             local colorpicker_open_huepicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_outline}, {
  1658.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_outline),
  1659.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_outline),
  1660.                                 Color = theme.inline
  1661.                             }, colorpicker.holder.drawings)
  1662.                             --
  1663.                             local colorpicker_open_huepicker_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_huepicker_inline}, {
  1664.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_inline),
  1665.                                 Position = utility:Position(0, 1, 0 , 1, colorpicker_open_huepicker_inline),
  1666.                             }, colorpicker.holder.drawings);colorpicker.holder.huepicker = colorpicker_open_huepicker_image
  1667.                             --
  1668.                             local colorpicker_open_huepicker_cursor_outline = utility:Create("Frame", {Vector2.new(-3,(colorpicker_open_huepicker_image.Size.Y*colorpicker.current[1])-3), colorpicker_open_huepicker_image}, {
  1669.                                 Size = utility:Size(1, 6, 0, 6, colorpicker_open_huepicker_image),
  1670.                                 Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker_open_huepicker_image),
  1671.                                 Color = theme.outline
  1672.                             }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[1] = colorpicker_open_huepicker_cursor_outline
  1673.                             --
  1674.                             local colorpicker_open_huepicker_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_outline}, {
  1675.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_outline),
  1676.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_outline),
  1677.                                 Color = theme.textcolor
  1678.                             }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[2] = colorpicker_open_huepicker_cursor_inline
  1679.                             --
  1680.                             local colorpicker_open_huepicker_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_inline}, {
  1681.                                 Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_inline),
  1682.                                 Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_inline),
  1683.                                 Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  1684.                             }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[3] = colorpicker_open_huepicker_cursor_color
  1685.                             --
  1686.                             if transp then
  1687.                                 local colorpicker_open_transparency_outline = utility:Create("Frame", {Vector2.new(4,colorpicker_open_frame.Size.X-19), colorpicker_open_frame}, {
  1688.                                     Size = utility:Size(1, -27, 0, 15, colorpicker_open_frame),
  1689.                                     Position = utility:Position(0, 4, 1, -19, colorpicker_open_frame),
  1690.                                     Color = theme.outline
  1691.                                 }, colorpicker.holder.drawings)
  1692.                                 --
  1693.                                 local colorpicker_open_transparency_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_outline}, {
  1694.                                     Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_outline),
  1695.                                     Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_outline),
  1696.                                     Color = theme.inline
  1697.                                 }, colorpicker.holder.drawings)
  1698.                                 --
  1699.                                 local colorpicker_open_transparency_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  1700.                                     Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  1701.                                     Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_inline),
  1702.                                     Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  1703.                                 }, colorpicker.holder.drawings);colorpicker.holder.transparencybg = colorpicker_open_transparency_bg
  1704.                                 --
  1705.                                 local colorpicker_open_transparency_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_transparency_inline}, {
  1706.                                     Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_inline),
  1707.                                     Position = utility:Position(0, 1, 0 , 1, colorpicker_open_transparency_inline),
  1708.                                 }, colorpicker.holder.drawings);colorpicker.holder.transparency = colorpicker_open_transparency_image
  1709.                                 --
  1710.                                 local colorpicker_open_transparency_cursor_outline = utility:Create("Frame", {Vector2.new((colorpicker_open_transparency_image.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker_open_transparency_image}, {
  1711.                                     Size = utility:Size(0, 6, 1, 6, colorpicker_open_transparency_image),
  1712.                                     Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker_open_transparency_image),
  1713.                                     Color = theme.outline
  1714.                                 }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[1] = colorpicker_open_transparency_cursor_outline
  1715.                                 --
  1716.                                 local colorpicker_open_transparency_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_outline}, {
  1717.                                     Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_outline),
  1718.                                     Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_outline),
  1719.                                     Color = theme.textcolor
  1720.                                 }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[2] = colorpicker_open_transparency_cursor_inline
  1721.                                 --
  1722.                                 local colorpicker_open_transparency_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_transparency_cursor_inline}, {
  1723.                                     Size = utility:Size(1, -2, 1, -2, colorpicker_open_transparency_cursor_inline),
  1724.                                     Position = utility:Position(0, 1, 0, 1, colorpicker_open_transparency_cursor_inline),
  1725.                                     Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4]),
  1726.                                 }, colorpicker.holder.drawings);colorpicker.holder.transparency_cursor[3] = colorpicker_open_transparency_cursor_color
  1727.                                 --
  1728.                                 utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/ncssKbH.png")
  1729.                                 --utility:LoadImage(colorpicker_open_transparency_image, "transp", "https://i.imgur.com/VcMAYjL.png")
  1730.                             end
  1731.                             --
  1732.                             utility:LoadImage(colorpicker_open_picker_image, "valsat", "https://i.imgur.com/wpDRqVH.png")
  1733.                             utility:LoadImage(colorpicker_open_picker_cursor, "valsat_cursor", "https://raw.githubusercontent.com/mvonwalk/splix-assets/main/Images-cursor.png")
  1734.                             utility:LoadImage(colorpicker_open_huepicker_image, "hue", "https://i.imgur.com/iEOsHFv.png")
  1735.                             --
  1736.                             window.currentContent.frame = colorpicker_open_inline
  1737.                             window.currentContent.colorpicker = colorpicker
  1738.                         else
  1739.                             colorpicker.open = not colorpicker.open
  1740.                             --
  1741.                             for i,v in pairs(colorpicker.holder.drawings) do
  1742.                                 utility:Remove(v)
  1743.                             end
  1744.                             --
  1745.                             colorpicker.holder.drawings = {}
  1746.                             colorpicker.holder.inline = nil
  1747.                             --
  1748.                             window.currentContent.frame = nil
  1749.                             window.currentContent.colorpicker = nil
  1750.                         end
  1751.                     else
  1752.                         if colorpicker.open then
  1753.                             colorpicker.open = not colorpicker.open
  1754.                             --
  1755.                             for i,v in pairs(colorpicker.holder.drawings) do
  1756.                                 utility:Remove(v)
  1757.                             end
  1758.                             --
  1759.                             colorpicker.holder.drawings = {}
  1760.                             colorpicker.holder.inline = nil
  1761.                             --
  1762.                             window.currentContent.frame = nil
  1763.                             window.currentContent.colorpicker = nil
  1764.                         end
  1765.                     end
  1766.                 elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and colorpicker.open then
  1767.                     colorpicker.open = not colorpicker.open
  1768.                     --
  1769.                     for i,v in pairs(colorpicker.holder.drawings) do
  1770.                         utility:Remove(v)
  1771.                     end
  1772.                     --
  1773.                     colorpicker.holder.drawings = {}
  1774.                     colorpicker.holder.inline = nil
  1775.                     --
  1776.                     window.currentContent.frame = nil
  1777.                     window.currentContent.colorpicker = nil
  1778.                 end
  1779.             end
  1780.             --
  1781.             library.ended[#library.ended + 1] = function(Input)
  1782.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1783.                     if colorpicker.holding.picker then
  1784.                         colorpicker.holding.picker = not colorpicker.holding.picker
  1785.                     end
  1786.                     if colorpicker.holding.huepicker then
  1787.                         colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  1788.                     end
  1789.                     if colorpicker.holding.transparency then
  1790.                         colorpicker.holding.transparency = not colorpicker.holding.transparency
  1791.                     end
  1792.                 end
  1793.             end
  1794.             --
  1795.             library.changed[#library.changed + 1] = function()
  1796.                 if colorpicker.open and colorpicker.holding.picker or colorpicker.holding.huepicker or colorpicker.holding.transparency then
  1797.                     if window.isVisible then
  1798.                         colorpicker:Refresh()
  1799.                     else
  1800.                         if colorpicker.holding.picker then
  1801.                             colorpicker.holding.picker = not colorpicker.holding.picker
  1802.                         end
  1803.                         if colorpicker.holding.huepicker then
  1804.                             colorpicker.holding.huepicker = not colorpicker.holding.huepicker
  1805.                         end
  1806.                         if colorpicker.holding.transparency then
  1807.                             colorpicker.holding.transparency = not colorpicker.holding.transparency
  1808.                         end
  1809.                     end
  1810.                 end
  1811.             end
  1812.             --
  1813.             if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  1814.                 library.pointers[tostring(pointer)] = colorpicker
  1815.             end
  1816.             --
  1817.             toggle.addedAxis = toggle.addedAxis + 30 + 4 + 2
  1818.             toggle.colorpickers = toggle.colorpickers + 1
  1819.             section:Update()
  1820.             --
  1821.             return colorpicker, toggle
  1822.         end
  1823.         --
  1824.         function toggle:Keybind(info)
  1825.             local info = info or {}
  1826.             local def = info.def or info.Def or info.default or info.Default or nil
  1827.             local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  1828.             local mode = info.mode or info.Mode or "Always"
  1829.             local keybindname = info.keybindname or info.keybindName or info.KeybindName or info.Keybindname or nil
  1830.             local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  1831.             --
  1832.             toggle.addedaxis = toggle.addedAxis + 40 + 4 + 2
  1833.             --
  1834.             local keybind = {keybindname = keybindname or name, axis = toggle.axis, current = {}, selecting = false, mode = mode, open = false, modemenu = {buttons = {}, drawings = {}}, active = false}
  1835.             --
  1836.             toggle.keybind = keybind
  1837.             --
  1838.             local allowedKeyCodes = {"Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","One","Two","Three","Four","Five","Six","Seveen","Eight","Nine","0","Insert","Tab","Home","End","LeftAlt","LeftControl","LeftShift","RightAlt","RightControl","RightShift","CapsLock"}
  1839.             local allowedInputTypes = {"MouseButton1","MouseButton2","MouseButton3"}
  1840.             local shortenedInputs = {["MouseButton1"] = "MB1", ["MouseButton2"] = "MB2", ["MouseButton3"] = "MB3", ["Insert"] = "Ins", ["LeftAlt"] = "LAlt", ["LeftControl"] = "LC", ["LeftShift"] = "LS", ["RightAlt"] = "RAlt", ["RightControl"] = "RC", ["RightShift"] = "RS", ["CapsLock"] = "Caps"}
  1841.             --
  1842.             local keybind_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(40+4),keybind.axis), section.section_frame}, {
  1843.                 Size = utility:Size(0, 40, 0, 17),
  1844.                 Position = utility:Position(1, -(40+4), 0, keybind.axis, section.section_frame),
  1845.                 Color = theme.outline,
  1846.                 Visible = page.open
  1847.             }, section.visibleContent)
  1848.             --
  1849.             local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  1850.                 Size = utility:Size(1, -2, 1, -2, keybind_outline),
  1851.                 Position = utility:Position(0, 1, 0, 1, keybind_outline),
  1852.                 Color = theme.inline,
  1853.                 Visible = page.open
  1854.             }, section.visibleContent)
  1855.             --
  1856.             local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  1857.                 Size = utility:Size(1, -2, 1, -2, keybind_inline),
  1858.                 Position = utility:Position(0, 1, 0, 1, keybind_inline),
  1859.                 Color = theme.light_contrast,
  1860.                 Visible = page.open
  1861.             }, section.visibleContent)
  1862.             --
  1863.             local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), keybind_frame}, {
  1864.                 Size = utility:Size(1, 0, 1, 0, keybind_frame),
  1865.                 Position = utility:Position(0, 0, 0 , 0, keybind_frame),
  1866.                 Transparency = 0.5,
  1867.                 Visible = page.open
  1868.             }, section.visibleContent)
  1869.             --
  1870.             local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X/2,1), keybind_outline}, {
  1871.                 Text = "...",
  1872.                 Size = theme.textsize,
  1873.                 Font = theme.font,
  1874.                 Color = theme.textcolor,
  1875.                 OutlineColor = theme.textborder,
  1876.                 Center = true,
  1877.                 Position = utility:Position(0.5, 0, 1, 0, keybind_outline),
  1878.                 Visible = page.open
  1879.             }, section.visibleContent)
  1880.             --
  1881.             utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  1882.             --
  1883.             function keybind:Shorten(string)
  1884.                 for i,v in pairs(shortenedInputs) do
  1885.                     string = string.gsub(string, i, v)
  1886.                 end
  1887.                 return string
  1888.             end
  1889.             --
  1890.             function keybind:Change(input)
  1891.                 input = input or "..."
  1892.                 local inputTable = {}
  1893.                 --
  1894.                 if input.EnumType then
  1895.                     if input.EnumType == Enum.KeyCode or input.EnumType == Enum.UserInputType then
  1896.                         if table.find(allowedKeyCodes, input.Name) or table.find(allowedInputTypes, input.Name) then
  1897.                             inputTable = {input.EnumType == Enum.KeyCode and "KeyCode" or "UserInputType", input.Name}
  1898.                             --
  1899.                             keybind.current = inputTable
  1900.                             keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  1901.                             --
  1902.                             return true
  1903.                         end
  1904.                     end
  1905.                 end
  1906.                 --
  1907.                 return false
  1908.             end
  1909.             --
  1910.             function keybind:Get()
  1911.                 return keybind.current
  1912.             end
  1913.             --
  1914.             function keybind:Set(tbl)
  1915.                 keybind.current = tbl
  1916.                 keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  1917.             end
  1918.             --
  1919.             function keybind:Active()
  1920.                 return keybind.active
  1921.             end
  1922.             --
  1923.             function keybind:Reset()
  1924.                 for i,v in pairs(keybind.modemenu.buttons) do
  1925.                     v.Color = v.Text == keybind.mode and theme.accent or theme.textcolor
  1926.                 end
  1927.                 --
  1928.                 keybind.active = keybind.mode == "Always" and true or false
  1929.                 if keybind.current[1] and keybind.current[2] then
  1930.                     callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  1931.                 end
  1932.             end
  1933.             --
  1934.             keybind:Change(def)
  1935.             --
  1936.             library.began[#library.began + 1] = function(Input)
  1937.                 if keybind.current[1] and keybind.current[2] then
  1938.                     if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  1939.                         if keybind.mode == "Hold" then
  1940.                             local old = keybind.active
  1941.                             keybind.active = toggle:Get()
  1942.                             if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  1943.                             if keybind.active ~= old then callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active) end
  1944.                         elseif keybind.mode == "Toggle" then
  1945.                             local old = keybind.active
  1946.                             keybind.active = not keybind.active == true and toggle:Get() or false
  1947.                             if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  1948.                             if keybind.active ~= old then callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active) end
  1949.                         end
  1950.                     end
  1951.                 end
  1952.                 --
  1953.                 if keybind.selecting and window.isVisible then
  1954.                     local done = keybind:Change(Input.KeyCode.Name ~= "Unknown" and Input.KeyCode or Input.UserInputType)
  1955.                     if done then
  1956.                         keybind.selecting = false
  1957.                         keybind.active = keybind.mode == "Always" and true or false
  1958.                         keybind_frame.Color = theme.light_contrast
  1959.                         --
  1960.                         window.keybindslist:Remove(keybindname or name)
  1961.                         callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  1962.                     end
  1963.                 end
  1964.                 --
  1965.                 if not window.isVisible and keybind.selecting then
  1966.                     keybind.selecting = false
  1967.                     keybind_frame.Color = theme.light_contrast
  1968.                 end
  1969.                 --
  1970.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and keybind_outline.Visible then
  1971.                     if utility:MouseOverDrawing({section.section_frame.Position.X + (section.section_frame.Size.X - (40+4+2)), section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  1972.                         keybind.selecting = true
  1973.                         keybind_frame.Color = theme.dark_contrast
  1974.                     end
  1975.                     if keybind.open and keybind.modemenu.frame then
  1976.                         if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y, keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + keybind.modemenu.frame.Size.Y}) then
  1977.                             local changed = false
  1978.                             --
  1979.                             for i,v in pairs(keybind.modemenu.buttons) do
  1980.                                 if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)), keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)) + 15}) then
  1981.                                     keybind.mode = v.Text
  1982.                                     changed = true
  1983.                                 end
  1984.                             end
  1985.                             --
  1986.                             if changed then keybind:Reset() end
  1987.                         else
  1988.                             keybind.open = not keybind.open
  1989.                             --
  1990.                             for i,v in pairs(keybind.modemenu.drawings) do
  1991.                                 utility:Remove(v)
  1992.                             end
  1993.                             --
  1994.                             keybind.modemenu.drawings = {}
  1995.                             keybind.modemenu.buttons = {}
  1996.                             keybind.modemenu.frame = nil
  1997.                             --
  1998.                             window.currentContent.frame = nil
  1999.                             window.currentContent.keybind = nil
  2000.                         end
  2001.                     end
  2002.                 end
  2003.                 --
  2004.                 if Input.UserInputType == Enum.UserInputType.MouseButton2 and window.isVisible and keybind_outline.Visible then
  2005.                     if utility:MouseOverDrawing({section.section_frame.Position.X  + (section.section_frame.Size.X - (40+4+2)), section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  2006.                         window:CloseContent()
  2007.                         keybind.open = not keybind.open
  2008.                         --
  2009.                         local modemenu = utility:Create("Frame", {Vector2.new(keybind_outline.Size.X + 2,0), keybind_outline}, {
  2010.                             Size = utility:Size(0, 64, 0, 49),
  2011.                             Position = utility:Position(1, 2, 0, 0, keybind_outline),
  2012.                             Color = theme.outline,
  2013.                             Visible = page.open
  2014.                         }, keybind.modemenu.drawings);keybind.modemenu.frame = modemenu
  2015.                         --
  2016.                         local modemenu_inline = utility:Create("Frame", {Vector2.new(1,1), modemenu}, {
  2017.                             Size = utility:Size(1, -2, 1, -2, modemenu),
  2018.                             Position = utility:Position(0, 1, 0, 1, modemenu),
  2019.                             Color = theme.inline,
  2020.                             Visible = page.open
  2021.                         }, keybind.modemenu.drawings)
  2022.                         --
  2023.                         local modemenu_frame = utility:Create("Frame", {Vector2.new(1,1), modemenu_inline}, {
  2024.                             Size = utility:Size(1, -2, 1, -2, modemenu_inline),
  2025.                             Position = utility:Position(0, 1, 0, 1, modemenu_inline),
  2026.                             Color = theme.light_contrast,
  2027.                             Visible = page.open
  2028.                         }, keybind.modemenu.drawings)
  2029.                         --
  2030.                         local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), modemenu_frame}, {
  2031.                             Size = utility:Size(1, 0, 1, 0, modemenu_frame),
  2032.                             Position = utility:Position(0, 0, 0 , 0, modemenu_frame),
  2033.                             Transparency = 0.5,
  2034.                             Visible = page.open
  2035.                         }, keybind.modemenu.drawings)
  2036.                         --
  2037.                         utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2038.                         --
  2039.                         for i,v in pairs({"Always", "Toggle", "Hold"}) do
  2040.                             local button_title = utility:Create("TextLabel", {Vector2.new(modemenu_frame.Size.X/2,15 * (i-1)), modemenu_frame}, {
  2041.                                 Text = v,
  2042.                                 Size = theme.textsize,
  2043.                                 Font = theme.font,
  2044.                                 Color = v == keybind.mode and theme.accent or theme.textcolor,
  2045.                                 Center = true,
  2046.                                 OutlineColor = theme.textborder,
  2047.                                 Position = utility:Position(0.5, 0, 0, 15 * (i-1), modemenu_frame),
  2048.                                 Visible = page.open
  2049.                             }, keybind.modemenu.drawings);keybind.modemenu.buttons[#keybind.modemenu.buttons + 1] = button_title
  2050.                         end
  2051.                         --
  2052.                         window.currentContent.frame = modemenu
  2053.                         window.currentContent.keybind = keybind
  2054.                     end
  2055.                 end
  2056.             end
  2057.             --
  2058.             library.ended[#library.ended + 1] = function(Input)
  2059.                 if keybind.active and keybind.mode == "Hold" then
  2060.                     if keybind.current[1] and keybind.current[2] then
  2061.                         if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  2062.                             keybind.active = false
  2063.                             window.keybindslist:Remove(keybindname or name)
  2064.                             callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  2065.                         end
  2066.                     end
  2067.                 end
  2068.             end
  2069.             --
  2070.             if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  2071.                 library.pointers[tostring(pointer)] = keybind
  2072.             end
  2073.             --
  2074.             toggle.addedAxis = 40+4+2
  2075.             section:Update()
  2076.             --
  2077.             return keybind
  2078.         end
  2079.         --
  2080.         return toggle
  2081.     end
  2082.     --
  2083.     function sections:Slider(info)
  2084.         local info = info or {}
  2085.         local name = info.name or info.Name or info.title or info.Title or "New Slider"
  2086.         local def = info.def or info.Def or info.default or info.Default or 10
  2087.         local min = info.min or info.Min or info.minimum or info.Minimum or 0
  2088.         local max = info.max or info.Max or info.maximum or info.Maximum or 100
  2089.         local sub = info.suffix or info.Suffix or info.ending or info.Ending or info.prefix or info.Prefix or info.measurement or info.Measurement or ""
  2090.         local decimals = info.decimals or info.Decimals or 1
  2091.         decimals = 1 / decimals
  2092.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  2093.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  2094.         def = math.clamp(def, min, max)
  2095.         --
  2096.         local window = self.window
  2097.         local page = self.page
  2098.         local section = self
  2099.         --
  2100.         local slider = {min = min, max = max, sub = sub, decimals = decimals, axis = section.currentAxis, current = def, holding = false}
  2101.         --
  2102.         local slider_title = utility:Create("TextLabel", {Vector2.new(4,slider.axis), section.section_frame}, {
  2103.             Text = name,
  2104.             Size = theme.textsize,
  2105.             Font = theme.font,
  2106.             Color = theme.textcolor,
  2107.             OutlineColor = theme.textborder,
  2108.             Position = utility:Position(0, 4, 0, slider.axis, section.section_frame),
  2109.             Visible = page.open
  2110.         }, section.visibleContent)
  2111.         --
  2112.         local slider_outline = utility:Create("Frame", {Vector2.new(4,slider.axis + 15), section.section_frame}, {
  2113.             Size = utility:Size(1, -8, 0, 12, section.section_frame),
  2114.             Position = utility:Position(0, 4, 0, slider.axis + 15, section.section_frame),
  2115.             Color = theme.outline,
  2116.             Visible = page.open
  2117.         }, section.visibleContent)
  2118.         --
  2119.         local slider_inline = utility:Create("Frame", {Vector2.new(1,1), slider_outline}, {
  2120.             Size = utility:Size(1, -2, 1, -2, slider_outline),
  2121.             Position = utility:Position(0, 1, 0, 1, slider_outline),
  2122.             Color = theme.inline,
  2123.             Visible = page.open
  2124.         }, section.visibleContent)
  2125.         --
  2126.         local slider_frame = utility:Create("Frame", {Vector2.new(1,1), slider_inline}, {
  2127.             Size = utility:Size(1, -2, 1, -2, slider_inline),
  2128.             Position = utility:Position(0, 1, 0, 1, slider_inline),
  2129.             Color = theme.light_contrast,
  2130.             Visible = page.open
  2131.         }, section.visibleContent)
  2132.         --
  2133.         local slider_slide = utility:Create("Frame", {Vector2.new(1,1), slider_inline}, {
  2134.             Size = utility:Size(0, (slider_frame.Size.X / (slider.max - slider.min) * (slider.current - slider.min)), 1, -2, slider_inline),
  2135.             Position = utility:Position(0, 1, 0, 1, slider_inline),
  2136.             Color = theme.accent,
  2137.             Visible = page.open
  2138.         }, section.visibleContent)
  2139.         --
  2140.         local slider__gradient = utility:Create("Image", {Vector2.new(0,0), slider_frame}, {
  2141.             Size = utility:Size(1, 0, 1, 0, slider_frame),
  2142.             Position = utility:Position(0, 0, 0 , 0, slider_frame),
  2143.             Transparency = 0.5,
  2144.             Visible = page.open
  2145.         }, section.visibleContent)
  2146.         --
  2147.         local textBounds = utility:GetTextBounds(name, theme.textsize, theme.font)
  2148.         local slider_value = utility:Create("TextLabel", {Vector2.new(slider_outline.Size.X/2,(slider_outline.Size.Y/2) - (textBounds.Y/2)), slider_outline}, {
  2149.             Text = slider.current..slider.sub.."/"..slider.max..slider.sub,
  2150.             Size = theme.textsize,
  2151.             Font = theme.font,
  2152.             Color = theme.textcolor,
  2153.             Center = true,
  2154.             OutlineColor = theme.textborder,
  2155.             Position = utility:Position(0.5, 0, 0, (slider_outline.Size.Y/2) - (textBounds.Y/2), slider_outline),
  2156.             Visible = page.open
  2157.         }, section.visibleContent)
  2158.         --
  2159.         utility:LoadImage(slider__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2160.         --
  2161.         function slider:Set(value)
  2162.             slider.current = math.clamp(math.round(value * slider.decimals) / slider.decimals, slider.min, slider.max)
  2163.             local percent = 1 - ((slider.max - slider.current) / (slider.max - slider.min))
  2164.             slider_value.Text = slider.current..slider.sub.."/"..slider.max..slider.sub
  2165.             slider_slide.Size = utility:Size(0, percent * slider_frame.Size.X, 1, -2, slider_inline)
  2166.             callback(slider.current)
  2167.         end
  2168.         --
  2169.         function slider:Refresh()
  2170.             local mouseLocation = utility:MouseLocation()
  2171.             local percent = math.clamp(mouseLocation.X - slider_slide.Position.X, 0, slider_frame.Size.X) / slider_frame.Size.X
  2172.             local value = math.floor((slider.min + (slider.max - slider.min) * percent) * slider.decimals) / slider.decimals
  2173.             value = math.clamp(value, slider.min, slider.max)
  2174.             slider:Set(value)
  2175.         end
  2176.         --
  2177.         function slider:Get()
  2178.             return slider.current
  2179.         end
  2180.         --
  2181.         slider:Set(slider.current)
  2182.         --
  2183.         library.began[#library.began + 1] = function(Input)
  2184.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and slider_outline.Visible and window.isVisible and page.open and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + slider.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + slider.axis + 27}) and not window:IsOverContent() then
  2185.                 slider.holding = true
  2186.                 slider:Refresh()
  2187.             end
  2188.         end
  2189.         --
  2190.         library.ended[#library.ended + 1] = function(Input)
  2191.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and slider.holding and window.isVisible then
  2192.                 slider.holding = false
  2193.             end
  2194.         end
  2195.         --
  2196.         library.changed[#library.changed + 1] = function(Input)
  2197.             if slider.holding and window.isVisible then
  2198.                 slider:Refresh()
  2199.             end
  2200.         end
  2201.         --
  2202.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  2203.             library.pointers[tostring(pointer)] = slider
  2204.         end
  2205.         --
  2206.         section.currentAxis = section.currentAxis + 27 + 4
  2207.         section:Update()
  2208.         --
  2209.         return slider
  2210.     end
  2211.     --
  2212.     function sections:Button(info)
  2213.         local info = info or {}
  2214.         local name = info.name or info.Name or info.title or info.Title or "New Button"
  2215.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  2216.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  2217.         --
  2218.         local window = self.window
  2219.         local page = self.page
  2220.         local section = self
  2221.         --
  2222.         local button = {axis = section.currentAxis}
  2223.         --
  2224.         local button_outline = utility:Create("Frame", {Vector2.new(4,button.axis), section.section_frame}, {
  2225.             Size = utility:Size(1, -8, 0, 20, section.section_frame),
  2226.             Position = utility:Position(0, 4, 0, button.axis, section.section_frame),
  2227.             Color = theme.outline,
  2228.             Visible = page.open
  2229.         }, section.visibleContent)
  2230.         --
  2231.         local button_inline = utility:Create("Frame", {Vector2.new(1,1), button_outline}, {
  2232.             Size = utility:Size(1, -2, 1, -2, button_outline),
  2233.             Position = utility:Position(0, 1, 0, 1, button_outline),
  2234.             Color = theme.inline,
  2235.             Visible = page.open
  2236.         }, section.visibleContent)
  2237.         --
  2238.         local button_frame = utility:Create("Frame", {Vector2.new(1,1), button_inline}, {
  2239.             Size = utility:Size(1, -2, 1, -2, button_inline),
  2240.             Position = utility:Position(0, 1, 0, 1, button_inline),
  2241.             Color = theme.light_contrast,
  2242.             Visible = page.open
  2243.         }, section.visibleContent)
  2244.         --
  2245.         local button_gradient = utility:Create("Image", {Vector2.new(0,0), button_frame}, {
  2246.             Size = utility:Size(1, 0, 1, 0, button_frame),
  2247.             Position = utility:Position(0, 0, 0 , 0, button_frame),
  2248.             Transparency = 0.5,
  2249.             Visible = page.open
  2250.         }, section.visibleContent)
  2251.         --
  2252.         local button_title = utility:Create("TextLabel", {Vector2.new(button_frame.Size.X/2,1), button_frame}, {
  2253.             Text = name,
  2254.             Size = theme.textsize,
  2255.             Font = theme.font,
  2256.             Color = theme.textcolor,
  2257.             OutlineColor = theme.textborder,
  2258.             Center = true,
  2259.             Position = utility:Position(0.5, 0, 0, 1, button_frame),
  2260.             Visible = page.open
  2261.         }, section.visibleContent)
  2262.         --
  2263.         utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2264.         --
  2265.         library.began[#library.began + 1] = function(Input)
  2266.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and button_outline.Visible and window.isVisible and utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + button.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + button.axis + 20}) and not window:IsOverContent() then
  2267.                 callback()
  2268.             end
  2269.         end
  2270.         --
  2271.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  2272.             library.pointers[tostring(pointer)] = button
  2273.         end
  2274.         --
  2275.         section.currentAxis = section.currentAxis + 20 + 4
  2276.         section:Update()
  2277.         --
  2278.         return button
  2279.     end
  2280.     --
  2281.     function sections:ButtonHolder(info)
  2282.         local info = info or {}
  2283.         local buttons = info.buttons or info.Buttons or {}
  2284.         --
  2285.         local window = self.window
  2286.         local page = self.page
  2287.         local section = self
  2288.         --
  2289.         local buttonHolder = {buttons = {}}
  2290.         --
  2291.         for i=1, 2 do
  2292.             local button = {axis = section.currentAxis}
  2293.             --
  2294.             local button_outline = utility:Create("Frame", {Vector2.new(i == 2 and ((section.section_frame.Size.X / 2) + 2) or 4,button.axis), section.section_frame}, {
  2295.                 Size = utility:Size(0.5, -6, 0, 20, section.section_frame),
  2296.                 Position = utility:Position(0, i == 2 and 2 or 4, 0, button.axis, section.section_frame),
  2297.                 Color = theme.outline,
  2298.                 Visible = page.open
  2299.             }, section.visibleContent)
  2300.             --
  2301.             local button_inline = utility:Create("Frame", {Vector2.new(1,1), button_outline}, {
  2302.                 Size = utility:Size(1, -2, 1, -2, button_outline),
  2303.                 Position = utility:Position(0, 1, 0, 1, button_outline),
  2304.                 Color = theme.inline,
  2305.                 Visible = page.open
  2306.             }, section.visibleContent)
  2307.             --
  2308.             local button_frame = utility:Create("Frame", {Vector2.new(1,1), button_inline}, {
  2309.                 Size = utility:Size(1, -2, 1, -2, button_inline),
  2310.                 Position = utility:Position(0, 1, 0, 1, button_inline),
  2311.                 Color = theme.light_contrast,
  2312.                 Visible = page.open
  2313.             }, section.visibleContent)
  2314.             --
  2315.             local button_gradient = utility:Create("Image", {Vector2.new(0,0), button_frame}, {
  2316.                 Size = utility:Size(1, 0, 1, 0, button_frame),
  2317.                 Position = utility:Position(0, 0, 0 , 0, button_frame),
  2318.                 Transparency = 0.5,
  2319.                 Visible = page.open
  2320.             }, section.visibleContent)
  2321.             --
  2322.             local button_title = utility:Create("TextLabel", {Vector2.new(button_frame.Size.X/2,1), button_frame}, {
  2323.                 Text = buttons[i][1],
  2324.                 Size = theme.textsize,
  2325.                 Font = theme.font,
  2326.                 Color = theme.textcolor,
  2327.                 OutlineColor = theme.textborder,
  2328.                 Center = true,
  2329.                 Position = utility:Position(0.5, 0, 0, 1, button_frame),
  2330.                 Visible = page.open
  2331.             }, section.visibleContent)
  2332.             --
  2333.             utility:LoadImage(button_gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2334.             --
  2335.             library.began[#library.began + 1] = function(Input)
  2336.                 if Input.UserInputType == Enum.UserInputType.MouseButton1 and button_outline.Visible and window.isVisible and utility:MouseOverDrawing({section.section_frame.Position.X + (i == 2 and (section.section_frame.Size.X/2) or 0), section.section_frame.Position.Y + button.axis, section.section_frame.Position.X + section.section_frame.Size.X - (i == 1 and (section.section_frame.Size.X/2) or 0), section.section_frame.Position.Y + button.axis + 20}) and not window:IsOverContent() then
  2337.                     buttons[i][2]()
  2338.                 end
  2339.             end
  2340.         end
  2341.         --
  2342.         section.currentAxis = section.currentAxis + 20 + 4
  2343.         section:Update()
  2344.     end
  2345.     --
  2346.     function sections:Dropdown(info)
  2347.         local info = info or {}
  2348.         local name = info.name or info.Name or info.title or info.Title or "New Dropdown"
  2349.         local options = info.options or info.Options or {"1", "2", "3"}
  2350.         local def = info.def or info.Def or info.default or info.Default or options[1]
  2351.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  2352.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  2353.         --
  2354.         local window = self.window
  2355.         local page = self.page
  2356.         local section = self
  2357.         --
  2358.         local dropdown = {open = false, current = tostring(def), holder = {buttons = {}, drawings = {}}, axis = section.currentAxis}
  2359.         --
  2360.         local dropdown_outline = utility:Create("Frame", {Vector2.new(4,dropdown.axis + 15), section.section_frame}, {
  2361.             Size = utility:Size(1, -8, 0, 20, section.section_frame),
  2362.             Position = utility:Position(0, 4, 0, dropdown.axis + 15, section.section_frame),
  2363.             Color = theme.outline,
  2364.             Visible = page.open
  2365.         }, section.visibleContent)
  2366.         --
  2367.         local dropdown_inline = utility:Create("Frame", {Vector2.new(1,1), dropdown_outline}, {
  2368.             Size = utility:Size(1, -2, 1, -2, dropdown_outline),
  2369.             Position = utility:Position(0, 1, 0, 1, dropdown_outline),
  2370.             Color = theme.inline,
  2371.             Visible = page.open
  2372.         }, section.visibleContent)
  2373.         --
  2374.         local dropdown_frame = utility:Create("Frame", {Vector2.new(1,1), dropdown_inline}, {
  2375.             Size = utility:Size(1, -2, 1, -2, dropdown_inline),
  2376.             Position = utility:Position(0, 1, 0, 1, dropdown_inline),
  2377.             Color = theme.light_contrast,
  2378.             Visible = page.open
  2379.         }, section.visibleContent)
  2380.         --
  2381.         local dropdown_title = utility:Create("TextLabel", {Vector2.new(4,dropdown.axis), section.section_frame}, {
  2382.             Text = name,
  2383.             Size = theme.textsize,
  2384.             Font = theme.font,
  2385.             Color = theme.textcolor,
  2386.             OutlineColor = theme.textborder,
  2387.             Position = utility:Position(0, 4, 0, dropdown.axis, section.section_frame),
  2388.             Visible = page.open
  2389.         }, section.visibleContent)
  2390.         --
  2391.         local dropdown__gradient = utility:Create("Image", {Vector2.new(0,0), dropdown_frame}, {
  2392.             Size = utility:Size(1, 0, 1, 0, dropdown_frame),
  2393.             Position = utility:Position(0, 0, 0 , 0, dropdown_frame),
  2394.             Transparency = 0.5,
  2395.             Visible = page.open
  2396.         }, section.visibleContent)
  2397.         --
  2398.         local dropdown_value = utility:Create("TextLabel", {Vector2.new(3,dropdown_frame.Size.Y/2 - 7), dropdown_frame}, {
  2399.             Text = dropdown.current,
  2400.             Size = theme.textsize,
  2401.             Font = theme.font,
  2402.             Color = theme.textcolor,
  2403.             OutlineColor = theme.textborder,
  2404.             Position = utility:Position(0, 3, 0, (dropdown_frame.Size.Y/2) - 7, dropdown_frame),
  2405.             Visible = page.open
  2406.         }, section.visibleContent)
  2407.         --
  2408.         local dropdown_image = utility:Create("Image", {Vector2.new(dropdown_frame.Size.X - 15,dropdown_frame.Size.Y/2 - 3), dropdown_frame}, {
  2409.             Size = utility:Size(0, 9, 0, 6, dropdown_frame),
  2410.             Position = utility:Position(1, -15, 0.5, -3, dropdown_frame),
  2411.             Visible = page.open
  2412.         }, section.visibleContent);dropdown["dropdown_image"] = dropdown_image
  2413.         --
  2414.         utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2415.         utility:LoadImage(dropdown__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2416.         --
  2417.         function dropdown:Update()
  2418.             if dropdown.open and dropdown.holder.inline then
  2419.                 for i,v in pairs(dropdown.holder.buttons) do
  2420.                     v[1].Color = v[1].Text == tostring(dropdown.current) and theme.accent or theme.textcolor
  2421.                     v[1].Position = utility:Position(0, v[1].Text == tostring(dropdown.current) and 8 or 6, 0, 2, v[2])
  2422.                     utility:UpdateOffset(v[1], {Vector2.new(v[1].Text == tostring(dropdown.current) and 8 or 6, 2), v[2]})
  2423.                 end
  2424.             end
  2425.         end
  2426.         --
  2427.         function dropdown:Set(value)
  2428.             if typeof(value) == "string" and table.find(options, value) then
  2429.                 dropdown.current = value
  2430.                 dropdown_value.Text = value
  2431.             end
  2432.         end
  2433.         --
  2434.         function dropdown:Get()
  2435.             return dropdown.current
  2436.         end
  2437.         --
  2438.         library.began[#library.began + 1] = function(Input)
  2439.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and dropdown_outline.Visible then
  2440.                 if dropdown.open and dropdown.holder.inline and utility:MouseOverDrawing({dropdown.holder.inline.Position.X, dropdown.holder.inline.Position.Y, dropdown.holder.inline.Position.X + dropdown.holder.inline.Size.X, dropdown.holder.inline.Position.Y + dropdown.holder.inline.Size.Y}) then
  2441.                     for i,v in pairs(dropdown.holder.buttons) do
  2442.                         if utility:MouseOverDrawing({v[2].Position.X, v[2].Position.Y, v[2].Position.X + v[2].Size.X, v[2].Position.Y + v[2].Size.Y}) and v[1].Text ~= dropdown.current then
  2443.                             dropdown.current = v[1].Text
  2444.                             dropdown_value.Text = dropdown.current
  2445.                             dropdown:Update()
  2446.                         end
  2447.                     end
  2448.                 elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + dropdown.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + dropdown.axis + 15 +  20}) and not window:IsOverContent() then
  2449.                     if not dropdown.open then
  2450.                         window:CloseContent()
  2451.                         dropdown.open = not dropdown.open
  2452.                         utility:LoadImage(dropdown_image, "arrow_up", "https://i.imgur.com/SL9cbQp.png")
  2453.                         --
  2454.                         local dropdown_open_outline = utility:Create("Frame", {Vector2.new(0,19), dropdown_outline}, {
  2455.                             Size = utility:Size(1, 0, 0, 3 + (#options * 19), dropdown_outline),
  2456.                             Position = utility:Position(0, 0, 0, 19, dropdown_outline),
  2457.                             Color = theme.outline,
  2458.                             Visible = page.open
  2459.                         }, dropdown.holder.drawings);dropdown.holder.outline = dropdown_open_outline
  2460.                         --
  2461.                         local dropdown_open_inline = utility:Create("Frame", {Vector2.new(1,1), dropdown_open_outline}, {
  2462.                             Size = utility:Size(1, -2, 1, -2, dropdown_open_outline),
  2463.                             Position = utility:Position(0, 1, 0, 1, dropdown_open_outline),
  2464.                             Color = theme.inline,
  2465.                             Visible = page.open
  2466.                         }, dropdown.holder.drawings);dropdown.holder.inline = dropdown_open_inline
  2467.                         --
  2468.                         for i,v in pairs(options) do
  2469.                             local dropdown_value_frame = utility:Create("Frame", {Vector2.new(1,1 + (19 * (i-1))), dropdown_open_inline}, {
  2470.                                 Size = utility:Size(1, -2, 0, 18, dropdown_open_inline),
  2471.                                 Position = utility:Position(0, 1, 0, 1 + (19 * (i-1)), dropdown_open_inline),
  2472.                                 Color = theme.light_contrast,
  2473.                                 Visible = page.open
  2474.                             }, dropdown.holder.drawings)
  2475.                             --[[
  2476.                             local dropdown_value_gradient = utility:Create("Image", {Vector2.new(0,0), dropdown_value_frame}, {
  2477.                                 Size = utility:Size(1, 0, 1, 0, dropdown_value_frame),
  2478.                                 Position = utility:Position(0, 0, 0 , 0, dropdown_value_frame),
  2479.                                 Transparency = 0.5,
  2480.                                 Visible = page.open
  2481.                             }, dropdown.holder.drawings)
  2482.                             --
  2483.                             utility:LoadImage(dropdown_value_gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")]]
  2484.                             --
  2485.                             local dropdown_value = utility:Create("TextLabel", {Vector2.new(v == tostring(dropdown.current) and 8 or 6,2), dropdown_value_frame}, {
  2486.                                 Text = v,
  2487.                                 Size = theme.textsize,
  2488.                                 Font = theme.font,
  2489.                                 Color = v == tostring(dropdown.current) and theme.accent or theme.textcolor,
  2490.                                 OutlineColor = theme.textborder,
  2491.                                 Position = utility:Position(0, v == tostring(dropdown.current) and 8 or 6, 0, 2, dropdown_value_frame),
  2492.                                 Visible = page.open
  2493.                             }, dropdown.holder.drawings);dropdown.holder.buttons[#dropdown.holder.buttons + 1] = {dropdown_value, dropdown_value_frame}
  2494.                         end
  2495.                         --
  2496.                         window.currentContent.frame = dropdown_open_inline
  2497.                         window.currentContent.dropdown = dropdown
  2498.                     else
  2499.                         dropdown.open = not dropdown.open
  2500.                         utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2501.                         --
  2502.                         for i,v in pairs(dropdown.holder.drawings) do
  2503.                             utility:Remove(v)
  2504.                         end
  2505.                         --
  2506.                         dropdown.holder.drawings = {}
  2507.                         dropdown.holder.buttons = {}
  2508.                         dropdown.holder.inline = nil
  2509.                         --
  2510.                         window.currentContent.frame = nil
  2511.                         window.currentContent.dropdown = nil
  2512.                     end
  2513.                 else
  2514.                     if dropdown.open then
  2515.                         dropdown.open = not dropdown.open
  2516.                         utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2517.                         --
  2518.                         for i,v in pairs(dropdown.holder.drawings) do
  2519.                             utility:Remove(v)
  2520.                         end
  2521.                         --
  2522.                         dropdown.holder.drawings = {}
  2523.                         dropdown.holder.buttons = {}
  2524.                         dropdown.holder.inline = nil
  2525.                         --
  2526.                         window.currentContent.frame = nil
  2527.                         window.currentContent.dropdown = nil
  2528.                     end
  2529.                 end
  2530.             elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and dropdown.open then
  2531.                 dropdown.open = not dropdown.open
  2532.                 utility:LoadImage(dropdown_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2533.                 --
  2534.                 for i,v in pairs(dropdown.holder.drawings) do
  2535.                     utility:Remove(v)
  2536.                 end
  2537.                 --
  2538.                 dropdown.holder.drawings = {}
  2539.                 dropdown.holder.buttons = {}
  2540.                 dropdown.holder.inline = nil
  2541.                 --
  2542.                 window.currentContent.frame = nil
  2543.                 window.currentContent.dropdown = nil
  2544.             end
  2545.         end
  2546.         --
  2547.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  2548.             library.pointers[tostring(pointer)] = dropdown
  2549.         end
  2550.         --
  2551.         section.currentAxis = section.currentAxis + 35 + 4
  2552.         section:Update()
  2553.         --
  2554.         return dropdown
  2555.     end
  2556.     --
  2557.     function sections:Multibox(info)
  2558.         local info = info or {}
  2559.         local name = info.name or info.Name or info.title or info.Title or "New Multibox"
  2560.         local options = info.options or info.Options or {"1", "2", "3"}
  2561.         local def = info.def or info.Def or info.default or info.Default or {options[1]}
  2562.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  2563.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  2564.         local min = info.min or info.Min or info.minimum or info.Minimum or 0
  2565.         --
  2566.         local window = self.window
  2567.         local page = self.page
  2568.         local section = self
  2569.         --
  2570.         local multibox = {open = false, current = def, holder = {buttons = {}, drawings = {}}, axis = section.currentAxis}
  2571.         --
  2572.         local multibox_outline = utility:Create("Frame", {Vector2.new(4,multibox.axis + 15), section.section_frame}, {
  2573.             Size = utility:Size(1, -8, 0, 20, section.section_frame),
  2574.             Position = utility:Position(0, 4, 0, multibox.axis + 15, section.section_frame),
  2575.             Color = theme.outline,
  2576.             Visible = page.open
  2577.         }, section.visibleContent)
  2578.         --
  2579.         local multibox_inline = utility:Create("Frame", {Vector2.new(1,1), multibox_outline}, {
  2580.             Size = utility:Size(1, -2, 1, -2, multibox_outline),
  2581.             Position = utility:Position(0, 1, 0, 1, multibox_outline),
  2582.             Color = theme.inline,
  2583.             Visible = page.open
  2584.         }, section.visibleContent)
  2585.         --
  2586.         local multibox_frame = utility:Create("Frame", {Vector2.new(1,1), multibox_inline}, {
  2587.             Size = utility:Size(1, -2, 1, -2, multibox_inline),
  2588.             Position = utility:Position(0, 1, 0, 1, multibox_inline),
  2589.             Color = theme.light_contrast,
  2590.             Visible = page.open
  2591.         }, section.visibleContent)
  2592.         --
  2593.         local multibox_title = utility:Create("TextLabel", {Vector2.new(4,multibox.axis), section.section_frame}, {
  2594.             Text = name,
  2595.             Size = theme.textsize,
  2596.             Font = theme.font,
  2597.             Color = theme.textcolor,
  2598.             OutlineColor = theme.textborder,
  2599.             Position = utility:Position(0, 4, 0, multibox.axis, section.section_frame),
  2600.             Visible = page.open
  2601.         }, section.visibleContent)
  2602.         --
  2603.         local multibox__gradient = utility:Create("Image", {Vector2.new(0,0), multibox_frame}, {
  2604.             Size = utility:Size(1, 0, 1, 0, multibox_frame),
  2605.             Position = utility:Position(0, 0, 0 , 0, multibox_frame),
  2606.             Transparency = 0.5,
  2607.             Visible = page.open
  2608.         }, section.visibleContent)
  2609.         --
  2610.         local multibox_value = utility:Create("TextLabel", {Vector2.new(3,multibox_frame.Size.Y/2 - 7), multibox_frame}, {
  2611.             Text = "",
  2612.             Size = theme.textsize,
  2613.             Font = theme.font,
  2614.             Color = theme.textcolor,
  2615.             OutlineColor = theme.textborder,
  2616.             Position = utility:Position(0, 3, 0, (multibox_frame.Size.Y/2) - 7, multibox_frame),
  2617.             Visible = page.open
  2618.         }, section.visibleContent)
  2619.         --
  2620.         local multibox_image = utility:Create("Image", {Vector2.new(multibox_frame.Size.X - 15,multibox_frame.Size.Y/2 - 3), multibox_frame}, {
  2621.             Size = utility:Size(0, 9, 0, 6, multibox_frame),
  2622.             Position = utility:Position(1, -15, 0.5, -3, multibox_frame),
  2623.             Visible = page.open
  2624.         }, section.visibleContent);multibox["multibox_image"] = multibox_image
  2625.         --
  2626.         utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2627.         utility:LoadImage(multibox__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2628.         --
  2629.         function multibox:Update()
  2630.             if multibox.open and multibox.holder.inline then
  2631.                 for i,v in pairs(multibox.holder.buttons) do
  2632.                     v[1].Color = table.find(multibox.current, v[1].Text) and theme.accent or theme.textcolor
  2633.                     v[1].Position = utility:Position(0, table.find(multibox.current, v[1].Text) and 8 or 6, 0, 2, v[2])
  2634.                     utility:UpdateOffset(v[1], {Vector2.new(table.find(multibox.current, v[1].Text) and 8 or 6, 2), v[2]})
  2635.                 end
  2636.             end
  2637.         end
  2638.         --
  2639.         function multibox:Serialize(tbl)
  2640.             local str = ""
  2641.             --
  2642.             for i,v in pairs(tbl) do
  2643.                 str = str..v..", "
  2644.             end
  2645.             --
  2646.             return string.sub(str, 0, #str - 2)
  2647.         end
  2648.         --
  2649.         function multibox:Resort(tbl,original)
  2650.             local newtbl = {}
  2651.             --
  2652.             for i,v in pairs(original) do
  2653.                 if table.find(tbl, v) then
  2654.                     newtbl[#newtbl + 1] = v
  2655.                 end
  2656.             end
  2657.             --
  2658.             return newtbl
  2659.         end
  2660.         --
  2661.         function multibox:Set(tbl)
  2662.             if typeof(tbl) == "table" then
  2663.                 multibox.current = tbl
  2664.                 multibox_value.Text =  multibox:Serialize(multibox:Resort(multibox.current, options))
  2665.             end
  2666.         end
  2667.         --
  2668.         function multibox:Get()
  2669.             return multibox.current
  2670.         end
  2671.         --
  2672.         multibox_value.Text = multibox:Serialize(multibox:Resort(multibox.current, options))
  2673.         --
  2674.         library.began[#library.began + 1] = function(Input)
  2675.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and multibox_outline.Visible then
  2676.                 if multibox.open and multibox.holder.inline and utility:MouseOverDrawing({multibox.holder.inline.Position.X, multibox.holder.inline.Position.Y, multibox.holder.inline.Position.X + multibox.holder.inline.Size.X, multibox.holder.inline.Position.Y + multibox.holder.inline.Size.Y}) then
  2677.                     for i,v in pairs(multibox.holder.buttons) do
  2678.                         if utility:MouseOverDrawing({v[2].Position.X, v[2].Position.Y, v[2].Position.X + v[2].Size.X, v[2].Position.Y + v[2].Size.Y}) and v[1].Text ~= multibox.current then
  2679.                             if not table.find(multibox.current, v[1].Text) then
  2680.                                 multibox.current[#multibox.current + 1] = v[1].Text
  2681.                                 multibox_value.Text = multibox:Serialize(multibox:Resort(multibox.current, options))
  2682.                                 multibox:Update()
  2683.                             else
  2684.                                 if #multibox.current > min then
  2685.                                     table.remove(multibox.current, table.find(multibox.current, v[1].Text))
  2686.                                     multibox_value.Text = multibox:Serialize(multibox:Resort(multibox.current, options))
  2687.                                     multibox:Update()
  2688.                                 end
  2689.                             end
  2690.                         end
  2691.                     end
  2692.                 elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + multibox.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + multibox.axis + 15 +  20}) and not window:IsOverContent() then
  2693.                     if not multibox.open then
  2694.                         window:CloseContent()
  2695.                         multibox.open = not multibox.open
  2696.                         utility:LoadImage(multibox_image, "arrow_up", "https://i.imgur.com/SL9cbQp.png")
  2697.                         --
  2698.                         local multibox_open_outline = utility:Create("Frame", {Vector2.new(0,19), multibox_outline}, {
  2699.                             Size = utility:Size(1, 0, 0, 3 + (#options * 19), multibox_outline),
  2700.                             Position = utility:Position(0, 0, 0, 19, multibox_outline),
  2701.                             Color = theme.outline,
  2702.                             Visible = page.open
  2703.                         }, multibox.holder.drawings);multibox.holder.outline = multibox_open_outline
  2704.                         --
  2705.                         local multibox_open_inline = utility:Create("Frame", {Vector2.new(1,1), multibox_open_outline}, {
  2706.                             Size = utility:Size(1, -2, 1, -2, multibox_open_outline),
  2707.                             Position = utility:Position(0, 1, 0, 1, multibox_open_outline),
  2708.                             Color = theme.inline,
  2709.                             Visible = page.open
  2710.                         }, multibox.holder.drawings);multibox.holder.inline = multibox_open_inline
  2711.                         --
  2712.                         for i,v in pairs(options) do
  2713.                             local multibox_value_frame = utility:Create("Frame", {Vector2.new(1,1 + (19 * (i-1))), multibox_open_inline}, {
  2714.                                 Size = utility:Size(1, -2, 0, 18, multibox_open_inline),
  2715.                                 Position = utility:Position(0, 1, 0, 1 + (19 * (i-1)), multibox_open_inline),
  2716.                                 Color = theme.light_contrast,
  2717.                                 Visible = page.open
  2718.                             }, multibox.holder.drawings)
  2719.                             --[[
  2720.                             local multibox_value_gradient = utility:Create("Image", {Vector2.new(0,0), multibox_value_frame}, {
  2721.                                 Size = utility:Size(1, 0, 1, 0, multibox_value_frame),
  2722.                                 Position = utility:Position(0, 0, 0 , 0, multibox_value_frame),
  2723.                                 Transparency = 0.5,
  2724.                                 Visible = page.open
  2725.                             }, multibox.holder.drawings)
  2726.                             --
  2727.                             utility:LoadImage(multibox_value_gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")]]
  2728.                             --
  2729.                             local multibox_value = utility:Create("TextLabel", {Vector2.new(table.find(multibox.current, v) and 8 or 6,2), multibox_value_frame}, {
  2730.                                 Text = v,
  2731.                                 Size = theme.textsize,
  2732.                                 Font = theme.font,
  2733.                                 Color = table.find(multibox.current, v) and theme.accent or theme.textcolor,
  2734.                                 OutlineColor = theme.textborder,
  2735.                                 Position = utility:Position(0, table.find(multibox.current, v) and 8 or 6, 0, 2, multibox_value_frame),
  2736.                                 Visible = page.open
  2737.                             }, multibox.holder.drawings);multibox.holder.buttons[#multibox.holder.buttons + 1] = {multibox_value, multibox_value_frame}
  2738.                         end
  2739.                         --
  2740.                         window.currentContent.frame = multibox_open_inline
  2741.                         window.currentContent.multibox = multibox
  2742.                     else
  2743.                         multibox.open = not multibox.open
  2744.                         utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2745.                         --
  2746.                         for i,v in pairs(multibox.holder.drawings) do
  2747.                             utility:Remove(v)
  2748.                         end
  2749.                         --
  2750.                         multibox.holder.drawings = {}
  2751.                         multibox.holder.buttons = {}
  2752.                         multibox.holder.inline = nil
  2753.                         --
  2754.                         window.currentContent.frame = nil
  2755.                         window.currentContent.multibox = nil
  2756.                     end
  2757.                 else
  2758.                     if multibox.open then
  2759.                         multibox.open = not multibox.open
  2760.                         utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2761.                         --
  2762.                         for i,v in pairs(multibox.holder.drawings) do
  2763.                             utility:Remove(v)
  2764.                         end
  2765.                         --
  2766.                         multibox.holder.drawings = {}
  2767.                         multibox.holder.buttons = {}
  2768.                         multibox.holder.inline = nil
  2769.                         --
  2770.                         window.currentContent.frame = nil
  2771.                         window.currentContent.multibox = nil
  2772.                     end
  2773.                 end
  2774.             elseif Input.UserInputType == Enum.UserInputType.MouseButton1 and multibox.open then
  2775.                 multibox.open = not multibox.open
  2776.                 utility:LoadImage(multibox_image, "arrow_down", "https://i.imgur.com/tVqy0nL.png")
  2777.                 --
  2778.                 for i,v in pairs(multibox.holder.drawings) do
  2779.                     utility:Remove(v)
  2780.                 end
  2781.                 --
  2782.                 multibox.holder.drawings = {}
  2783.                 multibox.holder.buttons = {}
  2784.                 multibox.holder.inline = nil
  2785.                 --
  2786.                 window.currentContent.frame = nil
  2787.                 window.currentContent.multibox = nil
  2788.             end
  2789.         end
  2790.         --
  2791.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  2792.             library.pointers[tostring(pointer)] = multibox
  2793.         end
  2794.         --
  2795.         section.currentAxis = section.currentAxis + 35 + 4
  2796.         section:Update()
  2797.         --
  2798.         return multibox
  2799.     end
  2800.     --
  2801.     function sections:Keybind(info)
  2802.         local info = info or {}
  2803.         local name = info.name or info.Name or info.title or info.Title or "New Keybind"
  2804.         local def = info.def or info.Def or info.default or info.Default or nil
  2805.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  2806.         local mode = info.mode or info.Mode or "Always"
  2807.         local keybindname = info.keybindname or info.keybindName or info.Keybindname or info.KeybindName or nil
  2808.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  2809.         --
  2810.         local window = self.window
  2811.         local page = self.page
  2812.         local section = self
  2813.         --
  2814.         local keybind = {keybindname = keybindname or name, axis = section.currentAxis, current = {}, selecting = false, mode = mode, open = false, modemenu = {buttons = {}, drawings = {}}, active = false}
  2815.         --
  2816.         local allowedKeyCodes = {"Q","W","E","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","One","Two","Three","Four","Five","Six","Seveen","Eight","Nine","0","Insert","Tab","Home","End","LeftAlt","LeftControl","LeftShift","RightAlt","RightControl","RightShift","CapsLock"}
  2817.         local allowedInputTypes = {"MouseButton1","MouseButton2","MouseButton3"}
  2818.         local shortenedInputs = {["MouseButton1"] = "MB1", ["MouseButton2"] = "MB2", ["MouseButton3"] = "MB3", ["Insert"] = "Ins", ["LeftAlt"] = "LAlt", ["LeftControl"] = "LC", ["LeftShift"] = "LS", ["RightAlt"] = "RAlt", ["RightControl"] = "RC", ["RightShift"] = "RS", ["CapsLock"] = "Caps"}
  2819.         --
  2820.         local keybind_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(40+4),keybind.axis), section.section_frame}, {
  2821.             Size = utility:Size(0, 40, 0, 17),
  2822.             Position = utility:Position(1, -(40+4), 0, keybind.axis, section.section_frame),
  2823.             Color = theme.outline,
  2824.             Visible = page.open
  2825.         }, section.visibleContent)
  2826.         --
  2827.         local keybind_inline = utility:Create("Frame", {Vector2.new(1,1), keybind_outline}, {
  2828.             Size = utility:Size(1, -2, 1, -2, keybind_outline),
  2829.             Position = utility:Position(0, 1, 0, 1, keybind_outline),
  2830.             Color = theme.inline,
  2831.             Visible = page.open
  2832.         }, section.visibleContent)
  2833.         --
  2834.         local keybind_frame = utility:Create("Frame", {Vector2.new(1,1), keybind_inline}, {
  2835.             Size = utility:Size(1, -2, 1, -2, keybind_inline),
  2836.             Position = utility:Position(0, 1, 0, 1, keybind_inline),
  2837.             Color = theme.light_contrast,
  2838.             Visible = page.open
  2839.         }, section.visibleContent)
  2840.         --
  2841.         local keybind_title = utility:Create("TextLabel", {Vector2.new(4,keybind.axis + (17/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  2842.             Text = name,
  2843.             Size = theme.textsize,
  2844.             Font = theme.font,
  2845.             Color = theme.textcolor,
  2846.             OutlineColor = theme.textborder,
  2847.             Position = utility:Position(0, 4, 0, keybind.axis + (17/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  2848.             Visible = page.open
  2849.         }, section.visibleContent)
  2850.         --
  2851.         local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), keybind_frame}, {
  2852.             Size = utility:Size(1, 0, 1, 0, keybind_frame),
  2853.             Position = utility:Position(0, 0, 0 , 0, keybind_frame),
  2854.             Transparency = 0.5,
  2855.             Visible = page.open
  2856.         }, section.visibleContent)
  2857.         --
  2858.         local keybind_value = utility:Create("TextLabel", {Vector2.new(keybind_outline.Size.X/2,1), keybind_outline}, {
  2859.             Text = "...",
  2860.             Size = theme.textsize,
  2861.             Font = theme.font,
  2862.             Color = theme.textcolor,
  2863.             OutlineColor = theme.textborder,
  2864.             Center = true,
  2865.             Position = utility:Position(0.5, 0, 1, 0, keybind_outline),
  2866.             Visible = page.open
  2867.         }, section.visibleContent)
  2868.         --
  2869.         utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  2870.         --
  2871.         function keybind:Shorten(string)
  2872.             for i,v in pairs(shortenedInputs) do
  2873.                 string = string.gsub(string, i, v)
  2874.             end
  2875.             return string
  2876.         end
  2877.         --
  2878.         function keybind:Change(input)
  2879.             input = input or "..."
  2880.             local inputTable = {}
  2881.             --
  2882.             if input.EnumType then
  2883.                 if input.EnumType == Enum.KeyCode or input.EnumType == Enum.UserInputType then
  2884.                     if table.find(allowedKeyCodes, input.Name) or table.find(allowedInputTypes, input.Name) then
  2885.                         inputTable = {input.EnumType == Enum.KeyCode and "KeyCode" or "UserInputType", input.Name}
  2886.                         --
  2887.                         keybind.current = inputTable
  2888.                         keybind_value.Text = #keybind.current > 0 and keybind:Shorten(keybind.current[2]) or "..."
  2889.                         --
  2890.                         return true
  2891.                     end
  2892.                 end
  2893.             end
  2894.             --
  2895.             return false
  2896.         end
  2897.         --
  2898.         function keybind:Get()
  2899.             return keybind.current
  2900.         end
  2901.         --
  2902.         function keybind:Active()
  2903.             return keybind.active
  2904.         end
  2905.         --
  2906.         function keybind:Reset()
  2907.             for i,v in pairs(keybind.modemenu.buttons) do
  2908.                 v.Color = v.Text == keybind.mode and theme.accent or theme.textcolor
  2909.             end
  2910.             --
  2911.             keybind.active = keybind.mode == "Always" and true or false
  2912.             if keybind.current[1] and keybind.current[2] then
  2913.                 callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  2914.             end
  2915.         end
  2916.         --
  2917.         keybind:Change(def)
  2918.         --
  2919.         library.began[#library.began + 1] = function(Input)
  2920.             if keybind.current[1] and keybind.current[2] then
  2921.                 if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  2922.                     if keybind.mode == "Hold" then
  2923.                         keybind.active = true
  2924.                         if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  2925.                         callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  2926.                     elseif keybind.mode == "Toggle" then
  2927.                         keybind.active = not keybind.active
  2928.                         if keybind.active then window.keybindslist:Add(keybindname or name, keybind_value.Text) else window.keybindslist:Remove(keybindname or name) end
  2929.                         callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  2930.                     end
  2931.                 end
  2932.             end
  2933.             --
  2934.             if keybind.selecting and window.isVisible then
  2935.                 local done = keybind:Change(Input.KeyCode.Name ~= "Unknown" and Input.KeyCode or Input.UserInputType)
  2936.                 if done then
  2937.                     keybind.selecting = false
  2938.                     keybind.active = keybind.mode == "Always" and true or false
  2939.                     keybind_frame.Color = theme.light_contrast
  2940.                     --
  2941.                     window.keybindslist:Remove(keybindname or name)
  2942.                     --
  2943.                     callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  2944.                 end
  2945.             end
  2946.             --
  2947.             if not window.isVisible and keybind.selecting then
  2948.                 keybind.selecting = false
  2949.                 keybind_frame.Color = theme.light_contrast
  2950.             end
  2951.             --
  2952.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and keybind_outline.Visible then
  2953.                 if utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  2954.                     keybind.selecting = true
  2955.                     keybind_frame.Color = theme.dark_contrast
  2956.                 end
  2957.                 if keybind.open and keybind.modemenu.frame then
  2958.                     if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y, keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + keybind.modemenu.frame.Size.Y}) then
  2959.                         local changed = false
  2960.                         --
  2961.                         for i,v in pairs(keybind.modemenu.buttons) do
  2962.                             if utility:MouseOverDrawing({keybind.modemenu.frame.Position.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)), keybind.modemenu.frame.Position.X + keybind.modemenu.frame.Size.X, keybind.modemenu.frame.Position.Y + (15 * (i - 1)) + 15}) then
  2963.                                 keybind.mode = v.Text
  2964.                                 changed = true
  2965.                             end
  2966.                         end
  2967.                         --
  2968.                         if changed then keybind:Reset() end
  2969.                     else
  2970.                         keybind.open = not keybind.open
  2971.                         --
  2972.                         for i,v in pairs(keybind.modemenu.drawings) do
  2973.                             utility:Remove(v)
  2974.                         end
  2975.                         --
  2976.                         keybind.modemenu.drawings = {}
  2977.                         keybind.modemenu.buttons = {}
  2978.                         keybind.modemenu.frame = nil
  2979.                         --
  2980.                         window.currentContent.frame = nil
  2981.                         window.currentContent.keybind = nil
  2982.                     end
  2983.                 end
  2984.             end
  2985.             --
  2986.             if Input.UserInputType == Enum.UserInputType.MouseButton2 and window.isVisible and keybind_outline.Visible then
  2987.                 if utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + keybind.axis, section.section_frame.Position.X + section.section_frame.Size.X, section.section_frame.Position.Y + keybind.axis + 17}) and not window:IsOverContent() and not keybind.selecting then
  2988.                     window:CloseContent()
  2989.                     keybind.open = not keybind.open
  2990.                     --
  2991.                     local modemenu = utility:Create("Frame", {Vector2.new(keybind_outline.Size.X + 2,0), keybind_outline}, {
  2992.                         Size = utility:Size(0, 64, 0, 49),
  2993.                         Position = utility:Position(1, 2, 0, 0, keybind_outline),
  2994.                         Color = theme.outline,
  2995.                         Visible = page.open
  2996.                     }, keybind.modemenu.drawings);keybind.modemenu.frame = modemenu
  2997.                     --
  2998.                     local modemenu_inline = utility:Create("Frame", {Vector2.new(1,1), modemenu}, {
  2999.                         Size = utility:Size(1, -2, 1, -2, modemenu),
  3000.                         Position = utility:Position(0, 1, 0, 1, modemenu),
  3001.                         Color = theme.inline,
  3002.                         Visible = page.open
  3003.                     }, keybind.modemenu.drawings)
  3004.                     --
  3005.                     local modemenu_frame = utility:Create("Frame", {Vector2.new(1,1), modemenu_inline}, {
  3006.                         Size = utility:Size(1, -2, 1, -2, modemenu_inline),
  3007.                         Position = utility:Position(0, 1, 0, 1, modemenu_inline),
  3008.                         Color = theme.light_contrast,
  3009.                         Visible = page.open
  3010.                     }, keybind.modemenu.drawings)
  3011.                     --
  3012.                     local keybind__gradient = utility:Create("Image", {Vector2.new(0,0), modemenu_frame}, {
  3013.                         Size = utility:Size(1, 0, 1, 0, modemenu_frame),
  3014.                         Position = utility:Position(0, 0, 0 , 0, modemenu_frame),
  3015.                         Transparency = 0.5,
  3016.                         Visible = page.open
  3017.                     }, keybind.modemenu.drawings)
  3018.                     --
  3019.                     utility:LoadImage(keybind__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  3020.                     --
  3021.                     for i,v in pairs({"Always", "Toggle", "Hold"}) do
  3022.                         local button_title = utility:Create("TextLabel", {Vector2.new(modemenu_frame.Size.X/2,15 * (i-1)), modemenu_frame}, {
  3023.                             Text = v,
  3024.                             Size = theme.textsize,
  3025.                             Font = theme.font,
  3026.                             Color = v == keybind.mode and theme.accent or theme.textcolor,
  3027.                             Center = true,
  3028.                             OutlineColor = theme.textborder,
  3029.                             Position = utility:Position(0.5, 0, 0, 15 * (i-1), modemenu_frame),
  3030.                             Visible = page.open
  3031.                         }, keybind.modemenu.drawings);keybind.modemenu.buttons[#keybind.modemenu.buttons + 1] = button_title
  3032.                     end
  3033.                     --
  3034.                     window.currentContent.frame = modemenu
  3035.                     window.currentContent.keybind = keybind
  3036.                 end
  3037.             end
  3038.         end
  3039.         --
  3040.         library.ended[#library.ended + 1] = function(Input)
  3041.             if keybind.active and keybind.mode == "Hold" then
  3042.                 if keybind.current[1] and keybind.current[2] then
  3043.                     if Input.KeyCode == Enum[keybind.current[1]][keybind.current[2]] or Input.UserInputType == Enum[keybind.current[1]][keybind.current[2]] then
  3044.                         keybind.active = false
  3045.                         window.keybindslist:Remove(keybindname or name)
  3046.                         callback(Enum[keybind.current[1]][keybind.current[2]], keybind.active)
  3047.                     end
  3048.                 end
  3049.             end
  3050.         end
  3051.         --
  3052.         if pointer and tostring(pointer) ~= "" and tostring(pointer) ~= " " and not library.pointers[tostring(pointer)] then
  3053.             library.pointers[tostring(pointer)] = keybind
  3054.         end
  3055.         --
  3056.         section.currentAxis = section.currentAxis + 17 + 4
  3057.         section:Update()
  3058.         --
  3059.         return keybind
  3060.     end
  3061.     --
  3062.     function sections:Colorpicker(info)
  3063.         local info = info or {}
  3064.         local name = info.name or info.Name or info.title or info.Title or "New Colorpicker"
  3065.         local cpinfo = info.info or info.Info or name
  3066.         local def = info.def or info.Def or info.default or info.Default or Color3.fromRGB(255, 0, 0)
  3067.         local transp = info.transparency or info.Transparency or info.transp or info.Transp or info.alpha or info.Alpha or nil
  3068.         local pointer = info.pointer or info.Pointer or info.flag or info.Flag or nil
  3069.         local callback = info.callback or info.callBack or info.Callback or info.CallBack or function()end
  3070.         --
  3071.         local window = self.window
  3072.         local page = self.page
  3073.         local section = self
  3074.         --
  3075.         local hh, ss, vv = def:ToHSV()
  3076.         local colorpicker = {axis = section.currentAxis, secondColorpicker = false, current = {hh, ss, vv , (transp or 0)}, holding = {picker = false, huepicker = false, transparency = false}, holder = {inline = nil, picker = nil, picker_cursor = nil, huepicker = nil, huepicker_cursor = {}, transparency = nil, transparencybg = nil, transparency_cursor = {}, drawings = {}}}
  3077.         --
  3078.         local colorpicker_outline = utility:Create("Frame", {Vector2.new(section.section_frame.Size.X-(30+4),colorpicker.axis), section.section_frame}, {
  3079.             Size = utility:Size(0, 30, 0, 15),
  3080.             Position = utility:Position(1, -(30+4), 0, colorpicker.axis, section.section_frame),
  3081.             Color = theme.outline,
  3082.             Visible = page.open
  3083.         }, section.visibleContent)
  3084.         --
  3085.         local colorpicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_outline}, {
  3086.             Size = utility:Size(1, -2, 1, -2, colorpicker_outline),
  3087.             Position = utility:Position(0, 1, 0, 1, colorpicker_outline),
  3088.             Color = theme.inline,
  3089.             Visible = page.open
  3090.         }, section.visibleContent)
  3091.         --
  3092.         local colorpicker__transparency
  3093.         if transp then
  3094.             colorpicker__transparency = utility:Create("Image", {Vector2.new(1,1), colorpicker_inline}, {
  3095.                 Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  3096.                 Position = utility:Position(0, 1, 0 , 1, colorpicker_inline),
  3097.                 Visible = page.open
  3098.             }, section.visibleContent)
  3099.         end
  3100.         --
  3101.         local colorpicker_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_inline}, {
  3102.             Size = utility:Size(1, -2, 1, -2, colorpicker_inline),
  3103.             Position = utility:Position(0, 1, 0, 1, colorpicker_inline),
  3104.             Color = def,
  3105.             Transparency = transp and (1 - transp) or 1,
  3106.             Visible = page.open
  3107.         }, section.visibleContent)
  3108.         --
  3109.         local colorpicker__gradient = utility:Create("Image", {Vector2.new(0,0), colorpicker_frame}, {
  3110.             Size = utility:Size(1, 0, 1, 0, colorpicker_frame),
  3111.             Position = utility:Position(0, 0, 0 , 0, colorpicker_frame),
  3112.             Transparency = 0.5,
  3113.             Visible = page.open
  3114.         }, section.visibleContent)
  3115.         --
  3116.         local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,colorpicker.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2)), section.section_frame}, {
  3117.             Text = name,
  3118.             Size = theme.textsize,
  3119.             Font = theme.font,
  3120.             Color = theme.textcolor,
  3121.             OutlineColor = theme.textborder,
  3122.             Position = utility:Position(0, 4, 0, colorpicker.axis + (15/2) - (utility:GetTextBounds(name, theme.textsize, theme.font).Y/2), section.section_frame),
  3123.             Visible = page.open
  3124.         }, section.visibleContent)
  3125.         --
  3126.         if transp then
  3127.             utility:LoadImage(colorpicker__transparency, "cptransp", "https://i.imgur.com/IIPee2A.png")
  3128.         end
  3129.         utility:LoadImage(colorpicker__gradient, "gradient", "https://i.imgur.com/5hmlrjX.png")
  3130.         --
  3131.         function colorpicker:Set(color, transp_val)
  3132.             if typeof(color) == "table" then
  3133.                 colorpicker.current = color
  3134.                 colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3135.                 colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  3136.                 callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  3137.             elseif typeof(color) == "color3" then
  3138.                 local h, s, v = color:ToHSV()
  3139.                 colorpicker.current = {h, s, v, (transp_val or 0)}
  3140.                 colorpicker_frame.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3141.                 colorpicker_frame.Transparency = 1 - colorpicker.current[4]
  3142.                 callback(Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3]), colorpicker.current[4])
  3143.             end
  3144.         end
  3145.         --
  3146.         function colorpicker:Refresh()
  3147.             local mouseLocation = utility:MouseLocation()
  3148.             if colorpicker.open and colorpicker.holder.picker and colorpicker.holding.picker then
  3149.                 colorpicker.current[2] = math.clamp(mouseLocation.X - colorpicker.holder.picker.Position.X, 0, colorpicker.holder.picker.Size.X) / colorpicker.holder.picker.Size.X
  3150.                 --
  3151.                 colorpicker.current[3] = 1-(math.clamp(mouseLocation.Y - colorpicker.holder.picker.Position.Y, 0, colorpicker.holder.picker.Size.Y) / colorpicker.holder.picker.Size.Y)
  3152.                 --
  3153.                 colorpicker.holder.picker_cursor.Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker.holder.picker)
  3154.                 --
  3155.                 utility:UpdateOffset(colorpicker.holder.picker_cursor, {Vector2.new((colorpicker.holder.picker.Size.X*colorpicker.current[2])-3,(colorpicker.holder.picker.Size.Y*(1-colorpicker.current[3]))-3), colorpicker.holder.picker})
  3156.                 --
  3157.                 if colorpicker.holder.transparencybg then
  3158.                     colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3159.                 end
  3160.             elseif colorpicker.open and colorpicker.holder.huepicker and colorpicker.holding.huepicker then
  3161.                 colorpicker.current[1] = (math.clamp(mouseLocation.Y - colorpicker.holder.huepicker.Position.Y, 0, colorpicker.holder.huepicker.Size.Y) / colorpicker.holder.huepicker.Size.Y)
  3162.                 --
  3163.                 colorpicker.holder.huepicker_cursor[1].Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker.holder.huepicker)
  3164.                 colorpicker.holder.huepicker_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[1])
  3165.                 colorpicker.holder.huepicker_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.huepicker_cursor[2])
  3166.                 colorpicker.holder.huepicker_cursor[3].Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3167.                 --
  3168.                 utility:UpdateOffset(colorpicker.holder.huepicker_cursor[1], {Vector2.new(-3,(colorpicker.holder.huepicker.Size.Y*colorpicker.current[1])-3), colorpicker.holder.huepicker})
  3169.                 --
  3170.                 colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3171.                 --
  3172.                 if colorpicker.holder.transparency_cursor and colorpicker.holder.transparency_cursor[3] then
  3173.                     colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  3174.                 end
  3175.                 --
  3176.                 if colorpicker.holder.transparencybg then
  3177.                     colorpicker.holder.transparencybg.Color = Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3178.                 end
  3179.             elseif colorpicker.open and colorpicker.holder.transparency and colorpicker.holding.transparency then
  3180.                 colorpicker.current[4] = 1 - (math.clamp(mouseLocation.X - colorpicker.holder.transparency.Position.X, 0, colorpicker.holder.transparency.Size.X) / colorpicker.holder.transparency.Size.X)
  3181.                 --
  3182.                 colorpicker.holder.transparency_cursor[1].Position = utility:Position(1-colorpicker.current[4], -3, 0, -3, colorpicker.holder.transparency)
  3183.                 colorpicker.holder.transparency_cursor[2].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[1])
  3184.                 colorpicker.holder.transparency_cursor[3].Position = utility:Position(0, 1, 0, 1, colorpicker.holder.transparency_cursor[2])
  3185.                 colorpicker.holder.transparency_cursor[3].Color = Color3.fromHSV(0, 0, 1 - colorpicker.current[4])
  3186.                 colorpicker_frame.Transparency = (1 - colorpicker.current[4])
  3187.                 --
  3188.                 utility:UpdateTransparency(colorpicker_frame, (1 - colorpicker.current[4]))
  3189.                 utility:UpdateOffset(colorpicker.holder.transparency_cursor[1], {Vector2.new((colorpicker.holder.transparency.Size.X*(1-colorpicker.current[4]))-3,-3), colorpicker.holder.transparency})
  3190.                 --
  3191.                 colorpicker.holder.background.Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3192.             end
  3193.             --
  3194.             colorpicker:Set(colorpicker.current)
  3195.         end
  3196.         --
  3197.         function colorpicker:Get()
  3198.             return Color3.fromHSV(colorpicker.current[1], colorpicker.current[2], colorpicker.current[3])
  3199.         end
  3200.         --
  3201.         library.began[#library.began + 1] = function(Input)
  3202.             if Input.UserInputType == Enum.UserInputType.MouseButton1 and window.isVisible and colorpicker_outline.Visible then
  3203.                 if colorpicker.open and colorpicker.holder.inline and utility:MouseOverDrawing({colorpicker.holder.inline.Position.X, colorpicker.holder.inline.Position.Y, colorpicker.holder.inline.Position.X + colorpicker.holder.inline.Size.X, colorpicker.holder.inline.Position.Y + colorpicker.holder.inline.Size.Y}) then
  3204.                     if colorpicker.holder.picker and utility:MouseOverDrawing({colorpicker.holder.picker.Position.X - 2, colorpicker.holder.picker.Position.Y - 2, colorpicker.holder.picker.Position.X - 2 + colorpicker.holder.picker.Size.X + 4, colorpicker.holder.picker.Position.Y - 2 + colorpicker.holder.picker.Size.Y + 4}) then
  3205.                         colorpicker.holding.picker = true
  3206.                         colorpicker:Refresh()
  3207.                     elseif colorpicker.holder.huepicker and utility:MouseOverDrawing({colorpicker.holder.huepicker.Position.X - 2, colorpicker.holder.huepicker.Position.Y - 2, colorpicker.holder.huepicker.Position.X - 2 + colorpicker.holder.huepicker.Size.X + 4, colorpicker.holder.huepicker.Position.Y - 2 + colorpicker.holder.huepicker.Size.Y + 4}) then
  3208.                         colorpicker.holding.huepicker = true
  3209.                         colorpicker:Refresh()
  3210.                     elseif colorpicker.holder.transparency and utility:MouseOverDrawing({colorpicker.holder.transparency.Position.X - 2, colorpicker.holder.transparency.Position.Y - 2, colorpicker.holder.transparency.Position.X - 2 + colorpicker.holder.transparency.Size.X + 4, colorpicker.holder.transparency.Position.Y - 2 + colorpicker.holder.transparency.Size.Y + 4}) then
  3211.                         colorpicker.holding.transparency = true
  3212.                         colorpicker:Refresh()
  3213.                     end
  3214.                 elseif utility:MouseOverDrawing({section.section_frame.Position.X, section.section_frame.Position.Y + colorpicker.axis, section.section_frame.Position.X + section.section_frame.Size.X - (colorpicker.secondColorpicker and (30+4) or 0), section.section_frame.Position.Y + colorpicker.axis + 15}) and not window:IsOverContent() then
  3215.                     if not colorpicker.open then
  3216.                         window:CloseContent()
  3217.                         colorpicker.open = not colorpicker.open
  3218.                         --
  3219.                         local colorpicker_open_outline = utility:Create("Frame", {Vector2.new(4,colorpicker.axis + 19), section.section_frame}, {
  3220.                             Size = utility:Size(1, -8, 0, transp and 219 or 200, section.section_frame),
  3221.                             Position = utility:Position(0, 4, 0, colorpicker.axis + 19, section.section_frame),
  3222.                             Color = theme.outline
  3223.                         }, colorpicker.holder.drawings);colorpicker.holder.inline = colorpicker_open_outline
  3224.                         --
  3225.                         local colorpicker_open_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_outline}, {
  3226.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_outline),
  3227.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_outline),
  3228.                             Color = theme.inline
  3229.                         }, colorpicker.holder.drawings)
  3230.                         --
  3231.                         local colorpicker_open_frame = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_inline}, {
  3232.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_inline),
  3233.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_inline),
  3234.                             Color = theme.dark_contrast
  3235.                         }, colorpicker.holder.drawings)
  3236.                         --
  3237.                         local colorpicker_open_accent = utility:Create("Frame", {Vector2.new(0,0), colorpicker_open_frame}, {
  3238.                             Size = utility:Size(1, 0, 0, 2, colorpicker_open_frame),
  3239.                             Position = utility:Position(0, 0, 0, 0, colorpicker_open_frame),
  3240.                             Color = theme.accent
  3241.                         }, colorpicker.holder.drawings)
  3242.                         --
  3243.                         local colorpicker_title = utility:Create("TextLabel", {Vector2.new(4,2), colorpicker_open_frame}, {
  3244.                             Text = cpinfo,
  3245.                             Size = theme.textsize,
  3246.                             Font = theme.font,
  3247.                             Color = theme.textcolor,
  3248.                             OutlineColor = theme.textborder,
  3249.                             Position = utility:Position(0, 4, 0, 2, colorpicker_open_frame),
  3250.                         }, colorpicker.holder.drawings)
  3251.                         --
  3252.                         local colorpicker_open_picker_outline = utility:Create("Frame", {Vector2.new(4,17), colorpicker_open_frame}, {
  3253.                             Size = utility:Size(1, -27, 1, transp and -40 or -21, colorpicker_open_frame),
  3254.                             Position = utility:Position(0, 4, 0, 17, colorpicker_open_frame),
  3255.                             Color = theme.outline
  3256.                         }, colorpicker.holder.drawings)
  3257.                         --
  3258.                         local colorpicker_open_picker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_outline}, {
  3259.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_outline),
  3260.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_outline),
  3261.                             Color = theme.inline
  3262.                         }, colorpicker.holder.drawings)
  3263.                         --
  3264.                         local colorpicker_open_picker_bg = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_picker_inline}, {
  3265.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_picker_inline),
  3266.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_picker_inline),
  3267.                             Color = Color3.fromHSV(colorpicker.current[1],1,1)
  3268.                         }, colorpicker.holder.drawings);colorpicker.holder.background = colorpicker_open_picker_bg
  3269.                         --
  3270.                         local colorpicker_open_picker_image = utility:Create("Image", {Vector2.new(0,0), colorpicker_open_picker_bg}, {
  3271.                             Size = utility:Size(1, 0, 1, 0, colorpicker_open_picker_bg),
  3272.                             Position = utility:Position(0, 0, 0 , 0, colorpicker_open_picker_bg),
  3273.                         }, colorpicker.holder.drawings);colorpicker.holder.picker = colorpicker_open_picker_image
  3274.                         --
  3275.                         local colorpicker_open_picker_cursor = utility:Create("Image", {Vector2.new((colorpicker_open_picker_image.Size.X*colorpicker.current[2])-3,(colorpicker_open_picker_image.Size.Y*(1-colorpicker.current[3]))-3), colorpicker_open_picker_image}, {
  3276.                             Size = utility:Size(0, 6, 0, 6, colorpicker_open_picker_image),
  3277.                             Position = utility:Position(colorpicker.current[2], -3, 1-colorpicker.current[3] , -3, colorpicker_open_picker_image),
  3278.                         }, colorpicker.holder.drawings);colorpicker.holder.picker_cursor = colorpicker_open_picker_cursor
  3279.                         --
  3280.                         local colorpicker_open_huepicker_outline = utility:Create("Frame", {Vector2.new(colorpicker_open_frame.Size.X-19,17), colorpicker_open_frame}, {
  3281.                             Size = utility:Size(0, 15, 1, transp and -40 or -21, colorpicker_open_frame),
  3282.                             Position = utility:Position(1, -19, 0, 17, colorpicker_open_frame),
  3283.                             Color = theme.outline
  3284.                         }, colorpicker.holder.drawings)
  3285.                         --
  3286.                         local colorpicker_open_huepicker_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_outline}, {
  3287.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_outline),
  3288.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_outline),
  3289.                             Color = theme.inline
  3290.                         }, colorpicker.holder.drawings)
  3291.                         --
  3292.                         local colorpicker_open_huepicker_image = utility:Create("Image", {Vector2.new(1,1), colorpicker_open_huepicker_inline}, {
  3293.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_inline),
  3294.                             Position = utility:Position(0, 1, 0 , 1, colorpicker_open_huepicker_inline),
  3295.                         }, colorpicker.holder.drawings);colorpicker.holder.huepicker = colorpicker_open_huepicker_image
  3296.                         --
  3297.                         local colorpicker_open_huepicker_cursor_outline = utility:Create("Frame", {Vector2.new(-3,(colorpicker_open_huepicker_image.Size.Y*colorpicker.current[1])-3), colorpicker_open_huepicker_image}, {
  3298.                             Size = utility:Size(1, 6, 0, 6, colorpicker_open_huepicker_image),
  3299.                             Position = utility:Position(0, -3, colorpicker.current[1], -3, colorpicker_open_huepicker_image),
  3300.                             Color = theme.outline
  3301.                         }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[1] = colorpicker_open_huepicker_cursor_outline
  3302.                         --
  3303.                         local colorpicker_open_huepicker_cursor_inline = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_outline}, {
  3304.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_outline),
  3305.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_outline),
  3306.                             Color = theme.textcolor
  3307.                         }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[2] = colorpicker_open_huepicker_cursor_inline
  3308.                         --
  3309.                         local colorpicker_open_huepicker_cursor_color = utility:Create("Frame", {Vector2.new(1,1), colorpicker_open_huepicker_cursor_inline}, {
  3310.                             Size = utility:Size(1, -2, 1, -2, colorpicker_open_huepicker_cursor_inline),
  3311.                             Position = utility:Position(0, 1, 0, 1, colorpicker_open_huepicker_cursor_inline),
  3312.                             Color = Color3.fromHSV(colorpicker.current[1], 1, 1)
  3313.                         }, colorpicker.holder.drawings);colorpicker.holder.huepicker_cursor[3] = colorpicker_open_huepicker_cursor_color
  3314.