Advertisement
CipRos

Azure UI

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