Advertisement
DE_Speedruns

Ash

Feb 23rd, 2025 (edited)
2,186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.74 KB | None | 0 0
  1. getgenv().namehub = "Ash"
  2. local UserInputService = game:GetService('UserInputService')
  3. local LocalPlayer = game:GetService('Players').LocalPlayer
  4. local TweenService = game:GetService('TweenService')
  5. local HttpService = game:GetService('HttpService')
  6. local CoreGui = game:GetService('CoreGui')
  7.  
  8. local Mouse = LocalPlayer:GetMouse();
  9.  
  10. local Library = {
  11. connections = {};
  12. Flags = {};
  13. Enabled = true;
  14. slider_drag = false;
  15. core = nil;
  16. dragging = false;
  17. drag_position = nil;
  18. start_position = nil;
  19. }
  20.  
  21. if isfolder("Frostware") then
  22. delfolder("Frostware")
  23. end
  24.  
  25. function Library:disconnect()
  26. for _, value in Library.connections do
  27. if not Library.connections[value] then
  28. continue
  29. end
  30.  
  31. Library.connections[value]:Disconnect()
  32. Library.connections[value] = nil
  33. end
  34. end
  35.  
  36. function Library:clear()
  37. for _, object in CoreGui:GetChildren() do
  38. if object.Name ~= "Astral" then
  39. continue
  40. end
  41.  
  42. object:Destroy()
  43. end
  44. end
  45.  
  46. function Library:exist()
  47. if not Library.core then return end
  48. if not Library.core.Parent then return end
  49. return true
  50. end
  51.  
  52. function Library:save_flags()
  53. if not Library.exist() then return end
  54.  
  55. local flags = HttpService:JSONEncode(Library.Flags)
  56. end
  57.  
  58. function Library:load_flags()
  59. if not isfile(`Astral hub/{game.GameId}.lua`) then Library.save_flags() return end
  60.  
  61. local flags = readfile(`Astral hub/{game.GameId}.lua`)
  62. if not flags then Library.save_flags() return end
  63.  
  64. Library.Flags = HttpService:JSONDecode(flags)
  65. end
  66.  
  67. Library.load_flags()
  68. Library.clear()
  69.  
  70. function Library:open()
  71. self.Container.Visible = true
  72. self.Shadow.Visible = true
  73. self.Mobile.Modal = true
  74.  
  75. TweenService:Create(self.Container, TweenInfo.new(0.6, Enum.EasingStyle.Circular, Enum.EasingDirection.InOut), {
  76. Size = UDim2.new(0, 699, 0, 426)
  77. }):Play()
  78.  
  79. TweenService:Create(self.Shadow, TweenInfo.new(0.6, Enum.EasingStyle.Circular, Enum.EasingDirection.InOut), {
  80. Size = UDim2.new(0, 776, 0, 509)
  81. }):Play()
  82. end
  83.  
  84. function Library:close()
  85. TweenService:Create(self.Shadow, TweenInfo.new(0.6, Enum.EasingStyle.Circular, Enum.EasingDirection.InOut), {
  86. Size = UDim2.new(0, 0, 0, 0)
  87. }):Play()
  88.  
  89. local main_tween = TweenService:Create(self.Container, TweenInfo.new(0.6, Enum.EasingStyle.Circular, Enum.EasingDirection.InOut), {
  90. Size = UDim2.new(0, 0, 0, 0)
  91. })
  92.  
  93. main_tween:Play()
  94. main_tween.Completed:Once(function()
  95. if Library.enabled then
  96. return
  97. end
  98.  
  99. self.Container.Visible = false
  100. self.Shadow.Visible = false
  101. self.Mobile.Modal = false
  102. end)
  103. end
  104.  
  105. function Library:drag()
  106. if not Library.drag_position then
  107. return
  108. end
  109.  
  110. if not Library.start_position then
  111. return
  112. end
  113.  
  114. local delta = self.input.Position - Library.drag_position
  115. local position = UDim2.new(Library.start_position.X.Scale, Library.start_position.X.Offset + delta.X, Library.start_position.Y.Scale, Library.start_position.Y.Offset + delta.Y)
  116.  
  117. TweenService:Create(self.container.Container, TweenInfo.new(0.2), {
  118. Position = position
  119. }):Play()
  120.  
  121. TweenService:Create(self.container.Shadow, TweenInfo.new(0.2), {
  122. Position = position
  123. }):Play()
  124. end
  125.  
  126. function Library:visible()
  127. Library.enabled = not Library.enabled
  128.  
  129. if Library.enabled then
  130. Library.open(self)
  131. else
  132. Library.close(self)
  133. end
  134. end
  135.  
  136. function Library:new()
  137. local container = Instance.new("ScreenGui")
  138. container.Name = "Astral"
  139. container.Parent = CoreGui
  140.  
  141. Library.core = container
  142.  
  143. local Shadow = Instance.new("ImageLabel")
  144. Shadow.Name = "Shadow"
  145. Shadow.Parent = container
  146. Shadow.AnchorPoint = Vector2.new(0.5, 0.5)
  147. Shadow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  148. Shadow.BackgroundTransparency = 1.000
  149. Shadow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  150. Shadow.BorderSizePixel = 0
  151. Shadow.Position = UDim2.new(0.508668244, 0, 0.5, 0)
  152. Shadow.Size = UDim2.new(0, 776, 0, 509)
  153. Shadow.ZIndex = 0
  154. Shadow.Image = "rbxassetid://17290899982"
  155.  
  156. local Container = Instance.new("Frame")
  157. Container.Name = "Container"
  158. Container.Parent = container
  159. Container.AnchorPoint = Vector2.new(0.5, 0.5)
  160. Container.BackgroundColor3 = Color3.fromRGB(19, 20, 24)
  161. Container.BorderColor3 = Color3.fromRGB(0, 0, 0)
  162. Container.BorderSizePixel = 0
  163. Container.ClipsDescendants = true
  164. Container.Position = UDim2.new(0.5, 0, 0.5, 0)
  165. Container.Size = UDim2.new(0, 699, 0, 426)
  166.  
  167. local ContainerCorner = Instance.new("UICorner")
  168. ContainerCorner.CornerRadius = UDim.new(0, 20)
  169. ContainerCorner.Parent = container.Container
  170.  
  171. local Top = Instance.new("ImageLabel")
  172. Top.Name = "Top"
  173. Top.Parent = Container
  174. Top.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  175. Top.BackgroundTransparency = 1.000
  176. Top.BorderColor3 = Color3.fromRGB(0, 0, 0)
  177. Top.BorderSizePixel = 0
  178. Top.Size = UDim2.new(0, 699, 0, 39)
  179. Top.Image = ""
  180.  
  181. local Logo = Instance.new("ImageLabel")
  182. Logo.Name = "Logo"
  183. Logo.Parent = Top
  184. Logo.AnchorPoint = Vector2.new(0.5, 0.5)
  185. Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  186. Logo.BackgroundTransparency = 1.000
  187. Logo.BorderColor3 = Color3.fromRGB(0, 0, 0)
  188. Logo.BorderSizePixel = 0
  189. Logo.Position = UDim2.new(0.0387367606, 0, 0.5, 0)
  190. Logo.Size = UDim2.new(0, 30, 0, 25)
  191. Logo.Image = ""
  192.  
  193. local TextLabel = Instance.new("TextLabel")
  194. TextLabel.Parent = Top
  195. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  196. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  197. TextLabel.BackgroundTransparency = 1.000
  198. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  199. TextLabel.BorderSizePixel = 0
  200. TextLabel.Position = UDim2.new(0.0938254446, 0, 0.496794879, 0)
  201. TextLabel.Size = UDim2.new(0, 75, 0, 16)
  202. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  203. TextLabel.Text = getgenv().namehub
  204. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  205. TextLabel.TextScaled = true
  206. TextLabel.TextSize = 14.000
  207. TextLabel.TextWrapped = true
  208. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  209.  
  210. local Line = Instance.new("Frame")
  211. Line.Name = "Line"
  212. Line.Parent = Container
  213. Line.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  214. Line.BorderColor3 = Color3.fromRGB(0, 0, 0)
  215. Line.BorderSizePixel = 0
  216. Line.Position = UDim2.new(0.296137333, 0, 0.0915492922, 0)
  217. Line.Size = UDim2.new(0, 2, 0, 387)
  218.  
  219. local tabs = Instance.new("ScrollingFrame")
  220. tabs.Name = "Tabs"
  221. tabs.Active = true
  222. tabs.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  223. tabs.BackgroundTransparency = 1.000
  224. tabs.BorderColor3 = Color3.fromRGB(0, 0, 0)
  225. tabs.BorderSizePixel = 0
  226. tabs.Position = UDim2.new(0, 0, 0.0915492922, 0)
  227. tabs.Size = UDim2.new(0, 209, 0, 386)
  228. tabs.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
  229. tabs.ScrollBarThickness = 0
  230. tabs.Parent = container.Container
  231.  
  232. local tabslist = Instance.new("UIListLayout")
  233. tabslist.Parent = tabs
  234. tabslist.HorizontalAlignment = Enum.HorizontalAlignment.Center
  235. tabslist.SortOrder = Enum.SortOrder.LayoutOrder
  236. tabslist.Padding = UDim.new(0, 9)
  237.  
  238. local UIPadding = Instance.new("UIPadding")
  239. UIPadding.Parent = tabs
  240. UIPadding.PaddingTop = UDim.new(0, 15)
  241.  
  242. local tabsCorner = Instance.new("UICorner")
  243. tabsCorner.Parent = tabs
  244.  
  245. local mobile_button = Instance.new("TextButton")
  246. mobile_button.Name = "Mobile"
  247. mobile_button.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  248. mobile_button.BorderColor3 = Color3.fromRGB(0, 0, 0)
  249. mobile_button.BorderSizePixel = 0
  250. mobile_button.Position = UDim2.new(0.0210955422, 0, 0.91790241, 0)
  251. mobile_button.Size = UDim2.new(0, 122, 0, 38)
  252. mobile_button.AutoButtonColor = false
  253. mobile_button.Modal = true
  254. mobile_button.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  255. mobile_button.Text = ""
  256. mobile_button.TextColor3 = Color3.fromRGB(0, 0, 0)
  257. mobile_button.TextSize = 14.000
  258. mobile_button.Parent = container
  259. mobile_button.Draggable = true
  260.  
  261. local UICorner = Instance.new("UICorner")
  262. UICorner.CornerRadius = UDim.new(0, 13)
  263. UICorner.Parent = mobile_button
  264.  
  265. local shadowMobile = Instance.new("ImageLabel")
  266. shadowMobile.Name = "Shadow"
  267. shadowMobile.Parent = mobile_button
  268. shadowMobile.AnchorPoint = Vector2.new(0.5, 0.5)
  269. shadowMobile.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  270. shadowMobile.BackgroundTransparency = 1.000
  271. shadowMobile.BorderColor3 = Color3.fromRGB(0, 0, 0)
  272. shadowMobile.BorderSizePixel = 0
  273. shadowMobile.Position = UDim2.new(0.5, 0, 0.5, 0)
  274. shadowMobile.Size = UDim2.new(0, 144, 0, 58)
  275. shadowMobile.ZIndex = 0
  276. shadowMobile.Image = "rbxassetid://17183270335"
  277. shadowMobile.ImageTransparency = 0.200
  278.  
  279. local State = Instance.new("TextLabel")
  280. State.Name = "State"
  281. State.Parent = mobile_button
  282. State.AnchorPoint = Vector2.new(0.5, 0.5)
  283. State.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  284. State.BackgroundTransparency = 1.000
  285. State.BorderColor3 = Color3.fromRGB(0, 0, 0)
  286. State.BorderSizePixel = 0
  287. State.Position = UDim2.new(0.646000028, 0, 0.5, 0)
  288. State.Size = UDim2.new(0, 64, 0, 15)
  289. State.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  290. State.Text = "Show"
  291. State.TextColor3 = Color3.fromRGB(255, 255, 255)
  292. State.TextScaled = true
  293. State.TextSize = 14.000
  294. State.TextWrapped = true
  295. State.TextXAlignment = Enum.TextXAlignment.Left
  296.  
  297. local Icon = Instance.new("ImageLabel")
  298. Icon.Name = "Icon"
  299. Icon.Parent = mobile_button
  300. Icon.AnchorPoint = Vector2.new(0.5, 0.5)
  301. Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  302. Icon.BackgroundTransparency = 1.000
  303. Icon.BorderColor3 = Color3.fromRGB(0, 0, 0)
  304. Icon.BorderSizePixel = 0
  305. Icon.Position = UDim2.new(0.268000007, 0, 0.5, 0)
  306. Icon.Size = UDim2.new(0, 15, 0, 15)
  307. Icon.Image = "rbxassetid://10734975692"
  308. container.Container.InputBegan:Connect(function(input: InputObject)
  309. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  310. Library.dragging = true
  311. Library.drag_position = input.Position
  312. Library.start_position = container.Container.Position
  313.  
  314. input.Changed:Connect(function()
  315. if input.UserInputState == Enum.UserInputState.End then
  316. Library.dragging = false
  317. Library.drag_position = nil
  318. Library.start_position = nil
  319. end
  320. end)
  321. end
  322. end)
  323.  
  324. UserInputService.InputChanged:Connect(function(input: InputObject)
  325. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  326. Library.drag({
  327. input = input,
  328. container = container
  329. })
  330. end
  331. end)
  332.  
  333. UserInputService.InputBegan:Connect(function(input: InputObject, process: boolean)
  334. if process then return end
  335.  
  336. if not Library.exist() then return end
  337.  
  338. if input.KeyCode == Enum.KeyCode.Insert then
  339. Library.visible(container)
  340. end
  341. end)
  342.  
  343. mobile_button.MouseButton1Click:Connect(function()
  344. Library.visible(container)
  345. end)
  346.  
  347. local Tab = {}
  348.  
  349. function Tab:update_sections()
  350. self.left_section.Visible = true
  351. self.right_section.Visible = true
  352.  
  353. for _, object in container.Container:GetChildren() do
  354. if not object.Name:find("Section") then
  355. continue
  356. end
  357.  
  358. if object == self.left_section then
  359. continue
  360. end
  361.  
  362. if object == self.right_section then
  363. continue
  364. end
  365.  
  366. object.Visible = false
  367. end
  368. end
  369.  
  370. function Tab:open_tab()
  371. Tab.update_sections({
  372. left_section = self.left_section,
  373. right_section = self.right_section
  374. })
  375.  
  376. TweenService:Create(self.tab.Fill, TweenInfo.new(0.4), {
  377. BackgroundTransparency = 0
  378. }):Play()
  379.  
  380. TweenService:Create(self.tab.Glow, TweenInfo.new(0.4), {
  381. ImageTransparency = 0
  382. }):Play()
  383.  
  384. TweenService:Create(self.tab.TextLabel, TweenInfo.new(0.4), {
  385. TextTransparency = 0
  386. }):Play()
  387.  
  388. TweenService:Create(self.tab.Logo, TweenInfo.new(0.4), {
  389. ImageTransparency = 0
  390. }):Play()
  391.  
  392. for _, object in tabs:GetChildren() do
  393. if object.Name ~= 'Tab' then
  394. continue
  395. end
  396.  
  397. if object == self.tab then
  398. continue
  399. end
  400.  
  401. TweenService:Create(object.Fill, TweenInfo.new(0.4), {
  402. BackgroundTransparency = 1
  403. }):Play()
  404.  
  405. TweenService:Create(object.Glow, TweenInfo.new(0.4), {
  406. ImageTransparency = 1
  407. }):Play()
  408.  
  409. TweenService:Create(object.TextLabel, TweenInfo.new(0.4), {
  410. TextTransparency = 0.5
  411. }):Play()
  412.  
  413. TweenService:Create(object.Logo, TweenInfo.new(0.4), {
  414. ImageTransparency = 0.5
  415. }):Play()
  416. end
  417. end
  418.  
  419. function Tab:create_tab()
  420. local tab = Instance.new("TextButton")
  421. tab.Name = "Tab"
  422. tab.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  423. tab.BorderColor3 = Color3.fromRGB(0, 0, 0)
  424. tab.BorderSizePixel = 0
  425. tab.Size = UDim2.new(0, 174, 0, 40)
  426. tab.ZIndex = 2
  427. tab.AutoButtonColor = false
  428. tab.Font = Enum.Font.SourceSans
  429. tab.Text = ""
  430. tab.TextColor3 = Color3.fromRGB(0, 0, 0)
  431. tab.TextSize = 14.000
  432. tab.Parent = tabs
  433.  
  434. local tabCorner = Instance.new("UICorner")
  435. tabCorner.CornerRadius = UDim.new(0, 5)
  436. tabCorner.Parent = tab
  437.  
  438. local TextLabel = Instance.new("TextLabel")
  439. TextLabel.Parent = tab
  440. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  441. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  442. TextLabel.BackgroundTransparency = 1.000
  443. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  444. TextLabel.BorderSizePixel = 0
  445. TextLabel.Position = UDim2.new(0.58965224, 0, 0.5, 0)
  446. TextLabel.Size = UDim2.new(0, 124, 0, 15)
  447. TextLabel.ZIndex = 3
  448. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  449. TextLabel.Text = self
  450. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  451. TextLabel.TextScaled = true
  452. TextLabel.TextSize = 14.000
  453. TextLabel.TextTransparency = 0.300
  454. TextLabel.TextWrapped = true
  455. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  456.  
  457. local Logo = Instance.new("ImageLabel")
  458. Logo.Name = "Logo"
  459. Logo.Parent = tab
  460. Logo.AnchorPoint = Vector2.new(0.5, 0.5)
  461. Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  462. Logo.BackgroundTransparency = 1.000
  463. Logo.BorderColor3 = Color3.fromRGB(0, 0, 0)
  464. Logo.BorderSizePixel = 0
  465. Logo.Position = UDim2.new(0.130999997, 0, 0.5, 0)
  466. Logo.Size = UDim2.new(0, 17, 0, 17)
  467. Logo.ZIndex = 3
  468. Logo.Image = "rbxassetid://17290697757"
  469. Logo.ImageTransparency = 0.3001
  470.  
  471. local Glow = Instance.new("ImageLabel")
  472. Glow.Name = "Glow"
  473. Glow.Parent = tab
  474. Glow.AnchorPoint = Vector2.new(0.5, 0.5)
  475. Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  476. Glow.BackgroundTransparency = 1.000
  477. Glow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  478. Glow.BorderSizePixel = 0
  479. Glow.Position = UDim2.new(0.5, 0, 0.5, 0)
  480. Glow.Size = UDim2.new(0, 190, 0, 53)
  481. Glow.Image = "rbxassetid://17290723539"
  482. Glow.ImageTransparency = 1.000
  483.  
  484. local Fill = Instance.new("Frame")
  485. Fill.Name = "Fill"
  486. Fill.Parent = tab
  487. Fill.AnchorPoint = Vector2.new(0.5, 0.5)
  488. Fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  489. Fill.BackgroundTransparency = 1.000
  490. Fill.BorderColor3 = Color3.fromRGB(0, 0, 0)
  491. Fill.BorderSizePixel = 0
  492. Fill.Position = UDim2.new(0.5, 0, 0.5, 0)
  493. Fill.Size = UDim2.new(0, 174, 0, 40)
  494. Fill.ZIndex = 2
  495. local UICorner_2 = Instance.new("UICorner")
  496. UICorner_2.CornerRadius = UDim.new(0, 10)
  497. UICorner_2.Parent = Fill
  498.  
  499. local UIGradient = Instance.new("UIGradient")
  500. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(66, 89, 182)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(37, 57, 137))}
  501. UIGradient.Rotation = 20
  502. UIGradient.Parent = Fill
  503.  
  504. local left_section = Instance.new("ScrollingFrame")
  505. left_section.Name = "LeftSection"
  506. left_section.Active = true
  507. left_section.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  508. left_section.BackgroundTransparency = 1.000
  509. left_section.BorderColor3 = Color3.fromRGB(0, 0, 0)
  510. left_section.BorderSizePixel = 0
  511. left_section.Position = UDim2.new(0.326180249, 0, 0.126760557, 0)
  512. left_section.Size = UDim2.new(0, 215, 0, 372)
  513. left_section.AutomaticCanvasSize = Enum.AutomaticSize.XY
  514. left_section.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
  515. left_section.ScrollBarThickness = 0
  516.  
  517. local leftsectionlist = Instance.new("UIListLayout")
  518. leftsectionlist.Parent = left_section
  519. leftsectionlist.HorizontalAlignment = Enum.HorizontalAlignment.Center
  520. leftsectionlist.SortOrder = Enum.SortOrder.LayoutOrder
  521. leftsectionlist.Padding = UDim.new(0, 7)
  522.  
  523. local right_section = Instance.new("ScrollingFrame")
  524. right_section.Name = "RightSection"
  525. right_section.Active = true
  526. right_section.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  527. right_section.BackgroundTransparency = 1.000
  528. right_section.BorderColor3 = Color3.fromRGB(0, 0, 0)
  529. right_section.BorderSizePixel = 0
  530. right_section.Position = UDim2.new(0.662374794, 0, 0.126760557, 0)
  531. right_section.Size = UDim2.new(0, 215, 0, 372)
  532. right_section.AutomaticCanvasSize = Enum.AutomaticSize.XY
  533. right_section.ScrollBarImageColor3 = Color3.fromRGB(0, 0, 0)
  534. right_section.ScrollBarThickness = 0
  535.  
  536. local rightsectionlist = Instance.new("UIListLayout")
  537. rightsectionlist.Parent = right_section
  538.  
  539. rightsectionlist.HorizontalAlignment = Enum.HorizontalAlignment.Center
  540. rightsectionlist.SortOrder = Enum.SortOrder.LayoutOrder
  541. rightsectionlist.Padding = UDim.new(0, 7)
  542.  
  543. if container.Container:FindFirstChild('RightSection') then
  544. left_section.Visible = false
  545. right_section.Visible = false
  546. else
  547. Tab.open_tab({
  548. tab = tab,
  549. left_section = left_section,
  550. right_section = right_section
  551. })
  552. end
  553.  
  554. left_section.Parent = container.Container
  555. right_section.Parent = container.Container
  556.  
  557. tab.MouseButton1Click:Connect(function()
  558. Tab.open_tab({
  559. tab = tab,
  560. left_section = left_section,
  561. right_section = right_section
  562. })
  563. end)
  564.  
  565. local Module = {}
  566.  
  567. function Module:create_title()
  568. local section = self.section == 'left' and left_section or right_section
  569.  
  570. local title = Instance.new("TextLabel")
  571. title.Name = "Title"
  572. title.AnchorPoint = Vector2.new(0.5, 0.5)
  573. title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  574. title.BackgroundTransparency = 1.000
  575. title.BorderColor3 = Color3.fromRGB(0, 0, 0)
  576. title.BorderSizePixel = 0
  577. title.Position = UDim2.new(0.531395316, 0, 0.139784947, 0)
  578. title.Size = UDim2.new(0, 201, 0, 15)
  579. title.ZIndex = 2
  580. title.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  581. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  582. title.TextScaled = true
  583. title.TextSize = 14.000
  584. title.TextWrapped = true
  585. title.TextXAlignment = Enum.TextXAlignment.Left
  586. title.Parent = section
  587. title.Text = self.name
  588. end
  589.  
  590. function Module:enable_toggle()
  591. TweenService:Create(self.Checkbox.Fill, TweenInfo.new(0.4), {
  592. BackgroundTransparency = 0
  593. }):Play()
  594.  
  595. TweenService:Create(self.Checkbox.Glow, TweenInfo.new(0.4), {
  596. ImageTransparency = 0
  597. }):Play()
  598. end
  599.  
  600. function Module:disable_toggle()
  601. TweenService:Create(self.Checkbox.Fill, TweenInfo.new(0.4), {
  602. BackgroundTransparency = 1
  603. }):Play()
  604.  
  605. TweenService:Create(self.Checkbox.Glow, TweenInfo.new(0.4), {
  606. ImageTransparency = 1
  607. }):Play()
  608. end
  609.  
  610. function Module:update_toggle()
  611. if self.state then
  612. Module.enable_toggle(self.toggle)
  613. else
  614. Module.disable_toggle(self.toggle)
  615. end
  616. end
  617.  
  618. function Module:create_toggle()
  619. local section = self.section == 'left' and left_section or right_section
  620.  
  621. local toggle = Instance.new("TextButton")
  622. toggle.Name = "Toggle"
  623. toggle.Parent = section
  624. toggle.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  625. toggle.BorderColor3 = Color3.fromRGB(0, 0, 0)
  626. toggle.BorderSizePixel = 0
  627. toggle.Size = UDim2.new(0, 215, 0, 37)
  628. toggle.AutoButtonColor = false
  629. toggle.Font = Enum.Font.SourceSans
  630. toggle.Text = ""
  631. toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
  632. toggle.TextSize = 14.000
  633. local UICorner = Instance.new("UICorner")
  634. UICorner.CornerRadius = UDim.new(0, 10)
  635. UICorner.Parent = toggle
  636.  
  637. local Checkbox = Instance.new("Frame")
  638. Checkbox.Name = "Checkbox"
  639. Checkbox.Parent = toggle
  640. Checkbox.AnchorPoint = Vector2.new(0.5, 0.5)
  641. Checkbox.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  642. Checkbox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  643. Checkbox.BorderSizePixel = 0
  644. Checkbox.Position = UDim2.new(0.915000021, 0, 0.5, 0)
  645. Checkbox.Size = UDim2.new(0, 17, 0, 17)
  646.  
  647. local UICorner_2 = Instance.new("UICorner")
  648. UICorner_2.CornerRadius = UDim.new(0, 4)
  649. UICorner_2.Parent = Checkbox
  650.  
  651. local Glow = Instance.new("ImageLabel")
  652. Glow.Name = "Glow"
  653. Glow.Parent = Checkbox
  654. Glow.AnchorPoint = Vector2.new(0.5, 0.5)
  655. Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  656. Glow.BackgroundTransparency = 1.000
  657. Glow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  658. Glow.BorderSizePixel = 0
  659. Glow.Position = UDim2.new(0.5, 0, 0.5, 0)
  660. Glow.Size = UDim2.new(0, 27, 0, 27)
  661. Glow.Image = "rbxassetid://17290798394"
  662. Glow.ImageTransparency = 1.000
  663.  
  664. local Fill = Instance.new("Frame")
  665. Fill.Name = "Fill"
  666. Fill.Parent = Checkbox
  667. Fill.AnchorPoint = Vector2.new(0.5, 0.5)
  668. Fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  669. Fill.BackgroundTransparency = 1.000
  670. Fill.BorderColor3 = Color3.fromRGB(0, 0, 0)
  671. Fill.BorderSizePixel = 0
  672. Fill.Position = UDim2.new(0.5, 0, 0.5, 0)
  673. Fill.Size = UDim2.new(0, 17, 0, 17)
  674.  
  675. local UICorner_3 = Instance.new("UICorner")
  676. UICorner_3.CornerRadius = UDim.new(0, 4)
  677. UICorner_3.Parent = Fill
  678.  
  679. local UIGradient = Instance.new("UIGradient")
  680. UIGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0.00, Color3.fromRGB(66, 89, 182)), ColorSequenceKeypoint.new(1.00, Color3.fromRGB(37, 57, 137))}
  681. UIGradient.Rotation = 20
  682. UIGradient.Parent = Fill
  683.  
  684. local TextLabel = Instance.new("TextLabel")
  685. TextLabel.Parent = toggle
  686. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  687. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  688. TextLabel.BackgroundTransparency = 1.000
  689. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  690. TextLabel.BorderSizePixel = 0
  691. TextLabel.Position = UDim2.new(0.444953382, 0, 0.5, 0)
  692. TextLabel.Size = UDim2.new(0, 164, 0, 15)
  693. TextLabel.ZIndex = 2
  694. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  695. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  696. TextLabel.TextScaled = true
  697. TextLabel.TextSize = 14.000
  698. TextLabel.TextWrapped = true
  699. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  700. TextLabel.Text = self.name
  701.  
  702. if not Library.Flags[self.flag] then
  703. Library.Flags[self.flag] = self.enabled
  704. end
  705.  
  706. self.callback(Library.Flags[self.flag])
  707.  
  708. Module.update_toggle({
  709. state = Library.Flags[self.flag],
  710. toggle = toggle
  711. })
  712.  
  713. toggle.MouseButton1Click:Connect(function()
  714. Library.Flags[self.flag] = not Library.Flags[self.flag]
  715. Library.save_flags()
  716.  
  717. Module.update_toggle({
  718. state = Library.Flags[self.flag],
  719. toggle = toggle
  720. })
  721.  
  722. self.callback(Library.Flags[self.flag])
  723. end)
  724. end
  725.  
  726.  
  727. function Module:update_slider()
  728. local result = math.clamp((Mouse.X - self.slider.Box.AbsolutePosition.X) / self.slider.Box.AbsoluteSize.X, 0, 1)
  729.  
  730. if not result then
  731. return
  732. end
  733.  
  734. local number = math.floor(((self.maximum_value - self.minimum_value) * result) + self.minimum_value)
  735. local slider_size = math.clamp(result, 0.001, 0.999)
  736.  
  737. self.slider.Box.Fill.UIGradient.Transparency = NumberSequence.new({
  738. NumberSequenceKeypoint.new(0, 0),
  739. NumberSequenceKeypoint.new(slider_size, 0),
  740. NumberSequenceKeypoint.new(math.min(slider_size + 0.001, 1), 1),
  741. NumberSequenceKeypoint.new(1, 1)
  742. })
  743.  
  744. self.slider.Box.Glow.UIGradient.Transparency = NumberSequence.new({
  745. NumberSequenceKeypoint.new(0, 0),
  746. NumberSequenceKeypoint.new(slider_size, 0),
  747. NumberSequenceKeypoint.new(math.min(slider_size + 0.03, 1), 1),
  748. NumberSequenceKeypoint.new(1, 1)
  749. })
  750.  
  751. Library.Flags[self.flag] = number
  752.  
  753. self.slider.Number.Text = number
  754. self.callback(number)
  755. end
  756.  
  757. function Module:slider_loop()
  758. Library.slider_drag = true
  759.  
  760. while Library.slider_drag do
  761. Module.update_slider(self)
  762.  
  763. task.wait()
  764. end
  765. end
  766.  
  767.  
  768. function Module:create_slider()
  769. local drag = false
  770. local section = self.section == 'left' and left_section or right_section
  771.  
  772. local slider = Instance.new("TextButton")
  773. slider.Name = "Slider"
  774. slider.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  775. slider.BorderColor3 = Color3.fromRGB(0, 0, 0)
  776. slider.BorderSizePixel = 0
  777. slider.Size = UDim2.new(0, 215, 0, 48)
  778. slider.AutoButtonColor = false
  779. slider.Font = Enum.Font.SourceSans
  780. slider.Text = ""
  781. slider.TextColor3 = Color3.fromRGB(0, 0, 0)
  782. slider.TextSize = 14.000
  783. slider.Parent = section
  784.  
  785. local UICorner = Instance.new("UICorner")
  786. UICorner.CornerRadius = UDim.new(0, 10)
  787. UICorner.Parent = slider
  788.  
  789. local Box = Instance.new("Frame")
  790. Box.Name = "Box"
  791. Box.Parent = slider
  792. Box.AnchorPoint = Vector2.new(0.5, 0.5)
  793. Box.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  794. Box.BorderColor3 = Color3.fromRGB(0, 0, 0)
  795. Box.BorderSizePixel = 0
  796. Box.Position = UDim2.new(0.508023143, 0, 0.708333313, 0)
  797. Box.Size = UDim2.new(0, 192, 0, 6)
  798.  
  799. local UICorner_2 = Instance.new("UICorner")
  800. UICorner_2.CornerRadius = UDim.new(0, 15)
  801. UICorner_2.Parent = Box
  802.  
  803. local Glow = Instance.new("ImageLabel")
  804. Glow.Name = "Glow"
  805. Glow.Parent = Box
  806. Glow.AnchorPoint = Vector2.new(0.5, 0.5)
  807. Glow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  808. Glow.BackgroundTransparency = 1.000
  809. Glow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  810. Glow.BorderSizePixel = 0
  811. Glow.Position = UDim2.new(0.5, 0, 0.5, 0)
  812. Glow.Size = UDim2.new(0, 204, 0, 17)
  813. Glow.ZIndex = 2
  814. Glow.Image = "rbxassetid://17381990533"
  815.  
  816. local UIGradient = Instance.new("UIGradient")
  817. UIGradient.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(0.50, 0.00), NumberSequenceKeypoint.new(0.53, 1.00), NumberSequenceKeypoint.new(1.00, 1.00)}
  818. UIGradient.Parent = Glow
  819.  
  820. local Fill = Instance.new("ImageLabel")
  821. Fill.Name = "Fill"
  822. Fill.Parent = Box
  823. Fill.AnchorPoint = Vector2.new(0, 0.5)
  824. Fill.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  825. Fill.BackgroundTransparency = 1.000
  826. Fill.BorderColor3 = Color3.fromRGB(0, 0, 0)
  827. Fill.BorderSizePixel = 0
  828. Fill.Position = UDim2.new(0, 0, 0.5, 0)
  829. Fill.Size = UDim2.new(0, 192, 0, 6)
  830. Fill.Image = "rbxassetid://17382033116"
  831.  
  832. local UICorner_3 = Instance.new("UICorner")
  833. UICorner_3.CornerRadius = UDim.new(0, 4)
  834. UICorner_3.Parent = Fill
  835.  
  836. local UIGradient_2 = Instance.new("UIGradient")
  837. UIGradient_2.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0.00, 0.00), NumberSequenceKeypoint.new(0.50, 0.00), NumberSequenceKeypoint.new(0.50, 1.00), NumberSequenceKeypoint.new(1.00, 1.00)}
  838. UIGradient_2.Parent = Fill
  839.  
  840. local Hitbox = Instance.new("TextButton")
  841. Hitbox.Name = "Hitbox"
  842. Hitbox.Parent = Box
  843. Hitbox.AnchorPoint = Vector2.new(0.5, 0.5)
  844. Hitbox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  845. Hitbox.BackgroundTransparency = 1.000
  846. Hitbox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  847. Hitbox.BorderSizePixel = 0
  848. Hitbox.Position = UDim2.new(0.5, 0, 0.5, 0)
  849. Hitbox.Size = UDim2.new(0, 200, 0, 13)
  850. Hitbox.ZIndex = 3
  851. Hitbox.AutoButtonColor = false
  852. Hitbox.Font = Enum.Font.SourceSans
  853. Hitbox.Text = ""
  854. Hitbox.TextColor3 = Color3.fromRGB(0, 0, 0)
  855. Hitbox.TextSize = 14.000
  856.  
  857. local TextLabel = Instance.new("TextLabel")
  858. TextLabel.Parent = slider
  859. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  860. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  861. TextLabel.BackgroundTransparency = 1.000
  862. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  863. TextLabel.BorderSizePixel = 0
  864. TextLabel.Position = UDim2.new(0.414720833, 0, 0.375, 0)
  865. TextLabel.Size = UDim2.new(0, 151, 0, 15)
  866. TextLabel.ZIndex = 2
  867. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  868. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  869. TextLabel.TextScaled = true
  870. TextLabel.TextSize = 14.000
  871. TextLabel.TextWrapped = true
  872. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  873.  
  874. local Number = Instance.new("TextLabel")
  875. Number.Name = "Number"
  876. Number.Parent = slider
  877. Number.AnchorPoint = Vector2.new(0.5, 0.5)
  878. Number.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  879. Number.BackgroundTransparency = 1.000
  880. Number.BorderColor3 = Color3.fromRGB(0, 0, 0)
  881. Number.BorderSizePixel = 0
  882. Number.Position = UDim2.new(0.854255736, 0, 0.375, 0)
  883. Number.Size = UDim2.new(0, 38, 0, 15)
  884. Number.ZIndex = 2
  885. Number.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  886. Number.TextColor3 = Color3.fromRGB(255, 255, 255)
  887. Number.TextScaled = true
  888. Number.TextSize = 14.000
  889. Number.TextWrapped = true
  890. Number.TextXAlignment = Enum.TextXAlignment.Right
  891.  
  892.  
  893. TextLabel.Text = self.name
  894. Number.Text = self.value
  895.  
  896. if not Library.Flags[self.flag] then
  897. Library.Flags[self.flag] = self.value
  898. end
  899.  
  900. slider.Number.Text = Library.Flags[self.flag]
  901. self.callback(Library.Flags[self.flag])
  902.  
  903. slider.Box.Hitbox.MouseButton1Down:Connect(function()
  904. if Library.slider_drag then
  905. return
  906. end
  907.  
  908. Module.slider_loop({
  909. slider = slider,
  910. flag = self.flag,
  911. callback = self.callback,
  912.  
  913. maximum_value = self.maximum_value,
  914. minimum_value = self.minimum_value,
  915. })
  916. end)
  917.  
  918. UserInputService.InputEnded:Connect(function(input: InputObject, process: boolean)
  919. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  920. Library.slider_drag = false
  921. Library.save_flags()
  922. end
  923. end)
  924. end
  925.  
  926. function Module:create_dropdown()
  927. local section = self.section == 'left' and left_section or right_section
  928. local list_size = 6
  929. local open = false
  930.  
  931. local option = Instance.new("TextButton")
  932. option.Name = "Option"
  933. option.Active = false
  934. option.AnchorPoint = Vector2.new(0.5, 0.5)
  935. option.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  936. option.BackgroundTransparency = 1.000
  937. option.BorderColor3 = Color3.fromRGB(0, 0, 0)
  938. option.BorderSizePixel = 0
  939. option.Position = UDim2.new(0.47283414, 0, 0.309523821, 0)
  940. option.Selectable = false
  941. option.Size = UDim2.new(0, 176, 0, 13)
  942. option.ZIndex = 2
  943. option.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  944. option.TextColor3 = Color3.fromRGB(255, 255, 255)
  945. option.TextScaled = true
  946. option.TextSize = 14.000
  947. option.TextTransparency = 0.500
  948. option.TextWrapped = true
  949. option.TextXAlignment = Enum.TextXAlignment.Left
  950.  
  951. local dropdown = Instance.new("TextButton")
  952. dropdown.Parent = section
  953. dropdown.Name = "Dropdown"
  954. dropdown.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  955. dropdown.BorderColor3 = Color3.fromRGB(0, 0, 0)
  956. dropdown.BorderSizePixel = 0
  957. dropdown.Size = UDim2.new(0, 215, 0, 36)
  958. dropdown.AutoButtonColor = false
  959. dropdown.Font = Enum.Font.SourceSans
  960. dropdown.Text = ""
  961. dropdown.TextColor3 = Color3.fromRGB(0, 0, 0)
  962. dropdown.TextSize = 14.000
  963.  
  964. local UICorner = Instance.new("UICorner")
  965. UICorner.CornerRadius = UDim.new(0, 10)
  966. UICorner.Parent = dropdown
  967.  
  968. local UIListLayout = Instance.new("UIListLayout")
  969. UIListLayout.Parent = dropdown
  970. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  971. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  972.  
  973. local UIPadding = Instance.new("UIPadding")
  974. UIPadding.Parent = dropdown
  975. UIPadding.PaddingTop = UDim.new(0, 6)
  976.  
  977. local Box = Instance.new("Frame")
  978. Box.Name = "Box"
  979. Box.Parent = dropdown
  980. Box.AnchorPoint = Vector2.new(0.5, 0)
  981. Box.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  982. Box.BorderColor3 = Color3.fromRGB(0, 0, 0)
  983. Box.BorderSizePixel = 0
  984. Box.Position = UDim2.new(0.5, 0, 0.150000006, 0)
  985. Box.Size = UDim2.new(0, 202, 0, 25)
  986. Box.ZIndex = 2
  987.  
  988. local UICorner_2 = Instance.new("UICorner")
  989. UICorner_2.CornerRadius = UDim.new(0, 6)
  990. UICorner_2.Parent = Box
  991.  
  992. local Options = Instance.new("Frame")
  993. Options.Name = "Options"
  994. Options.Parent = Box
  995. Options.AnchorPoint = Vector2.new(0.5, 0)
  996. Options.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  997. Options.BorderColor3 = Color3.fromRGB(0, 0, 0)
  998. Options.BorderSizePixel = 0
  999. Options.ClipsDescendants = true
  1000. Options.Position = UDim2.new(0.5, 0, 0.75999999, 0)
  1001. Options.Size = UDim2.new(0, 202, 0, 0)
  1002.  
  1003. local UICorner_3 = Instance.new("UICorner")
  1004. UICorner_3.CornerRadius = UDim.new(0, 6)
  1005. UICorner_3.Parent = Options
  1006.  
  1007. local UIPadding_2 = Instance.new("UIPadding")
  1008. UIPadding_2.Parent = Options
  1009. UIPadding_2.PaddingLeft = UDim.new(0, 15)
  1010. UIPadding_2.PaddingTop = UDim.new(0, 10)
  1011.  
  1012. local UIListLayout_2 = Instance.new("UIListLayout")
  1013. UIListLayout_2.Parent = Options
  1014. UIListLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  1015. UIListLayout_2.Padding = UDim.new(0, 10)
  1016.  
  1017. local TextLabel = Instance.new("TextLabel")
  1018. TextLabel.Parent = Box
  1019. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  1020. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1021. TextLabel.BackgroundTransparency = 1.000
  1022. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1023. TextLabel.BorderSizePixel = 0
  1024. TextLabel.Position = UDim2.new(0.430000007, 0, 0.5, 0)
  1025. TextLabel.Size = UDim2.new(0, 151, 0, 13)
  1026. TextLabel.ZIndex = 2
  1027. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  1028. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1029. TextLabel.TextScaled = true
  1030. TextLabel.TextSize = 14.000
  1031. TextLabel.TextWrapped = true
  1032. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  1033.  
  1034. local Arrow = Instance.new("ImageLabel")
  1035. Arrow.Name = "Arrow"
  1036. Arrow.Parent = Box
  1037. Arrow.Active = true
  1038. Arrow.AnchorPoint = Vector2.new(0.5, 0.5)
  1039. Arrow.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1040. Arrow.BackgroundTransparency = 1.000
  1041. Arrow.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1042. Arrow.BorderSizePixel = 0
  1043. Arrow.Position = UDim2.new(0.920000017, 0, 0.5, 0)
  1044. Arrow.Size = UDim2.new(0, 12, 0, 12)
  1045. Arrow.ZIndex = 2
  1046. Arrow.Image = "rbxassetid://17400678941"
  1047.  
  1048. dropdown.Box.TextLabel.Text = self.name
  1049.  
  1050. local Dropdown = {}
  1051.  
  1052. function Dropdown:open()
  1053. dropdown.Box.TextLabel.Text = Library.Flags[self.flag]
  1054.  
  1055. TweenService:Create(dropdown.Box.Options, TweenInfo.new(0.4), {
  1056. Size = UDim2.new(0, 202, 0, list_size)
  1057. }):Play()
  1058.  
  1059. TweenService:Create(dropdown, TweenInfo.new(0.4), {
  1060. Size = UDim2.new(0, 215, 0, 30 + list_size)
  1061. }):Play()
  1062.  
  1063. TweenService:Create(dropdown.Box.Arrow, TweenInfo.new(0.4), {
  1064. Rotation = 180
  1065. }):Play()
  1066. end
  1067.  
  1068. function Dropdown:close()
  1069. dropdown.Box.TextLabel.Text = self.name
  1070. TweenService:Create(dropdown.Box.Options, TweenInfo.new(0.4), {
  1071. Size = UDim2.new(0, 202, 0, 0)
  1072. }):Play()
  1073.  
  1074. TweenService:Create(dropdown, TweenInfo.new(0.4), {
  1075. Size = UDim2.new(0, 215, 0, 36)
  1076. }):Play()
  1077.  
  1078. TweenService:Create(dropdown.Box.Arrow, TweenInfo.new(0.4), {
  1079. Rotation = 0
  1080. }):Play()
  1081. end
  1082.  
  1083. function Dropdown:clear()
  1084. for _, object in dropdown.Box.Options:GetChildren() do
  1085. if object.Name ~= 'Option' then
  1086. continue
  1087. end
  1088.  
  1089. object:Destroy()
  1090. end
  1091. end
  1092.  
  1093. function Dropdown:select_option()
  1094. TweenService:Create(self.new_option, TweenInfo.new(0.4), {
  1095. TextTransparency = 0
  1096. }):Play()
  1097.  
  1098. for _, object in dropdown.Box.Options:GetChildren() do
  1099. if object.Name ~= 'Option' then
  1100. continue
  1101. end
  1102.  
  1103. if object.Text == Library.Flags[self.flag] then
  1104. continue
  1105. end
  1106.  
  1107. TweenService:Create(object, TweenInfo.new(0.4), {
  1108. TextTransparency = 0.5
  1109. }):Play()
  1110. end
  1111.  
  1112. dropdown.Box.TextLabel.Text = self.new_option.Text
  1113. end
  1114.  
  1115. function Dropdown:update()
  1116. Dropdown.clear()
  1117.  
  1118. for _, value in self.options do
  1119. list_size += 23
  1120.  
  1121. local new_option = option:Clone()
  1122. new_option.Parent = dropdown.Box.Options
  1123. new_option.Text = value
  1124.  
  1125. if value == Library.Flags[self.flag] then
  1126. new_option.TextTransparency = 0
  1127. end
  1128.  
  1129. new_option.MouseButton1Click:Connect(function()
  1130. Library.Flags[self.flag] = value
  1131.  
  1132. if list_open then
  1133. dropdown.Box.TextLabel.Text = Library.Flags[self.flag]
  1134. end
  1135. self.callback(Library.Flags[self.flag])
  1136. Library.save_flags()
  1137.  
  1138. Dropdown.select_option({
  1139. new_option = new_option,
  1140. flag = self.flag
  1141. })
  1142. end)
  1143. end
  1144. end
  1145.  
  1146. if not Library.Flags[self.flag] then
  1147. Library.Flags[self.flag] = self.option
  1148. end
  1149.  
  1150. self.callback(Library.Flags[self.flag])
  1151. Dropdown.update(self)
  1152.  
  1153. dropdown.MouseButton1Click:Connect(function()
  1154. open = not open
  1155.  
  1156. if open then
  1157. Dropdown.open(self)
  1158. else
  1159. Dropdown.close(self)
  1160. end
  1161. end)
  1162.  
  1163. return Dropdown
  1164. end
  1165.  
  1166. function Module:create_textbox()
  1167. local section = self.section == 'left' and left_section or right_section
  1168. local Textbox = {}
  1169. local textbox = Instance.new("TextButton")
  1170. textbox.Name = "TextBox"
  1171. textbox.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  1172. textbox.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1173. textbox.BorderSizePixel = 0
  1174. textbox.Size = UDim2.new(0, 215, 0, 36)
  1175. textbox.AutoButtonColor = false
  1176. textbox.Font = Enum.Font.SourceSans
  1177. textbox.Text = ""
  1178. textbox.TextColor3 = Color3.fromRGB(0, 0, 0)
  1179. textbox.TextSize = 14.000
  1180. textbox.Parent = section
  1181.  
  1182. local UICorner = Instance.new("UICorner")
  1183. UICorner.CornerRadius = UDim.new(0, 10)
  1184. UICorner.Parent = textbox
  1185.  
  1186. local UIListLayout = Instance.new("UIListLayout")
  1187. UIListLayout.Parent = textbox
  1188. UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  1189. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  1190.  
  1191. local UIPadding = Instance.new("UIPadding")
  1192. UIPadding.Parent = textbox
  1193. UIPadding.PaddingTop = UDim.new(0, 6)
  1194.  
  1195. local Box = Instance.new("Frame")
  1196. Box.Name = "Box"
  1197. Box.Parent = textbox
  1198. Box.AnchorPoint = Vector2.new(0.5, 0)
  1199. Box.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  1200. Box.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1201. Box.BorderSizePixel = 0
  1202. Box.Position = UDim2.new(0.5, 0, 0.150000006, 0)
  1203. Box.Size = UDim2.new(0, 202, 0, 25)
  1204. Box.ZIndex = 2
  1205.  
  1206.  
  1207. local UICorner_2 = Instance.new("UICorner")
  1208. UICorner_2.CornerRadius = UDim.new(0, 6)
  1209. UICorner_2.Parent = Box
  1210.  
  1211. local TextHolder = Instance.new("TextBox")
  1212. TextHolder.Name = "TextHolder"
  1213. TextHolder.Parent = Box
  1214. TextHolder.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  1215. TextHolder.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1216. TextHolder.BorderSizePixel = 0
  1217. TextHolder.Position = UDim2.new(0.0445544571, 0, 0.239999995, 0)
  1218. TextHolder.Size = UDim2.new(0, 182, 0, 13)
  1219. TextHolder.ZIndex = 2
  1220. TextHolder.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  1221. TextHolder.Text = ""
  1222. TextHolder.TextColor3 = Color3.fromRGB(255, 255, 255)
  1223. TextHolder.TextSize = 14.000
  1224. TextHolder.TextXAlignment = Enum.TextXAlignment.Left
  1225. textbox.Box.TextHolder.PlaceholderText = self.name
  1226.  
  1227. if not Library.Flags[self.flag] then
  1228. Library.Flags[self.flag] = self.value
  1229. else
  1230. textbox.Box.TextHolder.Text = Library.Flags[self.flag]
  1231. end
  1232.  
  1233. self.callback(Library.Flags[self.flag])
  1234. textbox.Box.TextHolder.FocusLost:Connect(function()
  1235. self.callback(textbox.Box.TextHolder.Text)
  1236. Library.save_flags()
  1237. end)
  1238.  
  1239. function Textbox:update(text)
  1240. textbox.Box.TextHolder.Text = text
  1241. self.callback(text)
  1242. end
  1243.  
  1244. return Textbox;
  1245. end
  1246. function Module:create_keybind()
  1247. local section = self.section == 'left' and left_section or right_section
  1248. local keybind = Instance.new("TextButton")
  1249. keybind.Name = "Keybind"
  1250. keybind.BackgroundColor3 = Color3.fromRGB(27, 28, 33)
  1251. keybind.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1252. keybind.BorderSizePixel = 0
  1253. keybind.Position = UDim2.new(-0.0186046511, 0, 0.440860212, 0)
  1254. keybind.Size = UDim2.new(0, 215, 0, 37)
  1255. keybind.AutoButtonColor = false
  1256. keybind.Font = Enum.Font.SourceSans
  1257. keybind.Text = ""
  1258. keybind.TextColor3 = Color3.fromRGB(0, 0, 0)
  1259. keybind.TextSize = 14.000
  1260. keybind.Parent = section
  1261.  
  1262. local UICorner = Instance.new("UICorner")
  1263.  
  1264. UICorner.CornerRadius = UDim.new(0, 10)
  1265. UICorner.Parent = keybind
  1266.  
  1267. local TextLabel = Instance.new("TextLabel")
  1268. TextLabel.Parent = keybind
  1269. TextLabel.AnchorPoint = Vector2.new(0.5, 0.5)
  1270. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1271. TextLabel.BackgroundTransparency = 1.000
  1272. TextLabel.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1273. TextLabel.BorderSizePixel = 0
  1274. TextLabel.Position = UDim2.new(0.424475819, 0, 0.5, 0)
  1275. TextLabel.Size = UDim2.new(0, 155, 0, 15)
  1276. TextLabel.ZIndex = 2
  1277. TextLabel.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  1278. TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1279. TextLabel.TextScaled = true
  1280. TextLabel.TextSize = 14.000
  1281. TextLabel.TextWrapped = true
  1282. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  1283.  
  1284. local Box = Instance.new("Frame")
  1285. Box.Name = "Box"
  1286. Box.Parent = keybind
  1287. Box.AnchorPoint = Vector2.new(0.5, 0.5)
  1288. Box.BackgroundColor3 = Color3.fromRGB(22, 23, 27)
  1289. Box.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1290. Box.BorderSizePixel = 0
  1291. Box.Position = UDim2.new(0.875459313, 0, 0.472972959, 0)
  1292. Box.Size = UDim2.new(0, 27, 0, 21)
  1293.  
  1294. local UICorner_2 = Instance.new("UICorner")
  1295. UICorner_2.CornerRadius = UDim.new(0, 4)
  1296. UICorner_2.Parent = Box
  1297.  
  1298.  
  1299. local TextLabel_2 = Instance.new("TextLabel")
  1300. TextLabel_2.Parent = Box
  1301. TextLabel_2.AnchorPoint = Vector2.new(0.5, 0.5)
  1302. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1303. TextLabel_2.BackgroundTransparency = 1.000
  1304. TextLabel_2.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1305. TextLabel_2.BorderSizePixel = 0
  1306. TextLabel_2.Position = UDim2.new(0.630466938, 0, 0.5, 0)
  1307. TextLabel_2.Size = UDim2.new(0, 29, 0, 15)
  1308. TextLabel_2.ZIndex = 2
  1309. TextLabel_2.FontFace = Font.new("rbxasset://fonts/families/Montserrat.json", Enum.FontWeight.SemiBold)
  1310. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  1311. TextLabel_2.TextScaled = true
  1312. TextLabel_2.TextSize = 14.000
  1313. TextLabel_2.TextWrapped = true
  1314.  
  1315. keybind.TextLabel.Text = self.name
  1316. keybind.Box.TextLabel.Text = self.keycode.Name
  1317.  
  1318. if not Library.Flags[self.flag] then
  1319. Library.Flags[self.flag] = self.keycode.Name
  1320. end
  1321.  
  1322. keybind.MouseButton1Click:Connect(function()
  1323. keybind.Box.TextLabel.Text = '...'
  1324. local a,b = UserInputService.InputBegan:Wait();
  1325. if a.KeyCode.Name ~= 'Unknown' then
  1326. keybind.Box.TextLabel.Text = a.KeyCode.Name
  1327. Library.Flags[self.flag] = a.KeyCode.Name
  1328. Library.save_flags()
  1329. end
  1330. end)
  1331.  
  1332. UserInputService.InputBegan:Connect(function(current, pressed)
  1333. if not pressed then
  1334. if current.KeyCode.Name == Library.Flags[self.flag] then
  1335. self.callback(Library.Flags[self.flag])
  1336. end
  1337. end
  1338. end)
  1339. end
  1340. return Module
  1341. end
  1342. return Tab
  1343. end
  1344.  
  1345. return Library
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement