Advertisement
TheDevastation

Untitled

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