Advertisement
ThePersoni

Azure Library

Mar 24th, 2023 (edited)
1,438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.51 KB | None | 0 0
  1. --[[
  2.    __    ____  __  __  ____  ____
  3.   /__\  (_   )(  )(  )(  _ \( ___)
  4.  /(__)\  / /_  )(__)(  )   / )__)
  5. (__)(__)(____)(______)(_)\_)(____)
  6.              
  7. ]]--
  8.  
  9. --Edited by Happppya#6091 to use for my own personal scripts
  10. --not made by me
  11.  
  12. --light theme
  13. local theme = {
  14.     Tab_Color = Color3.fromRGB(255, 255, 255),
  15.     Tab_Text_Color = Color3.fromRGB(0, 0, 0),
  16.     Description_Color = Color3.fromRGB(255, 255, 255),
  17.     Description_Text_Color = Color3.fromRGB(0, 0, 0),
  18.     Container_Color = Color3.fromRGB(255, 255, 255),
  19.     Container_Text_Color = Color3.fromRGB(0, 0, 0),
  20.     Button_Text_Color = Color3.fromRGB(0, 0, 0),
  21.     Toggle_Box_Color = Color3.fromRGB(243, 243, 243),
  22.     Toggle_Inner_Color = Color3.fromRGB(94, 255, 180),
  23.     Toggle_Text_Color = Color3.fromRGB(0, 0, 0),
  24.     Toggle_Border_Color = Color3.fromRGB(225, 225, 225),
  25.     Slider_Bar_Color = Color3.fromRGB(243, 243, 243),
  26.     Slider_Inner_Color = Color3.fromRGB(94, 255, 180),
  27.     Slider_Text_Color = Color3.fromRGB(0, 0, 0),
  28.     Slider_Border_Color = Color3.fromRGB(255, 255, 255),
  29.     Dropdown_Text_Color = Color3.fromRGB(0, 0, 0),
  30.     Dropdown_Option_BorderSize = 1,
  31.     Dropdown_Option_BorderColor = Color3.fromRGB(235, 235, 235),
  32.     Dropdown_Option_Color = Color3.fromRGB(255, 255, 255),
  33.     Dropdown_Option_Text_Color = Color3.fromRGB(0, 0, 0),
  34.     TextBox_Text_Color = Color3.fromRGB(0, 0, 0),
  35.     TextBox_Color = Color3.fromRGB(255, 255, 255),
  36.     TextBox_Underline_Color = Color3.fromRGB(94, 255, 180)
  37. }
  38.  
  39. --dark theme
  40.  
  41.  
  42. local dark_theme = {
  43.     Tab_Color = Color3.fromRGB(31, 32, 33),
  44.     Tab_Text_Color = Color3.fromRGB(255, 255, 255),
  45.     Description_Color = Color3.fromRGB(31, 32, 33),
  46.     Description_Text_Color = Color3.fromRGB(255, 255, 255),
  47.     Container_Color = Color3.fromRGB(31, 32, 33),
  48.     Container_Text_Color = Color3.fromRGB(255, 255, 255),
  49.     Button_Text_Color = Color3.fromRGB(255, 255, 255),
  50.     Toggle_Box_Color = Color3.fromRGB(31, 32, 33),
  51.     Toggle_Inner_Color = Color3.fromRGB(250, 112, 112),
  52.     Toggle_Text_Color = Color3.fromRGB(255, 255, 255),
  53.     Toggle_Border_Color = Color3.fromRGB(50, 49, 50),
  54.     Slider_Bar_Color = Color3.fromRGB(31, 32, 33),
  55.     Slider_Inner_Color = Color3.fromRGB(250, 112, 112),
  56.     Slider_Text_Color = Color3.fromRGB(255, 255, 255),
  57.     Slider_Border_Color = Color3.fromRGB(50, 49, 50),
  58.     Dropdown_Text_Color = Color3.fromRGB(255, 255, 255),
  59.     Dropdown_Option_BorderSize = 1,
  60.     Dropdown_Option_BorderColor = Color3.fromRGB(49, 50, 51),
  61.     Dropdown_Option_Color = Color3.fromRGB(31, 32, 33),
  62.     Dropdown_Option_Text_Color = Color3.fromRGB(255, 255, 255),
  63.     TextBox_Text_Color = Color3.fromRGB(255, 255, 255),
  64.     TextBox_Color = Color3.fromRGB(31, 32, 33),
  65.     TextBox_Underline_Color = Color3.fromRGB(255, 92, 92)
  66. }
  67.  
  68. if game:GetService("CoreGui"):FindFirstChild("uiui") then game:GetService("CoreGui"):FindFirstChild("uiui"):Destroy() end
  69.  
  70. local library = {}
  71. local uiui = Instance.new("ScreenGui")
  72. local background = Instance.new("Frame")
  73. local UIListLayout = Instance.new("UIListLayout")
  74. local UIPadding = Instance.new("UIPadding")
  75.  
  76. local TweenService = game:GetService("TweenService")
  77.  
  78. uiui.Name = "uiui"
  79. uiui.Parent = game:GetService("CoreGui")
  80. uiui.DisplayOrder = 1
  81.  
  82. background.Name = "background"
  83. background.Parent = uiui
  84. background.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  85. background.BackgroundTransparency = 1.000
  86. background.Size = UDim2.new(0, 1234, 0, 664)
  87.  
  88. UIListLayout.Parent = background
  89. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  90. UIListLayout.Padding = UDim.new(0, 10)
  91.  
  92. UIPadding.Parent = background
  93. UIPadding.PaddingLeft = UDim.new(0, 10)
  94. UIPadding.PaddingTop = UDim.new(0, 10)
  95.  
  96. function library:CreateTab(text, desc, mode)
  97.     text = text or ""
  98.     desc = desc or ""
  99.     mode = mode or false
  100.    
  101.     if mode then
  102.         theme = dark_theme
  103.     elseif mode == nil then
  104.         theme = _G.CustomTheme
  105.     end
  106.     local Tab = Instance.new("ImageButton")
  107.     local tabtext = Instance.new("TextLabel")
  108.     local description = Instance.new("ImageLabel")
  109.     local descriptionText = Instance.new("TextLabel")
  110.     local container = Instance.new("ImageLabel")
  111.     local MainPadder = Instance.new("UIListLayout")
  112.     local MainLiser = Instance.new("UIListLayout")
  113.  
  114.     MainPadder.Name = "MainPadder"
  115.     MainPadder.Parent = container
  116.     MainPadder.SortOrder = Enum.SortOrder.LayoutOrder
  117.  
  118.     MainLiser.Name = "MainLiser"
  119.     MainLiser.Parent = container
  120.     MainLiser.SortOrder = Enum.SortOrder.LayoutOrder
  121.  
  122.     local TextBounds =
  123.         game:GetService("TextService"):GetTextSize(
  124.         desc,
  125.         12,
  126.         Enum.Font.Gotham,
  127.         Vector2.new(math.huge, math.huge)
  128.     )
  129.  
  130.     Tab.Name = math.random(1, 15) .. text .. " Tab"
  131.     Tab.Parent = background
  132.     Tab.ImageColor3 = theme.Tab_Color
  133.     Tab.BackgroundColor3 = theme.Tab_Color
  134.     local uiC = Instance.new("UICorner", Tab)
  135.     uiC.CornerRadius = UDim.new(0,6)
  136.     Tab.BackgroundTransparency = 0
  137.     Tab.Size = UDim2.new(0, 155, 0, 30)
  138.     Tab.Image = "rbxassetid://3570695787"
  139.     Tab.ScaleType = Enum.ScaleType.Slice
  140.     Tab.SliceCenter = Rect.new(100, 100, 100, 100)
  141.     Tab.SliceScale = 0.030
  142.     local HoverEffect = true
  143.     local IsOpen = false
  144.     Tab.MouseEnter:Connect(
  145.         function()
  146.             if HoverEffect and IsOpen == false then
  147.                 TweenService:Create(
  148.                     description,
  149.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  150.                     {Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
  151.                 ):Play()
  152.             else
  153.                 TweenService:Create(
  154.                     description,
  155.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  156.                     {Size = UDim2.new(0, 0, 0, 30)}
  157.                 ):Play()
  158.             end
  159.         end
  160.     )
  161.     Tab.MouseLeave:Connect(
  162.         function()
  163.             TweenService:Create(
  164.                 description,
  165.                 TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  166.                 {Size = UDim2.new(0, 0, 0, 30)}
  167.             ):Play()
  168.         end
  169.     )
  170.     tabtext.Name = "tabtext"
  171.     tabtext.Parent = Tab
  172.     tabtext.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  173.     tabtext.BackgroundTransparency = 1.000
  174.     tabtext.Size = UDim2.new(0, 155, 0, 30)
  175.     tabtext.Font = Enum.Font.Gotham
  176.     tabtext.Text = text
  177.     tabtext.TextColor3 = theme.Tab_Text_Color
  178.     tabtext.TextSize = 14.000
  179.  
  180.     description.Name = "description"
  181.     description.Parent = Tab
  182.     description.ImageColor3 = theme.Description_Color
  183.     description.BackgroundColor3 = theme.Description_Color
  184.     local uiC = Instance.new("UICorner", description)
  185.     uiC.CornerRadius = UDim.new(0,6)
  186.     description.BackgroundTransparency = 0
  187.     description.BorderSizePixel = 0
  188.     description.ClipsDescendants = true
  189.     description.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
  190.     description.Size = UDim2.new(0, 0, 0, 30)
  191.     description.Image = "rbxassetid://3570695787"
  192.     description.ScaleType = Enum.ScaleType.Slice
  193.     description.SliceCenter = Rect.new(100, 100, 100, 100)
  194.     description.SliceScale = 0.030
  195.  
  196.     descriptionText.Name = "descriptionText"
  197.     descriptionText.Parent = description
  198.     descriptionText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  199.     descriptionText.BackgroundTransparency = 1.000
  200.     descriptionText.Position = UDim2.new(0, 0, 0.022590382, 0)
  201.     descriptionText.Size = UDim2.new(0, TextBounds.X + 20, 0, 30)
  202.     descriptionText.Font = Enum.Font.Gotham
  203.     descriptionText.Text = desc
  204.     descriptionText.TextColor3 = theme.Description_Text_Color
  205.     descriptionText.TextSize = 12.000
  206.  
  207.     local BodyYSize = 0
  208.  
  209.     container.Name = "container"
  210.     container.Parent = Tab
  211.     container.ImageColor3 = theme.Container_Color
  212.     container.BackgroundColor3 = theme.Container_Color
  213.     local uiC = Instance.new("UICorner", container)
  214.     uiC.CornerRadius = UDim.new(0,6)
  215.     container.BackgroundTransparency = 0
  216.     container.BorderSizePixel = 0
  217.     container.ClipsDescendants = true
  218.     container.Position = UDim2.new(1.04969442, 0, -0.022590382, 0)
  219.     container.Size = UDim2.new(0, 185, 0, 0)
  220.     container.Image = "rbxassetid://3570695787"
  221.     container.ScaleType = Enum.ScaleType.Slice
  222.     container.SliceCenter = Rect.new(100, 100, 100, 100)
  223.     container.SliceScale = 0.030
  224.     local HoverEffect = true
  225.     Tab.MouseButton1Click:Connect(
  226.         function()
  227.             for i, v in next, background:GetChildren() do
  228.                 for i, v in next, v:GetChildren() do
  229.                     if v.Name == "container" and v.Name ~= Tab.Name then
  230.                         IsOpen = false
  231.                         TweenService:Create(
  232.                             v,
  233.                             TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  234.                             {Size = UDim2.new(0, 185, 0, 0)}
  235.                         ):Play()
  236.                         HoverEffect = false
  237.                     end
  238.                     IsOpen = true
  239.                     TweenService:Create(
  240.                         container,
  241.                         TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  242.                         {Size = UDim2.new(0, 185, 0, BodyYSize)}
  243.                     ):Play()
  244.                     HoverEffect = true
  245.                 end
  246.             end
  247.             if container.Size == UDim2.new(0, 185, 0, BodyYSize) then
  248.                 IsOpen = false
  249.                 TweenService:Create(
  250.                     container,
  251.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  252.                     {Size = UDim2.new(0, 185, 0, 0)}
  253.                 ):Play()
  254.                
  255.                 TweenService:Create(
  256.                     description,
  257.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  258.                     {Size = UDim2.new(0, TextBounds.X + 20, 0, 30)}
  259.                 ):Play()
  260.                 HoverEffect = true
  261.             elseif container.Size == UDim2.new(0, 185, 0, 0) then
  262.                 IsOpen = true
  263.                 TweenService:Create(
  264.                     container,
  265.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),
  266.                     {Size = UDim2.new(0, 185, 0, BodyYSize)}
  267.                 ):Play()
  268.                
  269.                 TweenService:Create(
  270.                     description,
  271.                     TweenInfo.new(0.1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  272.                     {Size = UDim2.new(0, 0, 0, 30)}
  273.                 ):Play()
  274.                 HoverEffect = false
  275.             end
  276.         end
  277.     )
  278.  
  279.     local function resize(value)
  280.         BodyYSize = BodyYSize + value
  281.     end
  282.  
  283.     local s = {}
  284.  
  285.     function s:CreateToggle(text, callback)
  286.         text = text or ""
  287.         callback = callback or function()
  288.             end
  289.         local Toggle = Instance.new("TextButton")
  290.         local ToggleBox = Instance.new("Frame")
  291.         local ToggleInner = Instance.new("Frame")
  292.         local ToggleText = Instance.new("TextLabel")
  293.  
  294.         Toggle.Name = "Toggle"
  295.         Toggle.Parent = container
  296.         Toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  297.         Toggle.BackgroundTransparency = 1.000
  298.         Toggle.Size = UDim2.new(0, 185, 0, 30)
  299.         Toggle.Font = Enum.Font.SourceSans
  300.         Toggle.Text = ""
  301.         Toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
  302.         Toggle.TextSize = 11.000
  303.  
  304.         ToggleBox.Name = "ToggleBox"
  305.         ToggleBox.Parent = Toggle
  306.         ToggleBox.BackgroundColor3 = theme.Toggle_Box_Color
  307.         ToggleBox.BorderColor3 = theme.Toggle_Border_Color
  308.         ToggleBox.Position = UDim2.new(0.0416216031, 0, 0.166666672, 0)
  309.         ToggleBox.Size = UDim2.new(0, 20, 0, 20)
  310.  
  311.         ToggleInner.Name = "ToggleInner"
  312.         ToggleInner.Parent = Toggle
  313.         ToggleInner.AnchorPoint = Vector2.new(0.5, 0.5)
  314.         ToggleInner.BackgroundColor3 = theme.Toggle_Inner_Color
  315.         ToggleInner.BorderSizePixel = 0
  316.         ToggleInner.Position = UDim2.new(0.096, 0, 0.5, 0)
  317.  
  318.         ToggleText.Name = "ToggleText"
  319.         ToggleText.Parent = Toggle
  320.         ToggleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  321.         ToggleText.BackgroundTransparency = 1.000
  322.         ToggleText.Position = UDim2.new(0.149729788, 0, 0, 0)
  323.         ToggleText.Size = UDim2.new(0, 157, 0, 30)
  324.         ToggleText.Font = Enum.Font.Gotham
  325.         ToggleText.Text = "   " .. text
  326.         ToggleText.TextColor3 = theme.Toggle_Text_Color
  327.         ToggleText.TextSize = 12.000
  328.         ToggleText.TextXAlignment = Enum.TextXAlignment.Left
  329.  
  330.         local Toggled = false
  331.  
  332.         Toggle.MouseButton1Click:Connect(
  333.             function()
  334.                 Toggled = not Toggled
  335.  
  336.                 if Toggled then
  337.                     TweenService:Create(
  338.                         ToggleInner,
  339.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  340.                         {Size = UDim2.new(0, 20, 0, 20)}
  341.                     ):Play()
  342.                 elseif not Toggled then
  343.                     TweenService:Create(
  344.                         ToggleInner,
  345.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  346.                         {Size = UDim2.new(0, 0, 0, 0)}
  347.                     ):Play()
  348.                 end
  349.  
  350.                 callback(Toggled)
  351.             end
  352.         )
  353.  
  354.            
  355.         local aa = {}
  356.  
  357.         function aa:Set(bool)
  358.             if bool then
  359.                 Toggled = true
  360.                 TweenService:Create(
  361.                     ToggleInner,
  362.                     TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  363.                     {Size = UDim2.new(0, 20, 0, 20)}
  364.                 ):Play()
  365.             else
  366.                 Toggled = false
  367.                 TweenService:Create(
  368.                     ToggleInner,
  369.                     TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  370.                     {Size = UDim2.new(0, 0, 0, 0)}
  371.                 ):Play()
  372.             end
  373.         end
  374.  
  375.         resize(30)
  376.  
  377.         return aa;
  378.     end
  379.     function s:CreateSlider(text, minvalue, maxvalue, callback)
  380.         text = text or ""
  381.         callback = callback or function()
  382.             end
  383.         minvalue = minvalue or 0
  384.         maxvalue = maxvalue or 0
  385.         local Slider = Instance.new("TextButton")
  386.         local SliderText = Instance.new("TextLabel")
  387.         local Slider_2 = Instance.new("Frame")
  388.         local SliderInner = Instance.new("Frame")
  389.  
  390.         Slider.Name = "Slider"
  391.         Slider.Parent = container
  392.         Slider.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  393.         Slider.BackgroundTransparency = 1.000
  394.         Slider.Position = UDim2.new(0, 0, 0.410958916, 0)
  395.         Slider.Size = UDim2.new(0, 185, 0, 45)
  396.         Slider.Font = Enum.Font.SourceSans
  397.         Slider.Text = ""
  398.         Slider.TextColor3 = Color3.fromRGB(0, 0, 0)
  399.         Slider.TextSize = 10.000
  400.  
  401.         SliderText.Name = "SliderText"
  402.         SliderText.Parent = Slider
  403.         SliderText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  404.         SliderText.BackgroundTransparency = 1.000
  405.         SliderText.Position = UDim2.new(0.0362162739, 0, -0.0666666701, 0)
  406.         SliderText.Size = UDim2.new(0, 157, 0, 30)
  407.         SliderText.Font = Enum.Font.Gotham
  408.         SliderText.Text = text .. " / " .. minvalue
  409.         SliderText.TextColor3 = theme.Slider_Text_Color
  410.         SliderText.TextSize = 11.000
  411.         SliderText.TextXAlignment = Enum.TextXAlignment.Left
  412.  
  413.         Slider_2.Name = "Slider"
  414.         Slider_2.Parent = Slider
  415.         Slider_2.BackgroundColor3 = theme.Slider_Bar_Color
  416.         Slider_2.BorderColor3 = theme.Slider_Border_Color
  417.         Slider_2.Position = UDim2.new(0.0319999084, 0, 0.588888884, 0)
  418.         Slider_2.Size = UDim2.new(0, 172, 0, 9)
  419.         SliderInner.Name = "SliderInner"
  420.         SliderInner.Parent = Slider_2
  421.         SliderInner.BackgroundColor3 = theme.Slider_Inner_Color
  422.         SliderInner.BorderSizePixel = 0
  423.         SliderInner.Position = UDim2.new(0, 0, 0.055555556, 0)
  424.         SliderInner.Size = UDim2.new(0, 0, 0, 9)
  425.  
  426.         local mouse = game.Players.LocalPlayer:GetMouse()
  427.         local uis = game:GetService("UserInputService")
  428.         local Value
  429.         local down = false
  430.  
  431.         Slider.MouseButton1Down:Connect(function()
  432.             down = true
  433.             Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  434.             SliderText.Text = text .. " / " .. Value
  435.             pcall(callback, Value)
  436.             SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
  437.             while game:GetService("RunService").RenderStepped:wait() and down do
  438.                 Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  439.                 SliderText.Text = text .. " / " .. Value                
  440.                 pcall(callback, Value)
  441.                 SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, .07)
  442.             end
  443.         end)
  444.  
  445.         uis.InputEnded:connect(function(key)
  446.             if key.UserInputType == Enum.UserInputType.MouseButton1 and down then
  447.                 down = false
  448.                 Value = math.floor((((tonumber(maxvalue) - tonumber(minvalue)) / 172) * SliderInner.AbsoluteSize.X) +tonumber(minvalue)) or 0
  449.                 SliderText.Text = text .. " / " .. Value
  450.                 pcall(callback, Value)
  451.                 SliderInner:TweenSize(UDim2.new(0, math.clamp(mouse.X - SliderInner.AbsolutePosition.X, 0, 172), 0, 9), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.1)
  452.             end        
  453.         end)
  454.    
  455.         local ss = {}
  456.  
  457.         function ss:Set(SliderAmount)
  458.             SliderAmount = tonumber(SliderAmount) or 0
  459.             SliderAmount = (((SliderAmount >= 0 and SliderAmount <= 100) and SliderAmount) / 100)
  460.             TweenService:Create(
  461.                 SliderInner,
  462.                 TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  463.                 {Size = UDim2.new(SliderAmount or 0, 0, 0, 9)}
  464.             ):Play()
  465.             local p = math.floor((SliderAmount or 0) * 100)
  466.            
  467.             local difference = maxvalue - minvalue
  468.            
  469.             local Value = math.floor(((difference / 100) * p) + minvalue)
  470.  
  471.             SliderText.Text = text .. " / " .. Value
  472.             pcall(callback, Value)
  473.         end
  474.  
  475.  
  476.         resize(45)
  477.  
  478.         return ss
  479.     end
  480.     function s:CreateDropDown(text, list, callback)
  481.         callback = callback or function() end
  482.         text = text or ""
  483.         list = list or {}
  484.         resize(30)
  485.         local IsDropped = false
  486.         local DropYSize = 0
  487.  
  488.         local DropdownButton = Instance.new("TextButton")
  489.         local DropdownText = Instance.new("TextLabel")
  490.         local DropdownOpen = Instance.new("TextButton")
  491.         local UIListLayout_2 = Instance.new("UIListLayout")
  492.         local Dropdown = Instance.new("Frame")
  493.  
  494.         Dropdown.Name = "Dropdown"
  495.         Dropdown.Parent = container
  496.         Dropdown.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  497.         Dropdown.BackgroundTransparency = 1.000
  498.         Dropdown.ClipsDescendants = true
  499.         Dropdown.Position = UDim2.new(0, 0, 0.205479458, 0)
  500.         Dropdown.Size = UDim2.new(0, 184, 0, 30)
  501.  
  502.         DropdownButton.Name = "DropdownButton"
  503.         DropdownButton.Parent = Dropdown
  504.         DropdownButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  505.         DropdownButton.BackgroundTransparency = 1.000
  506.         DropdownButton.Size = UDim2.new(0, 185, 0, 30)
  507.         DropdownButton.Font = Enum.Font.SourceSans
  508.         DropdownButton.Text = ""
  509.         DropdownButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  510.         DropdownButton.TextSize = 13.000
  511.  
  512.         DropdownText.Name = "DropdownText"
  513.         DropdownText.Parent = DropdownButton
  514.         DropdownText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  515.         DropdownText.BackgroundTransparency = 1.000
  516.         DropdownText.Size = UDim2.new(0, 155, 0, 30)
  517.         DropdownText.Font = Enum.Font.Gotham
  518.         DropdownText.Text = "  " .. text .. " / " .. ""
  519.         DropdownText.TextColor3 = theme.Dropdown_Text_Color
  520.         DropdownText.TextSize = 12.000
  521.         DropdownText.TextXAlignment = Enum.TextXAlignment.Left
  522.  
  523.         DropdownOpen.Name = "DropdownOpen"
  524.         DropdownOpen.Parent = DropdownButton
  525.         DropdownOpen.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  526.         DropdownOpen.BackgroundTransparency = 1.000
  527.         DropdownOpen.Position = UDim2.new(0.838, 0, 0, 0)
  528.         DropdownOpen.Size = UDim2.new(0, 30, 0, 30)
  529.         DropdownOpen.Font = Enum.Font.SourceSans
  530.         DropdownOpen.Text = "+"
  531.         DropdownOpen.TextColor3 = theme.Dropdown_Text_Color
  532.         DropdownOpen.TextSize = 11.000
  533.  
  534.         UIListLayout_2.Parent = Dropdown
  535.         UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  536.  
  537.         for i, v in next, list do
  538.             local Option1 = Instance.new("TextButton")
  539.             Option1.Name = "Option1"
  540.             Option1.Parent = Dropdown
  541.             Option1.BackgroundColor3 = theme.Dropdown_Option_Color
  542.             Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
  543.             Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
  544.             Option1.BackgroundTransparency = 0
  545.             Option1.Position = UDim2.new(0, 0, 0.5, 0)
  546.             Option1.Size = UDim2.new(0, 184, 0, 30)
  547.             Option1.Font = Enum.Font.Gotham
  548.             Option1.Text = v
  549.             Option1.TextColor3 = theme.Dropdown_Option_Text_Color
  550.             Option1.TextSize = 13.000
  551.             Option1.AutoButtonColor = false
  552.             DropYSize = DropYSize + 30
  553.  
  554.             Option1.MouseButton1Click:Connect(
  555.                 function()
  556.                     callback(v)
  557.                     DropdownText.Text = "  " .. text .. " / " .. v
  558.                     TweenService:Create(
  559.                         Dropdown,
  560.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  561.                         {Size = UDim2.new(0, 184, 0, 30)}
  562.                     ):Play()
  563.                     TweenService:Create(
  564.                         container,
  565.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  566.                         {Size = UDim2.new(0, 185, 0, BodyYSize)}
  567.                     ):Play()
  568.                     IsDropped = false
  569.                     DropdownOpen.Text = "+"
  570.                 end
  571.             )
  572.         end
  573.         DropdownButton.MouseButton1Click:Connect(
  574.             function()
  575.                 if IsDropped then
  576.                     IsDropped = false
  577.                     DropdownOpen.Text = "+"
  578.                     TweenService:Create(
  579.                         Dropdown,
  580.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  581.                         {Size = UDim2.new(0, 184, 0, 30)}
  582.                     ):Play()
  583.                    
  584.                     TweenService:Create(
  585.                         container,
  586.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  587.                         {Size = UDim2.new(0, 185, 0, BodyYSize)}
  588.                     ):Play()
  589.                 else
  590.                     IsDropped = true
  591.                     DropdownOpen.Text = "-"
  592.                     DropdownText.Text = "  " .. text .. " / "
  593.                     TweenService:Create(
  594.                         Dropdown,
  595.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  596.                         {Size = UDim2.new(0, 184, 0, DropYSize + 30)}
  597.                     ):Play()
  598.                     TweenService:Create(
  599.                         container,
  600.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  601.                         {Size = UDim2.new(0, 185, 0, BodyYSize + DropYSize + 1)}
  602.                     ):Play()
  603.                 end
  604.             end
  605.         )
  606.  
  607.         Tab.MouseButton1Click:Connect(
  608.             function()
  609.                 IsDropped = false
  610.                 DropdownOpen.Text = "+"
  611.                 TweenService:Create(
  612.                     Dropdown,
  613.                     TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  614.                     {Size = UDim2.new(0, 184, 0, 30)}
  615.                 ):Play()
  616.                 TweenService:Create(
  617.                     container,
  618.                     TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  619.                     {Size = UDim2.new(0, 185, 0, 0)}
  620.                 ):Play()
  621.             end
  622.         )
  623.  
  624.         --[[local ssss = {}
  625.         function ssss:Add(name)
  626.                 local Option1 = Dropdown:FindFirstChild("Option1"):Clone()
  627.                 Option1.Name = "Option1"
  628.                 Option1.Parent = Dropdown
  629.                 Option1.BackgroundColor3 = theme.Dropdown_Option_Color
  630.                 Option1.BorderColor3 = theme.Dropdown_Option_BorderColor
  631.                 Option1.BorderSizePixel = theme.Dropdown_Option_BorderSize
  632.                 Option1.BackgroundTransparency = 0
  633.                 Option1.Position = UDim2.new(0, 0, 0.5, 0)
  634.                 Option1.Size = UDim2.new(0, 184, 0, 30)
  635.                 Option1.Font = Enum.Font.Gotham
  636.                 Option1.Text = name
  637.                 Option1.TextColor3 = theme.Dropdown_Option_Text_Color
  638.                 Option1.TextSize = 13.000
  639.                 Option1.AutoButtonColor = false
  640.                 DropYSize = DropYSize + 30
  641.    
  642.                 Option1.MouseButton1Click:Connect(
  643.                     function()
  644.                         callback(name)
  645.                         DropdownText.Text = "  " .. text .. " / " .. name
  646.                         TweenService:Create(
  647.                             Dropdown,
  648.                             TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  649.                             {Size = UDim2.new(0, 184, 0, 30)}
  650.                         ):Play()
  651.                         TweenService:Create(
  652.                             container,
  653.                             TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  654.                             {Size = UDim2.new(0, 185, 0, BodyYSize)}
  655.                         ):Play()
  656.                         IsDropped = false
  657.                         DropdownOpen.Text = "+"
  658.                     end
  659.                 )
  660.             if IsDropped then
  661.                     TweenService:Create(
  662.                         Dropdown,
  663.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  664.                         {Size = UDim2.new(0, 184, 0, DropYSize + 30)}
  665.                     ):Play()
  666.                     TweenService:Create(
  667.                         container,
  668.                         TweenInfo.new(0.1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
  669.                         {Size = UDim2.new(0, 184, 0, BodyYSize + DropYSize)}
  670.                     ):Play()
  671.                 end
  672.             local s2 = {}
  673.             function s2:Remove()
  674.                 Option1:Destroy()
  675.             end
  676.         end
  677.         return ssss;]]
  678.     end
  679.     function s:CreateButton(text, callback)
  680.         text = text or ""
  681.         callback = callback or function()
  682.             end
  683.         local Button = Instance.new("TextButton")
  684.         Button.Name = text
  685.         Button.Parent = container
  686.         Button.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  687.         Button.BackgroundTransparency = 1.000
  688.         Button.Position = UDim2.new(0, 0, 0.777777851, 0)
  689.         Button.Size = UDim2.new(0, 185, 0, 30)
  690.         Button.Font = Enum.Font.Gotham
  691.         Button.Text = text
  692.         Button.TextColor3 = theme.Button_Text_Color
  693.         Button.TextSize = 13.000
  694.         Button.MouseButton1Down:Connect(
  695.             function()
  696.                 Button.TextSize = 12
  697.             end
  698.         )
  699.         Button.MouseButton1Up:Connect(
  700.             function()
  701.                 pcall(callback)
  702.                 Button.TextSize = 13
  703.             end
  704.         )
  705.         resize(30)
  706.     end
  707.  
  708.     function s:CreateTextBox(string, callback)
  709.         resize(30)
  710.         string = string or ""
  711.         callback = callback or function() end
  712.         local TextBox = Instance.new("TextBox")
  713.         local TextboxUnderline = Instance.new("Frame")
  714.        
  715.         TextBox.Parent = container
  716.         TextBox.BackgroundColor3 = theme.TextBox_Color
  717.         TextBox.BackgroundTransparency = 1
  718.         TextBox.BorderSizePixel = 0
  719.         TextBox.Position = UDim2.new(0, 0, 0.818181813, 0)
  720.         TextBox.Size = UDim2.new(0, 185, 0, 30)
  721.         TextBox.ClearTextOnFocus = false
  722.         TextBox.Font = Enum.Font.Gotham
  723.         TextBox.PlaceholderColor3 = theme.TextBox_Text_Color
  724.         TextBox.PlaceholderText = string
  725.         TextBox.Text = ""
  726.         TextBox.TextColor3 = theme.TextBox_Text_Color
  727.         TextBox.TextSize = 13.000
  728.         TextBox.Focused:Connect(function()
  729.             TextboxUnderline:TweenSize(UDim2.new(0,185,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  730.         end)
  731.         TextBox.FocusLost:Connect(function(enterpressed)
  732.             if enterpressed then
  733.                 TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  734.                 callback(TextBox.Text)
  735.                 TextBox.Text = ""
  736.             else
  737.                 TextboxUnderline:TweenSize(UDim2.new(0,0,0,2), Enum.EasingDirection.InOut, Enum.EasingStyle.Quad, 0.1)
  738.             end
  739.         end)
  740.        
  741.         TextboxUnderline.Name = "TextboxUnderline"
  742.         TextboxUnderline.Parent = TextBox
  743.         TextboxUnderline.AnchorPoint = Vector2.new(0.5, 0.5)
  744.         TextboxUnderline.BackgroundColor3 = theme.TextBox_Underline_Color
  745.         TextboxUnderline.BorderSizePixel = 0
  746.         TextboxUnderline.Position = UDim2.new(0.50075686, 0, 0.966666639, 0)
  747.         TextboxUnderline.Size = UDim2.new(0, 0, 0, 2)
  748.  
  749.         local TextBoxInfo = {}
  750.  
  751.         function TextBoxInfo:Edit(text)
  752.             TextBox.Text = text
  753.         end
  754.  
  755.         return TextBoxInfo
  756.     end
  757.     return s
  758. end
  759. return library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement