Advertisement
OfficeR0808

Untitled

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