Advertisement
unknownexploits

framework testing

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