Advertisement
coastsss

Wally Lib v3 Recreate

Apr 19th, 2020 (edited)
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 47.11 KB | None | 0 0
  1. -- Feel free to edit, modify, or do whatever!
  2.  
  3. local UserInputService = game:GetService("UserInputService")
  4. local TweenService = game:GetService("TweenService")
  5. local exploit = (pebc_execute and "ProtoSmasher" or "SynapseX")
  6.  
  7. local LibraryUI = Instance.new("ScreenGui")
  8. if exploit == "SynapseX" then
  9.     syn.protect_gui(LibraryUI)
  10. elseif exploit == "ProtoSmasher" then
  11.     get_hidden_gui(LibraryUI)
  12. else
  13.     error'Cannot protect gui.'
  14. end
  15.  
  16. local Holder = Instance.new("Frame")
  17. local TabPadding = Instance.new("UIPadding")
  18. local TabLayout = Instance.new("UIListLayout")
  19. -- Colors & Other Settings
  20.  
  21. local Library = {
  22.     Colors = {
  23.         Body = Color3.fromRGB(35, 35, 35);
  24.         Section = Color3.fromRGB(40, 40, 40);
  25.         CheckboxChecked = Color3.fromRGB(255, 255, 255);
  26.         CheckboxUnchecked = Color3.fromRGB(50, 50, 50);
  27.         Button = Color3.fromRGB(45, 45, 45);
  28.         ColorPickerMarker = Color3.fromRGB(150, 150, 150);
  29.         SliderBackground = Color3.fromRGB(50, 50, 50);
  30.         Slider = Color3.fromRGB(255, 255, 255);
  31.         Dropdown = Color3.fromRGB(45, 45, 45);
  32.         DropdownButton = Color3.fromRGB(35, 35, 35);
  33.         DropdownButtonHover = Color3.fromRGB(45, 45, 45);
  34.         Underline = Color3.fromRGB(255, 255, 255);
  35.         Border = Color3.fromRGB(0, 0, 0);
  36.         Text = Color3.fromRGB(255, 255, 255);
  37.         PlaceholderText = Color3.fromRGB(255, 255, 255);
  38.     };
  39.  
  40.     Settings = {
  41.         MainTextSize = 15;
  42.         MainTweenTime = 1;
  43.         RippleTweenTime = 1;
  44.         CheckboxTweenTime = 0.5;
  45.         ColorPickerTweenTime = 0.5;
  46.         DropdownTweenTime = 0.5;
  47.         DropdownButtonColorHoverTweenTime = 0.5;
  48.         MainTextFont = Enum.Font.Code;
  49.         UIToggleKey = Enum.KeyCode.RightControl;
  50.         TweenEasingStyle = Enum.EasingStyle.Quart;
  51.     }
  52. }
  53.  
  54. LibraryUI.Name = "LibraryUI"
  55. LibraryUI.Parent = game:GetService("CoreGui")
  56. LibraryUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  57.  
  58. Holder.Name = "Holder"
  59. Holder.Parent = LibraryUI
  60. Holder.BackgroundColor3 = Color3.new(0, 0, 0)
  61. Holder.BackgroundTransparency = 1
  62. Holder.BorderColor3 = Color3.new(0, 0, 0)
  63. Holder.BorderSizePixel = 0
  64. Holder.Size = UDim2.new(0, 100, 0, 100)
  65.  
  66. TabPadding.Name = "TabPadding"
  67. TabPadding.Parent = Holder
  68. TabPadding.PaddingLeft = UDim.new(0, 25)
  69. TabPadding.PaddingTop = UDim.new(0, 50)
  70.  
  71. TabLayout.Name = "TabLayout"
  72. TabLayout.Parent = Holder
  73. TabLayout.SortOrder = Enum.SortOrder.LayoutOrder
  74. TabLayout.Padding = UDim.new(0, 5)
  75.  
  76. UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
  77.     if gameProcessedEvent then return end
  78.  
  79.     if input.KeyCode == Library.Settings.UIToggleKey then
  80.         LibraryUI.Enabled = not LibraryUI.Enabled
  81.     end
  82. end)
  83.  
  84. --Main Library
  85. function Library:CreateTab(tabtitle, tabdescription)
  86.     local TabName = Instance.new("TextButton")
  87.     local TabNameBody = Instance.new("Frame")
  88.     local BodyLayout = Instance.new("UIListLayout")
  89.     local DescriptionHolder = Instance.new("Frame")
  90.     local DescriptionText = Instance.new("TextLabel")
  91.     local TabUnderline = Instance.new("Frame")
  92.  
  93.     local IsATabOpen = false
  94.     local BodyYSize = 0
  95.  
  96.     TabName.Name = (tabtitle .. "Tab")
  97.     TabName.Parent = Holder
  98.     TabName.Text = tabtitle
  99.     TabName.TextTransparency = 1
  100.     TabName.BackgroundColor3 = Library.Colors.Body
  101.     TabName.BackgroundTransparency = 1
  102.     TabName.BorderColor3 = Library.Colors.Border
  103.     TabName.BorderSizePixel = 0
  104.     TabName.Position = UDim2.new(0.150000006, 0, 0.5, 0)
  105.     TabName.Size = UDim2.new(0, 200, 0, 32)
  106.     TabName.AutoButtonColor = false
  107.     TabName.Font = Library.Settings.MainTextFont
  108.     TabName.TextColor3 = Library.Colors.Text
  109.     TabName.TextSize = Library.Settings.MainTextSize
  110.  
  111.     TabNameBody.Name = (tabtitle .. "TabBody")
  112.     TabNameBody.Parent = TabName
  113.     TabNameBody.BackgroundColor3 = Library.Colors.Body
  114.     TabNameBody.BackgroundTransparency = 0
  115.     TabNameBody.BorderColor3 = Library.Colors.Border
  116.     TabNameBody.BorderSizePixel = 0
  117.     TabNameBody.ClipsDescendants = true
  118.     TabNameBody.Position = UDim2.new(1.08000004, 0, 0, 0)
  119.     TabNameBody.Size = UDim2.new(1, 0, 0, BodyYSize)
  120.     TabNameBody.Visible = false
  121.     TabNameBody.ZIndex = 2
  122.  
  123.     local function ExtendBodySize(value)
  124.         BodyYSize = BodyYSize + value
  125.  
  126.         TweenService:Create(TabNameBody, TweenInfo.new(0.5, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(1, 0, 0, BodyYSize)}):Play()
  127.     end
  128.  
  129.     local function UnExtendBodySize(value)
  130.         BodyYSize = BodyYSize - value
  131.  
  132.         TweenService:Create(TabNameBody, TweenInfo.new(0.5, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(1, 0, 0, BodyYSize)}):Play()
  133.     end
  134.  
  135.     BodyLayout.Name = "BodyLayout"
  136.     BodyLayout.Parent = TabNameBody
  137.     BodyLayout.SortOrder = Enum.SortOrder.LayoutOrder
  138.  
  139.     local TextBounds = game:GetService("TextService"):GetTextSize(tabdescription, Library.Settings.MainTextSize, Library.Settings.MainTextFont, Vector2.new(math.huge, math.huge))
  140.  
  141.     DescriptionHolder.Name = (tabtitle .. "DescriptionHolder")
  142.     DescriptionHolder.Parent = TabName
  143.     DescriptionHolder.BackgroundColor3 = Library.Colors.Body
  144.     DescriptionHolder.BorderColor3 = Library.Colors.Border
  145.     DescriptionHolder.BorderSizePixel = 0
  146.     DescriptionHolder.ClipsDescendants = true
  147.     DescriptionHolder.Position = UDim2.new(1.08000004, 0, 0, 0)
  148.     DescriptionHolder.Size = UDim2.new(0, 0, 0, 32)
  149.  
  150.  
  151.     DescriptionText.Name = (tabtitle .. "Description")
  152.     DescriptionText.Parent = DescriptionHolder
  153.     DescriptionText.BackgroundColor3 = Library.Colors.Border
  154.     DescriptionText.BackgroundTransparency = 1
  155.     DescriptionText.BorderColor3 = Library.Colors.Border
  156.     DescriptionText.BorderSizePixel = 0
  157.     DescriptionText.Size = UDim2.new(0, 200, 0, 32)
  158.     DescriptionText.Font = Library.Settings.MainTextFont
  159.     DescriptionText.Text = (" " .. tabdescription)
  160.     DescriptionText.TextColor3 = Library.Colors.Text
  161.     DescriptionText.TextSize = Library.Settings.MainTextSize
  162.     DescriptionText.TextXAlignment = Enum.TextXAlignment.Left
  163.    
  164.     TabUnderline.Name = (tabtitle .. "TabUnderline")
  165.     TabUnderline.Parent = TabName
  166.     TabUnderline.BackgroundColor3 = Library.Colors.Underline
  167.     TabUnderline.BorderColor3 = Library.Colors.Border
  168.     TabUnderline.BorderSizePixel = 0
  169.     TabUnderline.Position = UDim2.new(0.5, 0, 0.938000023, 0)
  170.     TabUnderline.Size = UDim2.new(0, 0, 0, 2)
  171.     TabUnderline.ZIndex = 2
  172.  
  173.     function TabIntro()
  174.         TweenService:Create(TabName, TweenInfo.new(1, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  175.         TweenService:Create(TabName, TweenInfo.new(1, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  176.     end
  177.  
  178.  
  179.     TabName.MouseButton1Down:Connect(function()
  180.         RippleEffect(TabName)
  181.         TweenService:Create(TabUnderline, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0.938000023, 0), Size = UDim2.new(0, 0, 0, 2)}):Play()
  182.         TweenService:Create(DescriptionHolder, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(1.08000004, 0, 0, 0), Size = UDim2.new(0, 0, 0, 32)}):Play()
  183.  
  184.         if not IsATabOpen then
  185.             IsATabOpen = true
  186.             TabNameBody.Visible = true
  187.         elseif IsATabOpen then
  188.             IsATabOpen = false
  189.         end
  190.     end)
  191.  
  192.     TabName.InputBegan:Connect(function(input)
  193.         if input.UserInputType == Enum.UserInputType.MouseMovement then
  194.             if IsATabOpen then
  195.                 return false
  196.             elseif not IsATabOpen then
  197.                 TweenService:Create(TabUnderline, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(0, 0, 0.9375, 0), Size = UDim2.new(0, 200, 0, 2)}):Play()
  198.                 TweenService:Create(DescriptionHolder, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(1.08000004, 0, 0, 0), Size = UDim2.new(0, TextBounds.X + 15, 0, 32)}):Play()
  199.             end
  200.         end
  201.     end)
  202.  
  203.     TabName.InputEnded:Connect(function(input)
  204.         if input.UserInputType == Enum.UserInputType.MouseMovement then
  205.             TweenService:Create(TabUnderline, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 0, 0.938000023, 0), Size = UDim2.new(0, 0, 0, 2)}):Play()
  206.             TweenService:Create(DescriptionHolder, TweenInfo.new(0.50, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(1.08000004, 0, 0, 0), Size = UDim2.new(0, 0, 0, 32)}):Play()
  207.         end
  208.     end)
  209.  
  210.     TabIntro()
  211.  
  212.     local CoastsLibrary = {}
  213.  
  214.     function RippleEffect(button)
  215.         spawn(function()
  216.             local Mouse = game:GetService("Players").LocalPlayer:GetMouse()
  217.             local RippleHolder = Instance.new("Frame")
  218.             local RippleEffect = Instance.new("ImageLabel")
  219.  
  220.             RippleHolder.Name = "RippleHolder"
  221.             RippleHolder.Parent = button
  222.             RippleHolder.BackgroundColor3 = Library.Colors.Border
  223.             RippleHolder.BackgroundTransparency = 1
  224.             RippleHolder.BorderColor3 = Library.Colors.Border
  225.             RippleHolder.BorderSizePixel = 0
  226.             RippleHolder.ClipsDescendants = true
  227.             RippleHolder.Size = UDim2.new(0, 200, 0, 32)
  228.  
  229.             RippleEffect.Name = "RippleEffect"
  230.             RippleEffect.Parent = RippleHolder
  231.             RippleEffect.BackgroundTransparency = 1
  232.             RippleEffect.BorderSizePixel = 0
  233.             RippleEffect.Image = "rbxassetid://2708891598"
  234.             RippleEffect.ImageColor3 = Color3.fromRGB(255, 255, 255)
  235.             RippleEffect.ImageTransparency = 0.8
  236.             RippleEffect.ScaleType = Enum.ScaleType.Fit
  237.  
  238.             RippleEffect.Position = UDim2.new((Mouse.X - RippleEffect.AbsolutePosition.X) / button.AbsoluteSize.X, 0, (Mouse.Y - RippleEffect.AbsolutePosition.Y) / button.AbsoluteSize.Y, 0)
  239.             TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.RippleTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position = UDim2.new(-5.5, 0, -5.5, 0), Size = UDim2.new(12, 0, 12, 0)}):Play()
  240.  
  241.             wait(0.5)
  242.             TweenService:Create(RippleEffect, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  243.  
  244.             wait(1)
  245.             RippleHolder:Destroy()
  246.         end)
  247.     end
  248.  
  249.     function CoastsLibrary:CreateSection(sectionname)
  250.         local SectionLabel = Instance.new("TextLabel")
  251.  
  252.         SectionLabel.Name = (tabtitle .. "TabSection" .. sectionname)
  253.         SectionLabel.Parent = TabNameBody
  254.         SectionLabel.BackgroundColor3 = Library.Colors.Section
  255.         SectionLabel.BorderColor3 = Library.Colors.Border
  256.         SectionLabel.BorderSizePixel = 0
  257.         SectionLabel.Size = UDim2.new(0, 200, 0, 30)
  258.         SectionLabel.Font = Library.Settings.MainTextFont
  259.         SectionLabel.Text = sectionname
  260.         SectionLabel.TextColor3 = Library.Colors.Text
  261.         SectionLabel.TextSize = Library.Settings.MainTextSize
  262.  
  263.         TabName.MouseButton1Down:Connect(function()
  264.             if not IsATabOpen then
  265.                 ExtendBodySize(30)
  266.  
  267.                 TweenService:Create(SectionLabel, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  268.                 TweenService:Create(SectionLabel, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  269.             elseif IsATabOpen then
  270.                 UnExtendBodySize(30)
  271.  
  272.                 TweenService:Create(SectionLabel, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  273.                 TweenService:Create(SectionLabel, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  274.             end
  275.         end)
  276.     end
  277.  
  278.     function CoastsLibrary:CreateCheckbox(checkboxname, action)
  279.         local CheckboxHolder = Instance.new("Frame")
  280.         local CheckboxTitleText = Instance.new("TextLabel")
  281.         local CheckboxButton = Instance.new("ImageButton")
  282.         local ToggleAnimation = Instance.new("Frame")
  283.  
  284.  
  285.         CheckboxHolder.Name = (checkboxname .. "CheckboxHolder")
  286.         CheckboxHolder.Parent = TabNameBody
  287.         CheckboxHolder.BackgroundColor3 = Library.Colors.Border
  288.         CheckboxHolder.BackgroundTransparency = 1
  289.         CheckboxHolder.BorderColor3 = Library.Colors.Border
  290.         CheckboxHolder.BorderSizePixel = 0
  291.         CheckboxHolder.Size = UDim2.new(0, 200, 0, 30)
  292.  
  293.         CheckboxTitleText.Name = "CheckboxTitleText"
  294.         CheckboxTitleText.Parent = CheckboxHolder
  295.         CheckboxTitleText.BackgroundColor3 = Library.Colors.Border
  296.         CheckboxTitleText.BackgroundTransparency = 1
  297.         CheckboxTitleText.BorderColor3 = Library.Colors.Border
  298.         CheckboxTitleText.BorderSizePixel = 0
  299.         CheckboxTitleText.Position = UDim2.new(0.0350000001, 0, 0.112999983, 0)
  300.         CheckboxTitleText.Size = UDim2.new(0, 146, 0, 25)
  301.         CheckboxTitleText.Font = Library.Settings.MainTextFont
  302.         CheckboxTitleText.Text = checkboxname
  303.         CheckboxTitleText.TextColor3 = Color3.new(1, 1, 1)
  304.         CheckboxTitleText.TextSize = Library.Settings.MainTextSize
  305.         CheckboxTitleText.TextXAlignment = Enum.TextXAlignment.Left
  306.  
  307.         CheckboxButton.Name = "CheckboxButton"
  308.         CheckboxButton.Parent = CheckboxHolder
  309.         CheckboxButton.BackgroundColor3 = Library.Colors.Body
  310.         CheckboxButton.BorderColor3 = Color3.new(0.164706, 0.164706, 0.164706)
  311.         CheckboxButton.Position = UDim2.new(0.829999983, 0, 0.116999999, 0)
  312.         CheckboxButton.Size = UDim2.new(0, 25, 0, 24)
  313.         CheckboxButton.AutoButtonColor = false
  314.         CheckboxButton.Image = "rbxassetid://1202200114"
  315.  
  316.         ToggleAnimation.Name = "ToggleAnimation"
  317.         ToggleAnimation.Parent = CheckboxHolder
  318.         ToggleAnimation.BackgroundColor3 = Library.Colors.Body
  319.         ToggleAnimation.BorderColor3 = Library.Colors.Border
  320.         ToggleAnimation.BorderSizePixel = 0
  321.         ToggleAnimation.Position = UDim2.new(0.829999983, 0, 0.116999999, 0)
  322.         ToggleAnimation.Size = UDim2.new(0, 25, 0, 24)
  323.  
  324.         CheckboxButton.MouseButton1Down:Connect(function()
  325.             Enabled = not Enabled
  326.  
  327.             if Enabled then
  328.                 TweenService:Create(ToggleAnimation, TweenInfo.new(Library.Settings.CheckboxTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position =  UDim2.new(0.955, 0 , 0.117, 0), Size = UDim2.new(0, 0, 0, 24)}):Play()
  329.             elseif not Enabled then
  330.                 TweenService:Create(ToggleAnimation, TweenInfo.new(Library.Settings.CheckboxTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Position =  UDim2.new(0.83, 0 , 0.117, 0), Size = UDim2.new(0, 25, 0, 24)}):Play()
  331.             end
  332.  
  333.             action(Enabled)
  334.         end)
  335.  
  336.         TabName.MouseButton1Down:Connect(function()
  337.             if not IsATabOpen then
  338.                 ExtendBodySize(30)
  339.  
  340.                 TweenService:Create(ToggleAnimation, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  341.                 TweenService:Create(CheckboxTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  342.                 TweenService:Create(CheckboxButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  343.                 TweenService:Create(CheckboxButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  344.                 TweenService:Create(CheckboxButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 0}):Play()
  345.             elseif IsATabOpen then
  346.                 UnExtendBodySize(30)
  347.  
  348.                 TweenService:Create(ToggleAnimation, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  349.                 TweenService:Create(CheckboxTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  350.                 TweenService:Create(CheckboxButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  351.                 TweenService:Create(CheckboxButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {ImageTransparency = 1}):Play()
  352.             end
  353.         end)
  354.     end
  355.  
  356.     function CoastsLibrary:CreateButton(buttonname, action)
  357.         local Button = Instance.new("TextButton")
  358.  
  359.         Button.Name = (buttonname .. "Button")
  360.         Button.Parent = TabNameBody
  361.         Button.BackgroundColor3 = Library.Colors.Button
  362.         Button.BorderColor3 = Library.Colors.Border
  363.         Button.BorderSizePixel = 0
  364.         Button.ClipsDescendants = true
  365.         Button.Size = UDim2.new(0, 200, 0, 30)
  366.         Button.AutoButtonColor = false
  367.         Button.Font = Library.Settings.MainTextFont
  368.         Button.Text = buttonname
  369.         Button.TextColor3 = Library.Colors.Text
  370.         Button.TextSize = Library.Settings.MainTextSize
  371.  
  372.         Button.MouseButton1Down:Connect(function()
  373.             action()
  374.             RippleEffect(Button)
  375.         end)
  376.  
  377.         TabName.MouseButton1Down:Connect(function()
  378.             if not IsATabOpen then
  379.                 ExtendBodySize(30)
  380.  
  381.                 TweenService:Create(Button, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  382.                 TweenService:Create(Button, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  383.             elseif IsATabOpen then
  384.                 UnExtendBodySize(30)
  385.  
  386.                 TweenService:Create(Button, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  387.                 TweenService:Create(Button, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  388.             end
  389.         end)
  390.     end
  391.  
  392.     function CoastsLibrary:CreateColorPicker(colorpickername, colorpickerpresetcolor, action)
  393.         local ColorPickerHolder = Instance.new("Frame")
  394.         local ColorPickerTitleText = Instance.new("TextLabel")
  395.         local ColorPickerButton = Instance.new("TextButton")
  396.         local ColorPickerMain = Instance.new("Frame")
  397.         local ColorPallete = Instance.new("ImageLabel")
  398.         local ColorPalleteMarker = Instance.new("ImageLabel")
  399.         local ColorBrightness = Instance.new("ImageLabel")
  400.         local ColorBrightnessMarker = Instance.new("Frame")
  401.         local ColorRed = Instance.new("TextLabel")
  402.         local ColorGreen = Instance.new("TextLabel")
  403.         local ColorBlue = Instance.new("TextLabel")
  404.  
  405.         local HSD = false
  406.         local VD = false
  407.         local ColorPickerMainOpen = false
  408.  
  409.         ColorPickerHolder.Name = (colorpickername .. "ColorPickerHolder")
  410.         ColorPickerHolder.Parent = TabNameBody
  411.         ColorPickerHolder.BackgroundColor3 = Library.Colors.Border
  412.         ColorPickerHolder.BackgroundTransparency = 1
  413.         ColorPickerHolder.BorderColor3 = Library.Colors.Border
  414.         ColorPickerHolder.BorderSizePixel = 0
  415.         ColorPickerHolder.Size = UDim2.new(0, 200, 0, 30)
  416.  
  417.         ColorPickerTitleText.Name = "ColorPickerTitleText"
  418.         ColorPickerTitleText.Parent = ColorPickerHolder
  419.         ColorPickerTitleText.BackgroundColor3 = Library.Colors.Border
  420.         ColorPickerTitleText.BackgroundTransparency = 1
  421.         ColorPickerTitleText.BorderColor3 = Library.Colors.Border
  422.         ColorPickerTitleText.BorderSizePixel = 0
  423.         ColorPickerTitleText.Position = UDim2.new(0.0350000001, 0, 0.112999983, 0)
  424.         ColorPickerTitleText.Size = UDim2.new(0, 146, 0, 25)
  425.         ColorPickerTitleText.Font = Library.Settings.MainTextFont
  426.         ColorPickerTitleText.Text = colorpickername
  427.         ColorPickerTitleText.TextColor3 = Color3.new(1, 1, 1)
  428.         ColorPickerTitleText.TextSize = Library.Settings.MainTextSize
  429.         ColorPickerTitleText.TextXAlignment = Enum.TextXAlignment.Left
  430.  
  431.         ColorPickerButton.Name = "ColorPickerButton"
  432.         ColorPickerButton.Parent = ColorPickerHolder
  433.         ColorPickerButton.BackgroundColor3 = colorpickerpresetcolor or Color3.fromRGB(255, 255, 255);
  434.         ColorPickerButton.BorderColor3 = Library.Colors.Border
  435.         ColorPickerButton.BorderSizePixel = 0
  436.         ColorPickerButton.Position = UDim2.new(0.829999983, 0, 0.116999999, 0)
  437.         ColorPickerButton.Size = UDim2.new(0, 25, 0, 24)
  438.         ColorPickerButton.AutoButtonColor = false
  439.         ColorPickerButton.Font = Library.Settings.MainTextFont
  440.         ColorPickerButton.Text = ""
  441.         ColorPickerButton.TextColor3 = Color3.new(255, 255, 255)
  442.         ColorPickerButton.TextSize = Library.Settings.MainTextSize
  443.  
  444.         local Red, Green, Blue = ColorPickerButton.BackgroundColor3.r * 255, ColorPickerButton.BackgroundColor3.g * 255, ColorPickerButton.BackgroundColor3.b * 255;
  445.  
  446.         ColorPickerMain.Name = "ColorPickerMain"
  447.         ColorPickerMain.Parent = ColorPickerHolder
  448.         ColorPickerMain.BackgroundColor3 = Library.Colors.Body
  449.         ColorPickerMain.BorderColor3 = Library.Colors.Border
  450.         ColorPickerMain.BorderSizePixel = 0
  451.         ColorPickerMain.ClipsDescendants = true
  452.         ColorPickerMain.Position = UDim2.new(0.995000005, 1, 0.116666667, 0)
  453.         ColorPickerMain.Size = UDim2.new(0, 200, 0, 0)
  454.  
  455.         ColorPallete.Name = "ColorPallete"
  456.         ColorPallete.Parent = ColorPickerMain
  457.         ColorPallete.BackgroundColor3 = Library.Colors.Border
  458.         ColorPallete.BackgroundTransparency = 1
  459.         ColorPallete.BorderColor3 = Library.Colors.Border
  460.         ColorPallete.BorderSizePixel = 0
  461.         ColorPallete.Position = UDim2.new(0, 5, 0, 4)
  462.         ColorPallete.Size = UDim2.new(0, 149, 0, 151)
  463.         ColorPallete.ZIndex = 2
  464.         ColorPallete.Image = "rbxassetid://4477380641"
  465.  
  466.         ColorPalleteMarker.Name = "ColorPalleteMarker"
  467.         ColorPalleteMarker.Parent = ColorPallete
  468.         ColorPalleteMarker.BackgroundColor3 = Library.Colors.Border
  469.         ColorPalleteMarker.BackgroundTransparency = 1
  470.         ColorPalleteMarker.BorderColor3 = Library.Colors.Border
  471.         ColorPalleteMarker.BorderSizePixel = 0
  472.         ColorPalleteMarker.Position = UDim2.new(colorpickerpresetcolor and select(1, Color3.toHSV(colorpickerpresetcolor)) or 0, 0, colorpickerpresetcolor and 1 - select(2, Color3.toHSV(colorpickerpresetcolor)) or 0, 0)
  473.         ColorPalleteMarker.Size = UDim2.new(0, 0, 0.200000003, 0)
  474.         ColorPalleteMarker.ZIndex = 2
  475.         ColorPalleteMarker.Image = "rbxassetid://4409133510"
  476.         ColorPalleteMarker.ScaleType = Enum.ScaleType.Crop
  477.  
  478.         ColorBrightness.Name = "ColorBrightness"
  479.         ColorBrightness.Parent = ColorPickerMain
  480.         ColorBrightness.AnchorPoint = Vector2.new(1, 0)
  481.         ColorBrightness.BackgroundColor3 = Library.Colors.Border
  482.         ColorBrightness.BorderColor3 = Library.Colors.Border
  483.         ColorBrightness.BorderSizePixel = 0
  484.         ColorBrightness.Position = UDim2.new(0, 195, 0, 4)
  485.         ColorBrightness.Size = UDim2.new(0, 34, 0, 151)
  486.         ColorBrightness.ZIndex = 2
  487.         ColorBrightness.Image = "rbxassetid://4477380092"
  488.         ColorBrightness.ScaleType = Enum.ScaleType.Crop
  489.  
  490.         ColorBrightnessMarker.Name = "ColorBrightnessMarker"
  491.         ColorBrightnessMarker.Parent = ColorBrightness
  492.         ColorBrightnessMarker.AnchorPoint = Vector2.new(0, 0.5)
  493.         ColorBrightnessMarker.BackgroundColor3 = Library.Colors.ColorPickerMarker
  494.         ColorBrightnessMarker.BorderColor3 = Library.Colors.Border
  495.         ColorBrightnessMarker.BorderSizePixel = 0
  496.         ColorBrightnessMarker.Position = UDim2.new(0, 0, 0.013245035, 0)
  497.         ColorBrightnessMarker.Size = UDim2.new(1, 0, 0.0280000009, 0)
  498.         ColorBrightnessMarker.ZIndex = 2
  499.  
  500.         ColorRed.Name = "ColorRed"
  501.         ColorRed.Parent = ColorPickerMain
  502.         ColorRed.BackgroundColor3 = Library.Colors.Border
  503.         ColorRed.BackgroundTransparency = 1
  504.         ColorRed.BorderColor3 = Library.Colors.Border
  505.         ColorRed.BorderSizePixel = 0
  506.         ColorRed.Position = UDim2.new(0, 5, 0, 155)
  507.         ColorRed.Size = UDim2.new(0, 55, 0, 20)
  508.         ColorRed.Font = Library.Settings.MainTextFont
  509.         ColorRed.Text = ("R: " .. math.floor(Red))
  510.         ColorRed.TextColor3 = Color3.new(1, 1, 1)
  511.         ColorRed.TextSize = Library.Settings.MainTextSize
  512.         ColorRed.TextXAlignment = Enum.TextXAlignment.Left
  513.  
  514.         ColorGreen.Name = "ColorGreen"
  515.         ColorGreen.Parent = ColorPickerMain
  516.         ColorGreen.BackgroundColor3 = Library.Colors.Border
  517.         ColorGreen.BackgroundTransparency = 1
  518.         ColorGreen.BorderColor3 = Library.Colors.Border
  519.         ColorGreen.BorderSizePixel = 0
  520.         ColorGreen.Position = UDim2.new(0, 72, 0, 155)
  521.         ColorGreen.Size = UDim2.new(0, 55, 0, 20)
  522.         ColorGreen.Font = Library.Settings.MainTextFont
  523.         ColorGreen.Text = ("G: " .. math.floor(Green))
  524.         ColorGreen.TextColor3 = Color3.new(1, 1, 1)
  525.         ColorGreen.TextSize = Library.Settings.MainTextSize
  526.         ColorGreen.TextXAlignment = Enum.TextXAlignment.Left
  527.  
  528.         ColorBlue.Name = "ColorBlue"
  529.         ColorBlue.Parent = ColorPickerMain
  530.         ColorBlue.BackgroundColor3 = Library.Colors.Border
  531.         ColorBlue.BackgroundTransparency = 1
  532.         ColorBlue.BorderColor3 = Library.Colors.Border
  533.         ColorBlue.BorderSizePixel = 0
  534.         ColorBlue.Position = UDim2.new(0, 145, 0, 155)
  535.         ColorBlue.Size = UDim2.new(0, 55, 0, 20)
  536.         ColorBlue.Font = Library.Settings.MainTextFont
  537.         ColorBlue.Text = ("B: " .. math.floor(Blue))
  538.         ColorBlue.TextColor3 = Color3.new(1, 1, 1)
  539.         ColorBlue.TextSize = Library.Settings.MainTextSize
  540.         ColorBlue.TextXAlignment = Enum.TextXAlignment.Left
  541.  
  542.         ColorPickerButton.MouseButton1Click:Connect(function()
  543.             if not ColorPickerMainOpen then
  544.                 TabNameBody.ClipsDescendants = false
  545.                 ColorPickerMainOpen = true
  546.  
  547.                 TweenService:Create(ColorPickerMain, TweenInfo.new(Library.Settings.ColorPickerTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 200, 0, 175)}):Play()
  548.             elseif ColorPickerMainOpen then
  549.                 ColorPickerMainOpen = false
  550.                 HSD = false
  551.                 VD = false
  552.  
  553.                 TweenService:Create(ColorPickerMain, TweenInfo.new(Library.Settings.ColorPickerTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 200, 0, 0)}):Play()
  554.             end
  555.         end)
  556.  
  557.         ColorPallete.InputBegan:Connect(function(input)
  558.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  559.                 HSD = true
  560.             end
  561.         end)
  562.  
  563.         ColorPallete.InputEnded:Connect(function(input)
  564.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  565.                 HSD = false
  566.             end
  567.         end)
  568.  
  569.         ColorBrightness.InputBegan:Connect(function(input)
  570.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  571.                 VD = true
  572.             end
  573.         end)
  574.  
  575.         ColorBrightness.InputEnded:Connect(function(input)
  576.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  577.                 VD = false
  578.             end
  579.         end)
  580.  
  581.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  582.             if HSD and input.UserInputType == Enum.UserInputType.MouseMovement then
  583.                 Red, Green, Blue = ColorPickerButton.BackgroundColor3.r * 255, ColorPickerButton.BackgroundColor3.g * 255, ColorPickerButton.BackgroundColor3.b * 255;
  584.  
  585.                 ColorRed.Text = ("R: " .. math.floor(Red))
  586.                 ColorGreen.Text = ("G: " .. math.floor(Green))
  587.                 ColorBlue.Text = ("B: " .. math.floor(Blue))
  588.  
  589.                 ColorPalleteMarker.Position = UDim2.new(math.clamp((input.Position.X - ColorPallete.AbsolutePosition.X) / ColorPallete.AbsoluteSize.X, 0, 1), 0, math.clamp((input.Position.Y - ColorPallete.AbsolutePosition.Y) / ColorPallete.AbsoluteSize.Y, 0, 1), 0)
  590.  
  591.                 ColorPickerButton.BackgroundColor3 = Color3.fromHSV(ColorPalleteMarker.Position.X.Scale, 1 - ColorPalleteMarker.Position.Y.Scale, 1 - ColorBrightnessMarker.Position.Y.Scale)
  592.  
  593.                 action(ColorPickerButton.BackgroundColor3)
  594.             elseif VD and input.UserInputType == Enum.UserInputType.MouseMovement then
  595.                 Red, Green, Blue = ColorPickerButton.BackgroundColor3.r * 255, ColorPickerButton.BackgroundColor3.g * 255, ColorPickerButton.BackgroundColor3.b * 255;
  596.  
  597.                 ColorRed.Text = ("R: " .. math.floor(Red))
  598.                 ColorGreen.Text = ("G: " .. math.floor(Green))
  599.                 ColorBlue.Text = ("B: " .. math.floor(Blue))
  600.  
  601.                 ColorBrightnessMarker.Position = UDim2.new(0, 0, math.clamp((input.Position.Y - ColorBrightness.AbsolutePosition.Y) / ColorBrightness.AbsoluteSize.Y, 0, 1), 0)
  602.  
  603.                 ColorPickerButton.BackgroundColor3 = Color3.fromHSV(ColorPalleteMarker.Position.X.Scale, 1 - ColorPalleteMarker.Position.Y.Scale, 1 - ColorBrightnessMarker.Position.Y.Scale)
  604.  
  605.                 action(ColorPickerButton.BackgroundColor3)
  606.             end
  607.         end)
  608.  
  609.         TabName.MouseButton1Down:Connect(function()
  610.             if not IsATabOpen then
  611.                 ExtendBodySize(30)
  612.  
  613.                 TweenService:Create(ColorPickerTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  614.                 TweenService:Create(ColorPickerButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  615.             elseif IsATabOpen then
  616.                 UnExtendBodySize(30)
  617.  
  618.                 ColorPickerMainOpen = false
  619.                 HSD = false
  620.                 VD = false
  621.                 TabNameBody.ClipsDescendants = true
  622.  
  623.                 TweenService:Create(ColorPickerMain, TweenInfo.new(Library.Settings.ColorPickerTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 200, 0, 0)}):Play()
  624.                 TweenService:Create(ColorPickerTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  625.                 TweenService:Create(ColorPickerButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  626.             end
  627.         end)
  628.     end
  629.  
  630.     function CoastsLibrary:CreateSlider(slidername, minimumvalue, maximumvalue, startvalue, precisevalue, action)
  631.         local SliderHolder = Instance.new("Frame")
  632.         local SliderBackground = Instance.new("Frame")
  633.         local SlidingSlider = Instance.new("Frame")
  634.         local SliderTitleText = Instance.new("TextLabel")
  635.         local SliderValueText = Instance.new("TextLabel")
  636.  
  637.         local Dragging = false
  638.         local PreciseSliderValue = precisevalue
  639.  
  640.         SliderHolder.Name = (slidername .. "SliderHolder")
  641.         SliderHolder.Parent = TabNameBody
  642.         SliderHolder.BackgroundColor3 = Library.Colors.Border
  643.         SliderHolder.BackgroundTransparency = 1
  644.         SliderHolder.BorderColor3 = Library.Colors.Border
  645.         SliderHolder.BorderSizePixel = 0
  646.         SliderHolder.Size = UDim2.new(0, 200, 0, 35)
  647.  
  648.         SliderBackground.Name = (slidername .. "SliderBackground")
  649.         SliderBackground.Parent = SliderHolder
  650.         SliderBackground.BackgroundColor3 = Library.Colors.SliderBackground
  651.         SliderBackground.BorderColor3 = Library.Colors.Border
  652.         SliderBackground.BorderSizePixel = 0
  653.         SliderBackground.ClipsDescendants = true
  654.         SliderBackground.Position = UDim2.new(0.0450000018, 0, 0.646000028, 0)
  655.         SliderBackground.Size = UDim2.new(0, 182, 0, 5)
  656.  
  657.         SlidingSlider.Name = (slidername .. "SlidingSlider")
  658.         SlidingSlider.Parent = SliderBackground
  659.         SlidingSlider.BackgroundColor3 = Library.Colors.Slider
  660.         SlidingSlider.BorderColor3 = Library.Colors.Border
  661.         SlidingSlider.BorderSizePixel = 0
  662.         SlidingSlider.Position = UDim2.new(-0.00445053587, 0, 0, 0)
  663.         SlidingSlider.Size = UDim2.new((startvalue or 0) / maximumvalue, 0, 0, 5)
  664.  
  665.         SliderTitleText.Name = (slidername .. "SliderTitleText")
  666.         SliderTitleText.Parent = SliderHolder
  667.         SliderTitleText.BackgroundColor3 = Library.Colors.Border
  668.         SliderTitleText.BackgroundTransparency = 1
  669.         SliderTitleText.BorderColor3 = Library.Colors.Border
  670.         SliderTitleText.BorderSizePixel = 0
  671.         SliderTitleText.Position = UDim2.new(0.0350000001, 0, 0.112999983, 0)
  672.         SliderTitleText.Size = UDim2.new(0, 146, 0, 14)
  673.         SliderTitleText.Font = Library.Settings.MainTextFont
  674.         SliderTitleText.Text = slidername
  675.         SliderTitleText.TextColor3 = Library.Colors.Text
  676.         SliderTitleText.TextSize = Library.Settings.MainTextSize
  677.         SliderTitleText.TextXAlignment = Enum.TextXAlignment.Left
  678.  
  679.         SliderValueText.Name = (slidername .. "SliderValueText")
  680.         SliderValueText.Parent = SliderHolder
  681.         SliderValueText.BackgroundColor3 = Library.Colors.Border
  682.         SliderValueText.BackgroundTransparency = 1
  683.         SliderValueText.BorderColor3 = Library.Colors.Border
  684.         SliderValueText.BorderSizePixel = 0
  685.         SliderValueText.Position = UDim2.new(0.829999983, 0, 0.11300005, 0)
  686.         SliderValueText.Size = UDim2.new(0, 25, 0, 14)
  687.         SliderValueText.Font = Library.Settings.MainTextFont
  688.         SliderValueText.Text = tostring(startvalue or PreciseSliderValue and tonumber(string.format("%.2f", startvalue)))
  689.         SliderValueText.TextColor3 = Library.Colors.Text
  690.         SliderValueText.TextSize = Library.Settings.MainTextSize
  691.         SliderValueText.TextXAlignment = Enum.TextXAlignment.Right
  692.  
  693.         local function Sliding(input)
  694.             local Pos = UDim2.new(math.clamp((input.Position.X - SliderBackground.AbsolutePosition.X) / SliderBackground.AbsoluteSize.X, 0, 1), 0, 1, 0)
  695.             SlidingSlider.Size = Pos
  696.  
  697.             local NonSliderPreciseValue = math.floor(((Pos.X.Scale * maximumvalue) / maximumvalue) * (maximumvalue - minimumvalue) + minimumvalue)
  698.             local SliderPreciseValue = ((Pos.X.Scale * maximumvalue) / maximumvalue) * (maximumvalue - minimumvalue) + minimumvalue
  699.  
  700.             local Value = (PreciseSliderValue and SliderPreciseValue or NonSliderPreciseValue)
  701.             Value = tonumber(string.format("%.2f", Value))
  702.  
  703.             SliderValueText.Text = tostring(Value)
  704.             action(Value)
  705.         end;
  706.    
  707.         SliderBackground.InputBegan:Connect(function(input)
  708.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  709.                 Dragging = true
  710.             end
  711.         end)
  712.        
  713.         SliderBackground.InputEnded:Connect(function(input)
  714.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  715.                 Dragging = false
  716.             end
  717.         end)
  718.        
  719.         SliderBackground.InputBegan:Connect(function(input)
  720.             if input.UserInputType == Enum.UserInputType.MouseButton1 then
  721.                 Sliding(input)
  722.             end
  723.         end)
  724.    
  725.         game:GetService("UserInputService").InputChanged:Connect(function(input)
  726.             if Dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  727.                 Sliding(input)
  728.             end
  729.         end)
  730.        
  731.         TabName.MouseButton1Down:Connect(function()
  732.             if not IsATabOpen then
  733.                 ExtendBodySize(35)
  734.  
  735.                 TweenService:Create(SliderTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  736.                 TweenService:Create(SliderValueText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  737.                 TweenService:Create(SliderBackground, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  738.                 TweenService:Create(SlidingSlider, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  739.             elseif IsATabOpen then
  740.                 UnExtendBodySize(35)
  741.  
  742.                 TweenService:Create(SliderTitleText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  743.                 TweenService:Create(SliderValueText, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  744.                 TweenService:Create(SliderBackground, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  745.                 TweenService:Create(SlidingSlider, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  746.             end
  747.         end)
  748.     end
  749.    
  750.     function CoastsLibrary:CreateDropdown(dropdownname, dropdownlistoptions, dropdownlistpresetnumber, action)
  751.         local DropdownHolder = Instance.new("Frame")
  752.         local SelectedOption = Instance.new("TextLabel")
  753.         local DropdownButton = Instance.new("TextButton")
  754.         local DropdownMain = Instance.new("Frame")
  755.         local SelectionOrganizer = Instance.new("UIListLayout")
  756.  
  757.         local DropdownYSize = 0
  758.         local IsDropdownOpen = false
  759.  
  760.         DropdownHolder.Name = (dropdownname .. "DropdownHolder")
  761.         DropdownHolder.Parent = TabNameBody
  762.         DropdownHolder.BackgroundColor3 = Library.Colors.Border
  763.         DropdownHolder.BackgroundTransparency = 1
  764.         DropdownHolder.BorderColor3 = Library.Colors.Border
  765.         DropdownHolder.BorderSizePixel = 0
  766.         DropdownHolder.Size = UDim2.new(0, 200, 0, 30)
  767.  
  768.         SelectedOption.Name = (dropdownname .. "SelectedOption")
  769.         SelectedOption.Parent = DropdownHolder
  770.         SelectedOption.BackgroundColor3 = Library.Colors.Dropdown
  771.         SelectedOption.BorderColor3 = Library.Colors.Border
  772.         SelectedOption.BorderSizePixel = 0
  773.         SelectedOption.Size = UDim2.new(0, 200, 0, 30)
  774.         SelectedOption.Font = Library.Settings.MainTextFont
  775.         SelectedOption.Text = dropdownlistoptions[dropdownlistpresetnumber]
  776.         SelectedOption.TextColor3 = Library.Colors.Text
  777.         SelectedOption.TextSize = Library.Settings.MainTextSize
  778.  
  779.         DropdownButton.Name = (dropdownname .. "DropdownButton")
  780.         DropdownButton.Parent = DropdownHolder
  781.         DropdownButton.BackgroundColor3 = Library.Colors.Border
  782.         DropdownButton.BackgroundTransparency = 1
  783.         DropdownButton.BorderColor3 = Library.Colors.Border
  784.         DropdownButton.BorderSizePixel = 0
  785.         DropdownButton.Position = UDim2.new(0.829999983, 0, 0, 0)
  786.         DropdownButton.Size = UDim2.new(0, 34, 0, 30)
  787.         DropdownButton.ZIndex = 2
  788.         DropdownButton.Font = Library.Settings.MainTextFont
  789.         DropdownButton.Text = "v"
  790.         DropdownButton.TextColor3 = Library.Colors.Text
  791.         DropdownButton.TextSize = Library.Settings.MainTextSize
  792.  
  793.         DropdownMain.Name = (dropdownname .. "DropdownMain")
  794.         DropdownMain.Parent = DropdownHolder
  795.         DropdownMain.BackgroundColor3 = Color3.new(0.137255, 0.137255, 0.137255)
  796.         DropdownMain.BorderColor3 = Library.Colors.Border
  797.         DropdownMain.BorderSizePixel = 0
  798.         DropdownMain.ClipsDescendants = true
  799.         DropdownMain.Position = UDim2.new(0.995000005, 1, -0.0166666675, 0)
  800.         DropdownMain.Size = UDim2.new(0, 185, 0, DropdownYSize)
  801.  
  802.         SelectionOrganizer.Name = (dropdownname .. "SelectionOrganizer")
  803.         SelectionOrganizer.Parent = DropdownMain
  804.         SelectionOrganizer.SortOrder = Enum.SortOrder.LayoutOrder
  805.  
  806.         for i, v in pairs(dropdownlistoptions) do
  807.             local DropdownListOptionButton = Instance.new("TextButton")
  808.  
  809.             DropdownListOptionButton.Name = (v .. "DropdownButton")
  810.             DropdownListOptionButton.Parent = DropdownMain
  811.             DropdownListOptionButton.BackgroundColor3 = Library.Colors.DropdownButton
  812.             DropdownListOptionButton.BorderColor3 = Library.Colors.Border
  813.             DropdownListOptionButton.BorderSizePixel = 0
  814.             DropdownListOptionButton.Size = UDim2.new(0, 185, 0, 30)
  815.             DropdownListOptionButton.AutoButtonColor = false
  816.             DropdownListOptionButton.Font = Library.Settings.MainTextFont
  817.             DropdownListOptionButton.Text = v;
  818.             DropdownListOptionButton.TextColor3 = Library.Colors.Text
  819.             DropdownListOptionButton.TextSize = Library.Settings.MainTextSize
  820.  
  821.             DropdownYSize = DropdownYSize + 30
  822.  
  823.             DropdownListOptionButton.InputBegan:Connect(function(input)
  824.                 if input.UserInputType == Enum.UserInputType.MouseMovement then
  825.                     TweenService:Create(DropdownListOptionButton, TweenInfo.new(Library.Settings.DropdownButtonColorHoverTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundColor3 = Library.Colors.DropdownButtonHover}):Play()
  826.                 end
  827.             end)
  828.                
  829.             DropdownListOptionButton.InputEnded:Connect(function(input)
  830.                 if input.UserInputType == Enum.UserInputType.MouseMovement then
  831.                     TweenService:Create(DropdownListOptionButton, TweenInfo.new(Library.Settings.DropdownButtonColorHoverTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundColor3 = Library.Colors.DropdownButton}):Play()
  832.                 end
  833.             end)
  834.  
  835.             DropdownListOptionButton.MouseButton1Click:Connect(function()
  836.                 action(v)
  837.  
  838.                 SelectedOption.Text = v;
  839.                
  840.                 TweenService:Create(DropdownMain, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 185, 0, 0)}):Play()
  841.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Rotation = 0}):Play()
  842.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextColor3 = Library.Colors.Text}):Play()
  843.    
  844.                 IsDropdownOpen = false
  845.                 end)
  846.         end
  847.  
  848.         DropdownButton.MouseButton1Click:Connect(function()
  849.             if IsDropdownOpen then
  850.                 TweenService:Create(DropdownMain, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 185, 0, 0)}):Play()
  851.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Rotation = 0}):Play()
  852.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextColor3 = Library.Colors.Text}):Play()
  853.    
  854.                 IsDropdownOpen = false
  855.             elseif not IsDropdownOpen then
  856.                 TabNameBody.ClipsDescendants = false
  857.  
  858.                 TweenService:Create(DropdownMain, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 185, 0, DropdownYSize)}):Play()
  859.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Rotation = -90}):Play()
  860.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextColor3 = Color3.fromRGB(150, 150, 150)}):Play()
  861.    
  862.                 IsDropdownOpen = true  
  863.             end
  864.         end)
  865.  
  866.         TabName.MouseButton1Down:Connect(function()
  867.             if not IsATabOpen then
  868.                 ExtendBodySize(30)
  869.  
  870.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  871.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 0}):Play()
  872.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 0}):Play()
  873.             elseif IsATabOpen then
  874.                 UnExtendBodySize(30)
  875.  
  876.                 TabNameBody.ClipsDescendants = true
  877.                 IsDropdownOpen = false
  878.  
  879.                 TweenService:Create(DropdownMain, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Size = UDim2.new(0, 185, 0, 0)}):Play()
  880.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {Rotation = 0}):Play()
  881.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.DropdownTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextColor3 = Library.Colors.Text}):Play()
  882.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  883.                 TweenService:Create(SelectedOption, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  884.                 TweenService:Create(DropdownButton, TweenInfo.new(Library.Settings.MainTweenTime, Library.Settings.TweenEasingStyle, Enum.EasingDirection.Out), {TextTransparency = 1}):Play()
  885.             end
  886.         end)
  887.     end
  888.  
  889.     return CoastsLibrary;
  890. end
  891.  
  892. return Library;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement