gerisx

Untitled

Jun 17th, 2026 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 149.63 KB | None | 0 0
  1. -- made by samet (joestar._3 on discord)
  2. -- https://discord.gg/VhvTd5HV8d
  3. -- example at bottom
  4.  
  5. if getgenv().Library then
  6. getgenv().Library:Unload()
  7. end
  8.  
  9. local Library do
  10. local Workspace = game:GetService("Workspace")
  11. local UserInputService = game:GetService("UserInputService")
  12. local Players = game:GetService("Players")
  13. local HttpService = game:GetService("HttpService")
  14. local RunService = game:GetService("RunService")
  15. local CoreGui = cloneref and cloneref(game:GetService("CoreGui")) or game:GetService("CoreGui")
  16. local TweenService = game:GetService("TweenService")
  17.  
  18. gethui = gethui or function()
  19. return CoreGui
  20. end
  21.  
  22. local LocalPlayer = Players.LocalPlayer
  23. local Mouse = LocalPlayer:GetMouse()
  24.  
  25. local FromRGB = Color3.fromRGB
  26. local FromHSV = Color3.fromHSV
  27. local FromHex = Color3.fromHex
  28.  
  29. local RGBSequence = ColorSequence.new
  30. local RGBSequenceKeypoint = ColorSequenceKeypoint.new
  31.  
  32. local UDim2New = UDim2.new
  33. local UDimNew = UDim.new
  34. local Vector2New = Vector2.new
  35.  
  36. local MathClamp = math.clamp
  37. local MathFloor = math.floor
  38.  
  39. local TableInsert = table.insert
  40. local TableFind = table.find
  41. local TableRemove = table.remove
  42. local TableConcat = table.concat
  43. local TableClone = table.clone
  44. local TableUnpack = table.unpack
  45.  
  46. local StringFormat = string.format
  47. local StringFind = string.find
  48. local StringGSub = string.gsub
  49. local StringLen = string.len
  50. local StringSub = string.sub
  51.  
  52. local InstanceNew = Instance.new
  53.  
  54. Library = {
  55. Theme = { },
  56.  
  57. MenuKeybind = tostring(Enum.KeyCode.Z),
  58.  
  59. Flags = { },
  60.  
  61. Tween = {
  62. Time = 0.4,
  63. Style = Enum.EasingStyle.Quint,
  64. Direction = Enum.EasingDirection.Out
  65. },
  66.  
  67. FadeSpeed = 0.2,
  68.  
  69. Folders = {
  70. Directory = "esdeeeeee",
  71. Configs = "esdeeeeee/Configs",
  72. Assets = "esdeeeeee/Assets",
  73. Autoload = "esdeeeeee/Autoload",
  74. },
  75.  
  76. -- Ignore below
  77. Pages = { },
  78. Sections = { },
  79.  
  80. Connections = { },
  81. Threads = { },
  82.  
  83. ThemeMap = { },
  84. ThemeItems = { },
  85.  
  86. OpenFrames = { },
  87.  
  88. SetFlags = { },
  89.  
  90. UnnamedConnections = 0,
  91. UnnamedFlags = 0,
  92.  
  93. Holder = nil,
  94. NotifHolder = nil,
  95. UnusedHolder = nil,
  96.  
  97. Font = nil
  98. }
  99.  
  100. local Keys = {
  101. ["Unknown"] = "Unknown",
  102. ["Backspace"] = "Back",
  103. ["Tab"] = "Tab",
  104. ["Clear"] = "Clear",
  105. ["Return"] = "Return",
  106. ["Pause"] = "Pause",
  107. ["Escape"] = "Escape",
  108. ["Space"] = "Space",
  109. ["QuotedDouble"] = '"',
  110. ["Hash"] = "#",
  111. ["Dollar"] = "$",
  112. ["Percent"] = "%",
  113. ["Ampersand"] = "&",
  114. ["Quote"] = "'",
  115. ["LeftParenthesis"] = "(",
  116. ["RightParenthesis"] = " )",
  117. ["Asterisk"] = "*",
  118. ["Plus"] = "+",
  119. ["Comma"] = ",",
  120. ["Minus"] = "-",
  121. ["Period"] = ".",
  122. ["Slash"] = "`",
  123. ["Three"] = "3",
  124. ["Seven"] = "7",
  125. ["Eight"] = "8",
  126. ["Colon"] = ":",
  127. ["Semicolon"] = ";",
  128. ["LessThan"] = "<",
  129. ["GreaterThan"] = ">",
  130. ["Question"] = "?",
  131. ["Equals"] = "=",
  132. ["At"] = "@",
  133. ["LeftBracket"] = "LeftBracket",
  134. ["RightBracket"] = "RightBracked",
  135. ["BackSlash"] = "BackSlash",
  136. ["Caret"] = "^",
  137. ["Underscore"] = "_",
  138. ["Backquote"] = "`",
  139. ["LeftCurly"] = "{",
  140. ["Pipe"] = "|",
  141. ["RightCurly"] = "}",
  142. ["Tilde"] = "~",
  143. ["Delete"] = "Delete",
  144. ["End"] = "End",
  145. ["KeypadZero"] = "Keypad0",
  146. ["KeypadOne"] = "Keypad1",
  147. ["KeypadTwo"] = "Keypad2",
  148. ["KeypadThree"] = "Keypad3",
  149. ["KeypadFour"] = "Keypad4",
  150. ["KeypadFive"] = "Keypad5",
  151. ["KeypadSix"] = "Keypad6",
  152. ["KeypadSeven"] = "Keypad7",
  153. ["KeypadEight"] = "Keypad8",
  154. ["KeypadNine"] = "Keypad9",
  155. ["KeypadPeriod"] = "KeypadP",
  156. ["KeypadDivide"] = "KeypadD",
  157. ["KeypadMultiply"] = "KeypadM",
  158. ["KeypadMinus"] = "KeypadM",
  159. ["KeypadPlus"] = "KeypadP",
  160. ["KeypadEnter"] = "KeypadE",
  161. ["KeypadEquals"] = "KeypadE",
  162. ["Insert"] = "Insert",
  163. ["Home"] = "Home",
  164. ["PageUp"] = "PageUp",
  165. ["PageDown"] = "PageDown",
  166. ["RightShift"] = "RightShift",
  167. ["LeftShift"] = "LeftShift",
  168. ["RightControl"] = "RightControl",
  169. ["LeftControl"] = "LeftControl",
  170. ["LeftAlt"] = "LeftAlt",
  171. ["RightAlt"] = "RightAlt"
  172. }
  173.  
  174. local Themes = {
  175. ["Preset"] = {
  176. ["Background"] = FromRGB(16, 18, 18),
  177. ["Inline"] = FromRGB(21, 24, 24),
  178. ["Element"] = FromRGB(30, 34, 34),
  179. ["Accent"] = FromRGB(255, 255, 255),
  180. ["Border"] = FromRGB(30, 34, 34),
  181. ["Border 2"] = FromRGB(56, 62, 62)
  182. }
  183. }
  184.  
  185. Library.__index = Library
  186. Library.Sections.__index = Library.Sections
  187. Library.Pages.__index = Library.Pages
  188.  
  189. Library.Theme = TableClone(Themes["Preset"])
  190.  
  191. -- Folders
  192. for Index, Value in Library.Folders do
  193. if not isfolder(Value) then
  194. makefolder(Value)
  195. end
  196. end
  197.  
  198. -- Tweening
  199. local Tween = { } do
  200. Tween.__index = Tween
  201.  
  202. Tween.Create = function(self, Item, Info, Goal, IsRawItem)
  203. Item = IsRawItem and Item or Item.Instance
  204. Info = Info or TweenInfo.new(Library.Tween.Time, Library.Tween.Style, Library.Tween.Direction)
  205.  
  206. local NewTween = {
  207. Tween = TweenService:Create(Item, Info, Goal),
  208. Info = Info,
  209. Goal = Goal,
  210. Item = Item
  211. }
  212.  
  213. NewTween.Tween:Play()
  214.  
  215. setmetatable(NewTween, Tween)
  216.  
  217. return NewTween
  218. end
  219.  
  220. Tween.GetProperty = function(self, Item)
  221. Item = Item or self.Item
  222.  
  223. if Item:IsA("Frame") then
  224. return { "BackgroundTransparency" }
  225. elseif Item:IsA("TextLabel") or Item:IsA("TextButton") then
  226. return { "TextTransparency", "BackgroundTransparency" }
  227. elseif Item:IsA("ImageLabel") or Item:IsA("ImageButton") then
  228. return { "BackgroundTransparency", "ImageTransparency" }
  229. elseif Item:IsA("ScrollingFrame") then
  230. return { "BackgroundTransparency", "ScrollBarImageTransparency" }
  231. elseif Item:IsA("TextBox") then
  232. return { "TextTransparency", "BackgroundTransparency" }
  233. elseif Item:IsA("UIStroke") then
  234. return { "Transparency" }
  235. end
  236. end
  237.  
  238. Tween.FadeItem = function(self, Item, Property, Visibility, Speed)
  239. local Item = Item or self.Item
  240.  
  241. local OldTransparency = Item[Property]
  242. Item[Property] = Visibility and 1 or OldTransparency
  243.  
  244. local NewTween = Tween:Create(Item, TweenInfo.new(Speed or Library.Tween.Time, Library.Tween.Style, Library.Tween.Direction), {
  245. [Property] = Visibility and OldTransparency or 1
  246. }, true)
  247.  
  248. Library:Connect(NewTween.Tween.Completed, function()
  249. if not Visibility then
  250. task.wait()
  251. Item[Property] = OldTransparency
  252. end
  253. end)
  254.  
  255. return NewTween
  256. end
  257.  
  258. Tween.Get = function(self)
  259. if not self.Tween then
  260. return
  261. end
  262.  
  263. return self.Tween, self.Info, self.Goal
  264. end
  265.  
  266. Tween.Pause = function(self)
  267. if not self.Tween then
  268. return
  269. end
  270.  
  271. self.Tween:Pause()
  272. end
  273.  
  274. Tween.Play = function(self)
  275. if not self.Tween then
  276. return
  277. end
  278.  
  279. self.Tween:Play()
  280. end
  281.  
  282. Tween.Clean = function(self)
  283. if not self.Tween then
  284. return
  285. end
  286.  
  287. Tween:Pause()
  288. self = nil
  289. end
  290. end
  291.  
  292. -- Instances
  293. local Instances = { } do
  294. Instances.__index = Instances
  295.  
  296. Instances.Create = function(self, Class, Properties)
  297. local NewItem = {
  298. Instance = InstanceNew(Class),
  299. Properties = Properties,
  300. Class = Class
  301. }
  302.  
  303. setmetatable(NewItem, Instances)
  304.  
  305. for Property, Value in NewItem.Properties do
  306. NewItem.Instance[Property] = Value
  307. end
  308.  
  309. return NewItem
  310. end
  311.  
  312. Instances.AddToTheme = function(self, Properties)
  313. if not self.Instance then
  314. return
  315. end
  316.  
  317. Library:AddToTheme(self, Properties)
  318. end
  319.  
  320. Instances.ChangeItemTheme = function(self, Properties)
  321. if not self.Instance then
  322. return
  323. end
  324.  
  325. Library:ChangeItemTheme(self, Properties)
  326. end
  327.  
  328. Instances.Connect = function(self, Event, Callback, Name)
  329. if not self.Instance then
  330. return
  331. end
  332.  
  333. if not self.Instance[Event] then
  334. return
  335. end
  336.  
  337. return Library:Connect(self.Instance[Event], Callback, Name)
  338. end
  339.  
  340. Instances.Tween = function(self, Info, Goal)
  341. if not self.Instance then
  342. return
  343. end
  344.  
  345. return Tween:Create(self, Info, Goal)
  346. end
  347.  
  348. Instances.Disconnect = function(self, Name)
  349. if not self.Instance then
  350. return
  351. end
  352.  
  353. return Library:Disconnect(Name)
  354. end
  355.  
  356. Instances.Clean = function(self)
  357. if not self.Instance then
  358. return
  359. end
  360.  
  361. self.Instance:Destroy()
  362. self = nil
  363. end
  364.  
  365. Instances.MakeDraggable = function(self)
  366. if not self.Instance then
  367. return
  368. end
  369.  
  370. local Gui = self.Instance
  371.  
  372. local Dragging = false
  373. local DragStart
  374. local StartPosition
  375.  
  376. local Set = function(Input)
  377. local DragDelta = Input.Position - DragStart
  378. self:Tween(TweenInfo.new(0.16, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(StartPosition.X.Scale, StartPosition.X.Offset + DragDelta.X, StartPosition.Y.Scale, StartPosition.Y.Offset + DragDelta.Y)})
  379. end
  380.  
  381. local InputChanged
  382.  
  383. self:Connect("InputBegan", function(Input)
  384. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  385. Dragging = true
  386.  
  387. DragStart = Input.Position
  388. StartPosition = Gui.Position
  389.  
  390. if InputChanged then
  391. return
  392. end
  393.  
  394. InputChanged = Input.Changed:Connect(function()
  395. if Input.UserInputState == Enum.UserInputState.End then
  396. Dragging = false
  397.  
  398. InputChanged:Disconnect()
  399. InputChanged = nil
  400. end
  401. end)
  402. end
  403. end)
  404.  
  405. Library:Connect(UserInputService.InputChanged, function(Input)
  406. if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then
  407. if Dragging then
  408. Set(Input)
  409. end
  410. end
  411. end)
  412.  
  413. return Dragging
  414. end
  415.  
  416. Instances.MakeResizeable = function(self, Minimum, Maximum)
  417. if not self.Instance then
  418. return
  419. end
  420.  
  421. local Gui = self.Instance
  422.  
  423. local Resizing = false
  424. local Start = UDim2New()
  425. local Delta = UDim2New()
  426. local ResizeMax = Gui.Parent.AbsoluteSize - Gui.AbsoluteSize
  427.  
  428. local ResizeButton = Instances:Create("ImageButton", {
  429. Parent = Gui,
  430. Image = "rbxassetid://",
  431. AnchorPoint = Vector2New(1, 1),
  432. BorderColor3 = FromRGB(0, 0, 0),
  433. Size = UDim2New(0, 8, 0, 8),
  434. Position = UDim2New(1, -4, 1, -4),
  435. Name = "\0",
  436. BorderSizePixel = 0,
  437. BackgroundTransparency = 1,
  438. ZIndex = 5,
  439. AutoButtonColor = false,
  440. Visible = true,
  441. }) ResizeButton:AddToTheme({ImageColor3 = "Accent"})
  442.  
  443. local InputChanged
  444.  
  445. ResizeButton:Connect("InputBegan", function(Input)
  446. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  447.  
  448. Resizing = true
  449.  
  450. Start = Gui.Size - UDim2New(0, Input.Position.X, 0, Input.Position.Y)
  451.  
  452. if InputChanged then
  453. return
  454. end
  455.  
  456. InputChanged = Input.Changed:Connect(function()
  457. if Input.UserInputState == Enum.UserInputState.End then
  458. Resizing = false
  459.  
  460. InputChanged:Disconnect()
  461. InputChanged = nil
  462. end
  463. end)
  464. end
  465. end)
  466.  
  467. Library:Connect(UserInputService.InputChanged, function(Input)
  468. if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then
  469. if Resizing then
  470. ResizeMax = Maximum or Gui.Parent.AbsoluteSize - Gui.AbsoluteSize
  471.  
  472. Delta = Start + UDim2New(0, Input.Position.X, 0, Input.Position.Y)
  473. Delta = UDim2New(0, math.clamp(Delta.X.Offset, Minimum.X, ResizeMax.X), 0, math.clamp(Delta.Y.Offset, Minimum.Y, ResizeMax.Y))
  474.  
  475. Tween:Create(Gui, TweenInfo.new(0.17, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = Delta}, true)
  476. end
  477. end
  478. end)
  479.  
  480. return Resizing
  481. end
  482.  
  483. Instances.OnHover = function(self, Function)
  484. if not self.Instance then
  485. return
  486. end
  487.  
  488. return Library:Connect(self.Instance.MouseEnter, Function)
  489. end
  490.  
  491. Instances.OnHoverLeave = function(self, Function)
  492. if not self.Instance then
  493. return
  494. end
  495.  
  496. return Library:Connect(self.Instance.MouseLeave, Function)
  497. end
  498. end
  499.  
  500. -- Custom font
  501. local CustomFont = { } do
  502. function CustomFont:New(Name, Weight, Style, Data)
  503. if not isfile(Data.Id) then
  504. writefile(Data.Id, game:HttpGet(Data.Url))
  505. end
  506.  
  507. local Data = {
  508. name = Name,
  509. faces = {
  510. {
  511. name = Name,
  512. weight = Weight,
  513. style = Style,
  514. assetId = getcustomasset(Data.Id)
  515. }
  516. }
  517. }
  518.  
  519. writefile(`{Library.Folders.Fonts}/{Name}.font`, HttpService:JSONEncode(Data))
  520. return Font.new(getcustomasset(`{Library.Folders.Fonts}/{Name}.font`), Enum.FontWeight.Regular, Enum.FontStyle.Normal)
  521. end
  522.  
  523. Library.Font = CustomFont:New("InterSemiBold", "Regular", "Normal", {
  524. Id = "Inter",
  525. Url = "https://github.com/sametexe001/luas/raw/refs/heads/main/fonts/InterSemibold.ttf"
  526. })
  527. end
  528.  
  529. Library.Holder = Instances:Create("ScreenGui", {
  530. Parent = gethui(),
  531. Name = "\0",
  532. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  533. DisplayOrder = 2,
  534. ResetOnSpawn = false
  535. })
  536.  
  537. Library.UnusedHolder = Instances:Create("ScreenGui", {
  538. Parent = gethui(),
  539. Name = "\0",
  540. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  541. Enabled = false,
  542. ResetOnSpawn = false
  543. })
  544.  
  545. Library.NotifHolder = Instances:Create("Frame", {
  546. Parent = Library.Holder.Instance,
  547. Name = "\0",
  548. BackgroundTransparency = 1,
  549. Size = UDim2New(0, 0, 1, 0),
  550. BorderColor3 = FromRGB(0, 0, 0),
  551. BorderSizePixel = 0,
  552. AutomaticSize = Enum.AutomaticSize.X,
  553. BackgroundColor3 = FromRGB(255, 255, 255)
  554. })
  555.  
  556. Instances:Create("UIListLayout", {
  557. Parent = Library.NotifHolder.Instance,
  558. Name = "\0",
  559. Padding = UDimNew(0, 12),
  560. SortOrder = Enum.SortOrder.LayoutOrder
  561. })
  562.  
  563. Instances:Create("UIPadding", {
  564. Parent = Library.NotifHolder.Instance,
  565. Name = "\0",
  566. PaddingTop = UDimNew(0, 12),
  567. PaddingBottom = UDimNew(0, 12),
  568. PaddingRight = UDimNew(0, 12),
  569. PaddingLeft = UDimNew(0, 12)
  570. })
  571.  
  572. Library.Unload = function(self)
  573. for Index, Value in self.Connections do
  574. Value.Connection:Disconnect()
  575. end
  576.  
  577. for Index, Value in self.Threads do
  578. coroutine.close(Value)
  579. end
  580.  
  581. if self.Holder then
  582. self.Holder:Clean()
  583. end
  584.  
  585. Library = nil
  586. getgenv().Library = nil
  587. end
  588.  
  589. Library.GetImage = function(self, Image)
  590. local ImageData = self.Images[Image]
  591.  
  592. if not ImageData then
  593. return
  594. end
  595.  
  596. return getcustomasset(self.Folders.Assets .. "/" .. ImageData[1])
  597. end
  598.  
  599. Library.Round = function(self, Number, Float)
  600. local Multiplier = 1 / (Float or 1)
  601. return MathFloor(Number * Multiplier) / Multiplier
  602. end
  603.  
  604. Library.Thread = function(self, Function)
  605. local NewThread = coroutine.create(Function)
  606.  
  607. coroutine.wrap(function()
  608. coroutine.resume(NewThread)
  609. end)()
  610.  
  611. TableInsert(self.Threads, NewThread)
  612. return NewThread
  613. end
  614.  
  615. Library.SafeCall = function(self, Function, ...)
  616. local Arguements = { ... }
  617. local Success, Result = pcall(Function, TableUnpack(Arguements))
  618.  
  619. if not Success then
  620. warn(Result)
  621. return false
  622. end
  623.  
  624. return Success
  625. end
  626.  
  627. Library.Connect = function(self, Event, Callback, Name)
  628. Name = Name or StringFormat("connection_number_%s_%s", self.UnnamedConnections + 1, HttpService:GenerateGUID(false))
  629.  
  630. local NewConnection = {
  631. Event = Event,
  632. Callback = Callback,
  633. Name = Name,
  634. Connection = nil
  635. }
  636.  
  637. Library:Thread(function()
  638. NewConnection.Connection = Event:Connect(Callback)
  639. end)
  640.  
  641. TableInsert(self.Connections, NewConnection)
  642. return NewConnection
  643. end
  644.  
  645. Library.Disconnect = function(self, Name)
  646. for _, Connection in self.Connections do
  647. if Connection.Name == Name then
  648. Connection.Connection:Disconnect()
  649. break
  650. end
  651. end
  652. end
  653.  
  654. Library.NextFlag = function(self)
  655. local FlagNumber = self.UnnamedFlags + 1
  656. return StringFormat("flag_number_%s_%s", FlagNumber, HttpService:GenerateGUID(false))
  657. end
  658.  
  659. Library.AddToTheme = function(self, Item, Properties)
  660. Item = Item.Instance or Item
  661.  
  662. local ThemeData = {
  663. Item = Item,
  664. Properties = Properties,
  665. }
  666.  
  667. for Property, Value in ThemeData.Properties do
  668. if type(Value) == "string" then
  669. Item[Property] = self.Theme[Value]
  670. else
  671. Item[Property] = Value()
  672. end
  673. end
  674.  
  675. TableInsert(self.ThemeItems, ThemeData)
  676. self.ThemeMap[Item] = ThemeData
  677. end
  678.  
  679. Library.ToRich = function(self, Text, Color)
  680. return `<font color="rgb({MathFloor(Color.R * 255)}, {MathFloor(Color.G * 255)}, {MathFloor(Color.B * 255)})">{Text}</font>`
  681. end
  682.  
  683. Library.GetConfig = function(self)
  684. local Config = { }
  685.  
  686. local Success, Result = Library:SafeCall(function()
  687. for Index, Value in Library.Flags do
  688. if type(Value) == "table" and Value.Key then
  689. Config[Index] = {Key = tostring(Value.Key), Mode = Value.Mode}
  690. elseif type(Value) == "table" and Value.Color then
  691. Config[Index] = {Color = "#" .. Value.HexValue, Alpha = Value.Alpha}
  692. else
  693. Config[Index] = Value
  694. end
  695. end
  696. end)
  697.  
  698. return HttpService:JSONEncode(Config)
  699. end
  700.  
  701. Library.LoadConfig = function(self, Config)
  702. local Decoded = HttpService:JSONDecode(Config)
  703.  
  704. local Success, Result = Library:SafeCall(function()
  705. for Index, Value in Decoded do
  706. local SetFunction = Library.SetFlags[Index]
  707.  
  708. if not SetFunction then
  709. continue
  710. end
  711.  
  712. if type(Value) == "table" and Value.Key then
  713. SetFunction(Value)
  714. elseif type(Value) == "table" and Value.Color then
  715. SetFunction(Value.Color, Value.Alpha)
  716. else
  717. SetFunction(Value)
  718. end
  719. end
  720. end)
  721.  
  722. return Success, Result
  723. end
  724.  
  725. Library.DeleteConfig = function(self, Config)
  726. if isfile(Library.Folders.Configs .. "/" .. Config) then
  727. delfile(Library.Folders.Configs .. "/" .. Config)
  728. end
  729. end
  730.  
  731. Library.RefreshConfigsList = function(self, Elements)
  732. local List = { "None" }
  733.  
  734. for _, Value in listfiles(Library.Folders.Configs) do
  735. local FileName = string.match(Value, "[^\\/]+$")
  736. table.insert(List, FileName)
  737. end
  738.  
  739. for _, Element in Elements do
  740. Element:Refresh(List)
  741. end
  742. end
  743.  
  744. Library.ChangeItemTheme = function(self, Item, Properties)
  745. Item = Item.Instance or Item
  746.  
  747. if not self.ThemeMap[Item] then
  748. return
  749. end
  750.  
  751. self.ThemeMap[Item].Properties = Properties
  752. self.ThemeMap[Item] = self.ThemeMap[Item]
  753. end
  754.  
  755. Library.ChangeTheme = function(self, Theme, Color)
  756. self.Theme[Theme] = Color
  757.  
  758. for _, Item in self.ThemeItems do
  759. for Property, Value in Item.Properties do
  760. if type(Value) == "string" and Value == Theme then
  761. Item.Item[Property] = Color
  762. elseif type(Value) == "function" then
  763. Item.Item[Property] = Value()
  764. end
  765. end
  766. end
  767. end
  768.  
  769. Library.IsMouseOverFrame = function(self, Frame)
  770. Frame = Frame.Instance
  771.  
  772. local MousePosition = Vector2New(Mouse.X, Mouse.Y)
  773.  
  774. return MousePosition.X >= Frame.AbsolutePosition.X and MousePosition.X <= Frame.AbsolutePosition.X + Frame.AbsoluteSize.X
  775. and MousePosition.Y >= Frame.AbsolutePosition.Y and MousePosition.Y <= Frame.AbsolutePosition.Y + Frame.AbsoluteSize.Y
  776. end
  777.  
  778. Library.Lerp = function(self, Start, Finish, Time)
  779. return Start + (Finish - Start) * Time
  780. end
  781.  
  782. Library.CompareVectors = function(self, PointA, PointB)
  783. return (PointA.X < PointB.X) or (PointA.Y < PointB.Y)
  784. end
  785.  
  786. Library.IsClipped = function(self, Object, Column)
  787. local Parent = Column
  788.  
  789. local BoundryTop = Parent.AbsolutePosition
  790. local BoundryBottom = BoundryTop + Parent.AbsoluteSize
  791.  
  792. local Top = Object.AbsolutePosition
  793. local Bottom = Top + Object.AbsoluteSize
  794.  
  795. return Library:CompareVectors(Top, BoundryTop) or Library:CompareVectors(BoundryBottom, Bottom)
  796. end
  797.  
  798. do
  799. Library.CreateColorpicker = function(self, Data)
  800. local Colorpicker = {
  801. Hue = 0,
  802. Saturation = 0,
  803. Value = 0,
  804.  
  805. Color = FromRGB(0, 0, 0),
  806. HexValue = "000000",
  807.  
  808. Flag = Data.Flag,
  809.  
  810. IsOpen = false
  811. }
  812.  
  813. local Items = { } do
  814. Items["ColorpickerButton"] = Instances:Create("TextButton", {
  815. Parent = Data.Parent.Instance,
  816. Name = "\0",
  817. FontFace = Library.Font,
  818. TextColor3 = FromRGB(0, 0, 0),
  819. BorderColor3 = FromRGB(0, 0, 0),
  820. Text = "",
  821. AutoButtonColor = false,
  822. Size = UDim2New(0, 14, 0, 14),
  823. BorderSizePixel = 0,
  824. TextSize = 14,
  825. BackgroundColor3 = FromRGB(164, 229, 255)
  826. })
  827.  
  828. Instances:Create("UIStroke", {
  829. Parent = Items["ColorpickerButton"].Instance,
  830. Name = "\0",
  831. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  832. Color = FromRGB(56, 62, 62),
  833. Thickness = 1.5
  834. }):AddToTheme({Color = "Border 2"})
  835.  
  836. Instances:Create("UICorner", {
  837. Parent = Items["ColorpickerButton"].Instance,
  838. Name = "\0",
  839. CornerRadius = UDimNew(0, 4)
  840. })
  841.  
  842. Items["ColorpickerWindow"] = Instances:Create("Frame", {
  843. Parent = Library.UnusedHolder.Instance,
  844. Name = "\0",
  845. Visible = false,
  846. Position = UDim2New(0, 115, 0, 102),
  847. BorderColor3 = FromRGB(0, 0, 0),
  848. Size = UDim2New(0, 200, 0, 220),
  849. BorderSizePixel = 0,
  850. BackgroundColor3 = FromRGB(16, 18, 18)
  851. }) Items["ColorpickerWindow"]:AddToTheme({BackgroundColor3 = "Background"})
  852.  
  853. Instances:Create("UICorner", {
  854. Parent = Items["ColorpickerWindow"].Instance,
  855. Name = "\0",
  856. CornerRadius = UDimNew(0, 7)
  857. })
  858.  
  859. Items["Inline"] = Instances:Create("Frame", {
  860. Parent = Items["ColorpickerWindow"].Instance,
  861. Name = "\0",
  862. Position = UDim2New(0, 6, 0, 6),
  863. BorderColor3 = FromRGB(0, 0, 0),
  864. Size = UDim2New(1, -12, 1, -12),
  865. BorderSizePixel = 0,
  866. BackgroundColor3 = FromRGB(21, 24, 24)
  867. }) Items["Inline"]:AddToTheme({BackgroundColor3 = "Inline"})
  868.  
  869. Instances:Create("UIStroke", {
  870. Parent = Items["Inline"].Instance,
  871. Name = "\0",
  872. Color = FromRGB(30, 33, 33),
  873. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  874. }):AddToTheme({Color = "Border"})
  875.  
  876. Instances:Create("UICorner", {
  877. Parent = Items["Inline"].Instance,
  878. Name = "\0",
  879. CornerRadius = UDimNew(0, 7)
  880. })
  881.  
  882. Items["Palette"] = Instances:Create("TextButton", {
  883. Parent = Items["Inline"].Instance,
  884. Name = "\0",
  885. FontFace = Library.Font,
  886. TextColor3 = FromRGB(0, 0, 0),
  887. BorderColor3 = FromRGB(0, 0, 0),
  888. Text = "-,",
  889. AutoButtonColor = false,
  890. Position = UDim2New(0, 6, 0, 6),
  891. Size = UDim2New(1, -12, 1, -45),
  892. BorderSizePixel = 0,
  893. TextSize = 14,
  894. BackgroundColor3 = FromRGB(164, 229, 255)
  895. })
  896.  
  897. Instances:Create("UICorner", {
  898. Parent = Items["Palette"].Instance,
  899. Name = "\0",
  900. CornerRadius = UDimNew(0, 7)
  901. })
  902.  
  903. Instances:Create("UIStroke", {
  904. Parent = Items["Palette"].Instance,
  905. Name = "\0",
  906. Color = FromRGB(30, 33, 33),
  907. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  908. }):AddToTheme({Color = "Border"})
  909.  
  910. Items["Saturation"] = Instances:Create("ImageLabel", {
  911. Parent = Items["Palette"].Instance,
  912. Name = "\0",
  913. BorderColor3 = FromRGB(0, 0, 0),
  914. Image = "rbxassetid://130624743341203",
  915. BackgroundTransparency = 1,
  916. Size = UDim2New(1, 0, 1, 0),
  917. ZIndex = 2,
  918. BorderSizePixel = 0,
  919. BackgroundColor3 = FromRGB(255, 255, 255)
  920. })
  921.  
  922. Instances:Create("UICorner", {
  923. Parent = Items["Saturation"].Instance,
  924. Name = "\0",
  925. CornerRadius = UDimNew(0, 7)
  926. })
  927.  
  928. Items["Value"] = Instances:Create("ImageLabel", {
  929. Parent = Items["Palette"].Instance,
  930. Name = "\0",
  931. BorderColor3 = FromRGB(0, 0, 0),
  932. Size = UDim2New(1, 2, 1, 0),
  933. Image = "rbxassetid://96192970265863",
  934. BackgroundTransparency = 1,
  935. Position = UDim2New(0, -1, 0, 0),
  936. ZIndex = 3,
  937. BorderSizePixel = 0,
  938. BackgroundColor3 = FromRGB(255, 255, 255)
  939. })
  940.  
  941. Instances:Create("UICorner", {
  942. Parent = Items["Value"].Instance,
  943. Name = "\0",
  944. CornerRadius = UDimNew(0, 7)
  945. })
  946.  
  947. Items["PaletteDragger"] = Instances:Create("Frame", {
  948. Parent = Items["Palette"].Instance,
  949. Name = "\0",
  950. Size = UDim2New(0, 5, 0, 5),
  951. Position = UDim2New(0, 5, 0, 5),
  952. BorderColor3 = FromRGB(0, 0, 0),
  953. ZIndex = 3,
  954. BorderSizePixel = 0,
  955. BackgroundColor3 = FromRGB(255, 255, 255)
  956. })
  957.  
  958. Instances:Create("UICorner", {
  959. Parent = Items["PaletteDragger"].Instance,
  960. Name = "\0",
  961. CornerRadius = UDimNew(1, 0)
  962. })
  963.  
  964. Instances:Create("UIStroke", {
  965. Parent = Items["PaletteDragger"].Instance,
  966. Name = "\0",
  967. Color = FromRGB(120, 120, 120),
  968. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  969. Thickness = 1.5
  970. })
  971.  
  972. Items["Hue"] = Instances:Create("TextButton", {
  973. Parent = Items["Inline"].Instance,
  974. Name = "\0",
  975. FontFace = Library.Font,
  976. TextColor3 = FromRGB(0, 0, 0),
  977. BorderColor3 = FromRGB(0, 0, 0),
  978. Text = "",
  979. AutoButtonColor = false,
  980. AnchorPoint = Vector2New(0, 1),
  981. Position = UDim2New(0, 6, 1, -6),
  982. Size = UDim2New(1, -12, 0, 22),
  983. BorderSizePixel = 0,
  984. TextSize = 14,
  985. BackgroundColor3 = FromRGB(255, 255, 255)
  986. })
  987.  
  988. Instances:Create("UICorner", {
  989. Parent = Items["Hue"].Instance,
  990. Name = "\0",
  991. CornerRadius = UDimNew(0, 7)
  992. })
  993.  
  994. Instances:Create("UIStroke", {
  995. Parent = Items["Hue"].Instance,
  996. Name = "\0",
  997. Color = FromRGB(30, 33, 33),
  998. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  999. }):AddToTheme({Color = "Border"})
  1000.  
  1001. Instances:Create("UIGradient", {
  1002. Parent = Items["Hue"].Instance,
  1003. Name = "\0",
  1004. Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(255, 0, 0)), RGBSequenceKeypoint(0.17, FromRGB(255, 255, 0)), RGBSequenceKeypoint(0.33, FromRGB(0, 255, 0)), RGBSequenceKeypoint(0.5, FromRGB(0, 255, 255)), RGBSequenceKeypoint(0.67, FromRGB(0, 0, 255)), RGBSequenceKeypoint(0.83, FromRGB(255, 0, 255)), RGBSequenceKeypoint(1, FromRGB(255, 0, 0))}
  1005. })
  1006.  
  1007. Items["HueDragger"] = Instances:Create("Frame", {
  1008. Parent = Items["Hue"].Instance,
  1009. Name = "\0",
  1010. BorderColor3 = FromRGB(0, 0, 0),
  1011. Size = UDim2New(0, 3, 1, 0),
  1012. BorderSizePixel = 0,
  1013. BackgroundColor3 = FromRGB(255, 255, 255)
  1014. })
  1015.  
  1016. Instances:Create("UIStroke", {
  1017. Parent = Items["HueDragger"].Instance,
  1018. Name = "\0",
  1019. Color = FromRGB(30, 33, 33),
  1020. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1021. }):AddToTheme({Color = "Border"})
  1022. end
  1023.  
  1024. local Debounce = false
  1025. local RenderStepped
  1026.  
  1027. function Colorpicker:Get()
  1028. return Colorpicker.Color
  1029. end
  1030.  
  1031. function Colorpicker:SetVisibility(Bool)
  1032. Items["ColorpickerButton"].Instance.Visible = Bool
  1033. end
  1034.  
  1035. function Colorpicker:SetOpen(Bool)
  1036. if Debounce then
  1037. return
  1038. end
  1039.  
  1040. Colorpicker.IsOpen = Bool
  1041.  
  1042. Debounce = true
  1043.  
  1044. if Colorpicker.IsOpen then
  1045. Items["ColorpickerWindow"].Instance.Visible = true
  1046. Items["ColorpickerWindow"].Instance.Parent = Library.Holder.Instance
  1047.  
  1048. RenderStepped = RunService.RenderStepped:Connect(function()
  1049. Items["ColorpickerWindow"].Instance.Position = UDim2New(0, Items["ColorpickerButton"].Instance.AbsolutePosition.X + 18, 0, Items["ColorpickerButton"].Instance.AbsolutePosition.Y - 25)
  1050. end)
  1051.  
  1052. for Index, Value in Library.OpenFrames do
  1053. if not Data.Section.IsSettings then
  1054. Value:SetOpen(false)
  1055. end
  1056. end
  1057.  
  1058. Library.OpenFrames[Colorpicker] = Colorpicker
  1059. else
  1060. if Library.OpenFrames[Colorpicker] then
  1061. Library.OpenFrames[Colorpicker] = nil
  1062. end
  1063.  
  1064. if RenderStepped then
  1065. RenderStepped:Disconnect()
  1066. RenderStepped = nil
  1067. end
  1068. end
  1069.  
  1070. local Descendants = Items["ColorpickerWindow"].Instance:GetDescendants()
  1071. TableInsert(Descendants, Items["ColorpickerWindow"].Instance)
  1072.  
  1073. local NewTween
  1074.  
  1075. for Index, Value in Descendants do
  1076. local TransparencyProperty = Tween:GetProperty(Value)
  1077.  
  1078. if not TransparencyProperty then
  1079. continue
  1080. end
  1081.  
  1082. if not Value.ClassName:find("UI") then
  1083. Value.ZIndex = Colorpicker.IsOpen and 4 or 1
  1084. end
  1085.  
  1086. if type(TransparencyProperty) == "table" then
  1087. for _, Property in TransparencyProperty do
  1088. NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed)
  1089. end
  1090. else
  1091. NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed)
  1092. end
  1093. end
  1094.  
  1095. NewTween.Tween.Completed:Connect(function()
  1096. Debounce = false
  1097. Items["ColorpickerWindow"].Instance.Visible = Colorpicker.IsOpen
  1098. task.wait(0.2)
  1099. Items["ColorpickerWindow"].Instance.Parent = not Colorpicker.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
  1100. end)
  1101. end
  1102.  
  1103. function Colorpicker:Update()
  1104. local Hue, Saturation, Value = Colorpicker.Hue, Colorpicker.Saturation, Colorpicker.Value
  1105. Colorpicker.Color = FromHSV(Hue, Saturation, Value)
  1106. Colorpicker.HexValue = Colorpicker.Color:ToHex()
  1107.  
  1108. Library.Flags[Colorpicker.Flag] = {
  1109. Color = Colorpicker.Color,
  1110. HexValue = Colorpicker.HexValue,
  1111. }
  1112.  
  1113. Items["ColorpickerButton"]:Tween(nil, {BackgroundColor3 = Colorpicker.Color})
  1114. Items["Palette"]:Tween(nil, {BackgroundColor3 = FromHSV(Hue, 1, 1)})
  1115.  
  1116. if Data.Callback then
  1117. Library:SafeCall(Data.Callback, Colorpicker.Color, Colorpicker.Alpha)
  1118. end
  1119. end
  1120.  
  1121. local SlidingPalette = false
  1122. local PaletteChanged
  1123.  
  1124. function Colorpicker:SlidePalette(Input)
  1125. if not Input or not SlidingPalette then
  1126. return
  1127. end
  1128.  
  1129. local InputPosition = Input.Position
  1130. local AbsolutePosition = Items["Palette"].Instance.AbsolutePosition
  1131. local AbsoluteSize = Items["Palette"].Instance.AbsoluteSize
  1132.  
  1133. local ValueX = MathClamp((InputPosition.X - AbsolutePosition.X) / AbsoluteSize.X, 0, 1)
  1134. local ValueY = MathClamp((InputPosition.Y - AbsolutePosition.Y) / AbsoluteSize.Y, 0, 1)
  1135.  
  1136. Colorpicker.Saturation = ValueX
  1137. Colorpicker.Value = 1 - ValueY
  1138.  
  1139. local SlideX = MathClamp((InputPosition.X - AbsolutePosition.X) / AbsoluteSize.X, 0, 0.98)
  1140. local SlideY = MathClamp((InputPosition.Y - AbsolutePosition.Y) / AbsoluteSize.Y, 0, 0.98)
  1141.  
  1142. Items["PaletteDragger"]:Tween(TweenInfo.new(0.1, Enum.EasingStyle.Linear), {Position = UDim2New(SlideX, 0, SlideY, 0)})
  1143. Colorpicker:Update()
  1144. end
  1145.  
  1146. local SlidingHue = false
  1147. local HueChanged
  1148.  
  1149. function Colorpicker:SlideHue(Input)
  1150. if not Input or not SlidingHue then
  1151. return
  1152. end
  1153.  
  1154. local InputPosition = Input.Position
  1155. local AbsolutePosition = Items["Hue"].Instance.AbsolutePosition
  1156. local AbsoluteSize = Items["Hue"].Instance.AbsoluteSize
  1157.  
  1158. local ValueX = MathClamp((InputPosition.X - AbsolutePosition.X) / AbsoluteSize.X, 0, 1)
  1159.  
  1160. Colorpicker.Hue = ValueX
  1161.  
  1162. local SlideX = MathClamp((InputPosition.X - AbsolutePosition.X) / AbsoluteSize.X, 0, 0.995)
  1163.  
  1164. Items["HueDragger"]:Tween(TweenInfo.new(0.1, Enum.EasingStyle.Linear), {Position = UDim2New(SlideX, 0, 0, 0)})
  1165. Colorpicker:Update()
  1166. end
  1167.  
  1168. function Colorpicker:Set(Color, Alpha)
  1169. if type(Color) == "table" then
  1170. Color = FromRGB(Color[1], Color[2], Color[3])
  1171. Alpha = Color[4]
  1172. elseif type(Color) == "string" then
  1173. Color = FromHex(Color)
  1174. end
  1175.  
  1176. Colorpicker.Hue, Colorpicker.Saturation, Colorpicker.Value = Color:ToHSV()
  1177. Colorpicker.Alpha = Alpha or 0
  1178.  
  1179. local PaletteValueX = MathClamp(Colorpicker.Saturation, 0, 0.98)
  1180. local PaletteValueY = MathClamp(1 - Colorpicker.Value, 0, 0.98)
  1181.  
  1182. local HuePositionX = MathClamp(Colorpicker.Hue, 0, 0.99)
  1183.  
  1184. Items["PaletteDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(PaletteValueX, 0, PaletteValueY, 0)})
  1185. Items["HueDragger"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2New(HuePositionX, 0, 0, 0)})
  1186. Colorpicker:Update()
  1187. end
  1188.  
  1189. Items["ColorpickerButton"]:Connect("MouseButton1Down", function()
  1190. Colorpicker:SetOpen(not Colorpicker.IsOpen)
  1191. end)
  1192.  
  1193. Items["ColorpickerButton"]:Connect("TouchTap", function()
  1194. Colorpicker:SetOpen(not Colorpicker.IsOpen)
  1195. end)
  1196.  
  1197. local function OnPaletteInputBegan(Input)
  1198. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  1199. SlidingPalette = true
  1200. Colorpicker:SlidePalette(Input)
  1201.  
  1202. if PaletteChanged then
  1203. return
  1204. end
  1205.  
  1206. PaletteChanged = Input.Changed:Connect(function()
  1207. if Input.UserInputState == Enum.UserInputState.End then
  1208. SlidingPalette = false
  1209. PaletteChanged:Disconnect()
  1210. PaletteChanged = nil
  1211. end
  1212. end)
  1213. end
  1214. end
  1215.  
  1216. Items["Palette"]:Connect("InputBegan", OnPaletteInputBegan)
  1217.  
  1218. local function OnHueInputBegan(Input)
  1219. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  1220. SlidingHue = true
  1221. Colorpicker:SlideHue(Input)
  1222.  
  1223. if HueChanged then
  1224. return
  1225. end
  1226.  
  1227. HueChanged = Input.Changed:Connect(function()
  1228. if Input.UserInputState == Enum.UserInputState.End then
  1229. SlidingHue = false
  1230. HueChanged:Disconnect()
  1231. HueChanged = nil
  1232. end
  1233. end)
  1234. end
  1235. end
  1236.  
  1237. Items["Hue"]:Connect("InputBegan", OnHueInputBegan)
  1238.  
  1239. Library:Connect(UserInputService.InputBegan, function(Input)
  1240. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  1241. if Colorpicker.IsOpen then
  1242. if Library:IsMouseOverFrame(Items["ColorpickerWindow"]) then
  1243. return
  1244. end
  1245. Colorpicker:SetOpen(false)
  1246. end
  1247. end
  1248. end)
  1249.  
  1250. Library:Connect(UserInputService.InputChanged, function(Input)
  1251. if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then
  1252. if SlidingPalette then
  1253. Colorpicker:SlidePalette(Input)
  1254. end
  1255. if SlidingHue then
  1256. Colorpicker:SlideHue(Input)
  1257. end
  1258. end
  1259. end)
  1260.  
  1261. Items["ColorpickerButton"]:Connect("Changed", function(Property)
  1262. if Property == "AbsolutePosition" and Colorpicker.IsOpen then
  1263. Colorpicker.IsOpen = not Library:IsClipped(Items["ColorpickerButton"].Instance, Data.Section.Items["Section"].Instance.Parent)
  1264. Items["ColorpickerWindow"].Instance.Visible = Colorpicker.IsOpen
  1265. end
  1266. end)
  1267.  
  1268. if Data.Default then
  1269. Colorpicker:Set(Data.Default)
  1270. end
  1271.  
  1272. Library.SetFlags[Colorpicker.Flag] = function(Color, Alpha)
  1273. Colorpicker:Set(Color, Alpha)
  1274. end
  1275.  
  1276. return Colorpicker, Items
  1277. end
  1278.  
  1279. Library.CreateKeybind = function(self, Data)
  1280. local Keybind = {
  1281. Flag = Data.Flag,
  1282.  
  1283. Key = "",
  1284. Value = "",
  1285. Mode = "",
  1286. Toggled = false,
  1287.  
  1288. Picking = false,
  1289. IsOpen = false
  1290. }
  1291.  
  1292. local Items = { } do
  1293. Items["KeyButton"] = Instances:Create("TextButton", {
  1294. Parent = Data.Parent.Instance,
  1295. Name = "\0",
  1296. FontFace = Library.Font,
  1297. TextColor3 = FromRGB(100, 100, 100),
  1298. BorderColor3 = FromRGB(0, 0, 0),
  1299. Text = "-",
  1300. AutoButtonColor = false,
  1301. Size = UDim2New(0, 0, 1, 0),
  1302. BorderSizePixel = 0,
  1303. AutomaticSize = Enum.AutomaticSize.X,
  1304. TextSize = 12,
  1305. BackgroundColor3 = FromRGB(30, 34, 34)
  1306. }) Items["KeyButton"]:AddToTheme({BackgroundColor3 = "Element"})
  1307.  
  1308. Instances:Create("UICorner", {
  1309. Parent = Items["KeyButton"].Instance,
  1310. Name = "\0",
  1311. CornerRadius = UDimNew(0, 4)
  1312. })
  1313.  
  1314. Instances:Create("UIPadding", {
  1315. Parent = Items["KeyButton"].Instance,
  1316. Name = "\0",
  1317. PaddingRight = UDimNew(0, 4),
  1318. PaddingLeft = UDimNew(0, 5)
  1319. })
  1320.  
  1321. Items["KeybindWindow"] = Instances:Create("Frame", {
  1322. Parent = Library.UnusedHolder.Instance,
  1323. Name = "\0",
  1324. Visible = false,
  1325. Position = UDim2New(0, 231, 0, 102),
  1326. BorderColor3 = FromRGB(0, 0, 0),
  1327. Size = UDim2New(0, 67, 0, 92),
  1328. BorderSizePixel = 0,
  1329. BackgroundColor3 = FromRGB(16, 18, 18)
  1330. }) Items["KeybindWindow"]:AddToTheme({BackgroundColor3 = "Background"})
  1331.  
  1332. Instances:Create("UICorner", {
  1333. Parent = Items["KeybindWindow"].Instance,
  1334. Name = "\0",
  1335. CornerRadius = UDimNew(0, 7)
  1336. })
  1337.  
  1338. Items["Inline"] = Instances:Create("Frame", {
  1339. Parent = Items["KeybindWindow"].Instance,
  1340. Name = "\0",
  1341. Position = UDim2New(0, 6, 0, 6),
  1342. BorderColor3 = FromRGB(0, 0, 0),
  1343. Size = UDim2New(1, -12, 1, -12),
  1344. BorderSizePixel = 0,
  1345. BackgroundColor3 = FromRGB(21, 24, 24)
  1346. }) Items["Inline"]:AddToTheme({BackgroundColor3 = "Inline"})
  1347.  
  1348. Instances:Create("UIStroke", {
  1349. Parent = Items["Inline"].Instance,
  1350. Name = "\0",
  1351. Color = FromRGB(30, 33, 33),
  1352. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1353. }):AddToTheme({Color = "Border"})
  1354.  
  1355. Instances:Create("UICorner", {
  1356. Parent = Items["Inline"].Instance,
  1357. Name = "\0",
  1358. CornerRadius = UDimNew(0, 7)
  1359. })
  1360.  
  1361. Items["Toggle"] = Instances:Create("TextButton", {
  1362. Parent = Items["Inline"].Instance,
  1363. Name = "\0",
  1364. FontFace = Library.Font,
  1365. TextColor3 = FromRGB(255, 255, 255),
  1366. BorderColor3 = FromRGB(0, 0, 0),
  1367. Text = "Toggle",
  1368. AutoButtonColor = false,
  1369. BackgroundTransparency = 1,
  1370. Size = UDim2New(1, 0, 0, 20),
  1371. BorderSizePixel = 0,
  1372. TextSize = 14,
  1373. BackgroundColor3 = FromRGB(255, 255, 255)
  1374. })
  1375.  
  1376. Instances:Create("UIListLayout", {
  1377. Parent = Items["Inline"].Instance,
  1378. Name = "\0",
  1379. Padding = UDimNew(0, 5),
  1380. SortOrder = Enum.SortOrder.LayoutOrder
  1381. })
  1382.  
  1383. Instances:Create("UIPadding", {
  1384. Parent = Items["Inline"].Instance,
  1385. Name = "\0",
  1386. PaddingTop = UDimNew(0, 4)
  1387. })
  1388.  
  1389. Items["Hold"] = Instances:Create("TextButton", {
  1390. Parent = Items["Inline"].Instance,
  1391. Name = "\0",
  1392. FontFace = Library.Font,
  1393. TextColor3 = FromRGB(100, 100, 100),
  1394. BorderColor3 = FromRGB(0, 0, 0),
  1395. Text = "Hold",
  1396. AutoButtonColor = false,
  1397. BackgroundTransparency = 1,
  1398. Size = UDim2New(1, 0, 0, 20),
  1399. BorderSizePixel = 0,
  1400. TextSize = 14,
  1401. BackgroundColor3 = FromRGB(255, 255, 255)
  1402. })
  1403.  
  1404. Items["Always"] = Instances:Create("TextButton", {
  1405. Parent = Items["Inline"].Instance,
  1406. Name = "\0",
  1407. FontFace = Library.Font,
  1408. TextColor3 = FromRGB(100, 100, 100),
  1409. BorderColor3 = FromRGB(0, 0, 0),
  1410. Text = "Always",
  1411. AutoButtonColor = false,
  1412. BackgroundTransparency = 1,
  1413. Size = UDim2New(1, 0, 0, 20),
  1414. BorderSizePixel = 0,
  1415. TextSize = 14,
  1416. BackgroundColor3 = FromRGB(255, 255, 255)
  1417. })
  1418. end
  1419.  
  1420. local Modes = {
  1421. ["Always"] = Items["Always"],
  1422. ["Hold"] = Items["Hold"],
  1423. ["Toggle"] = Items["Toggle"]
  1424. }
  1425.  
  1426. local Debounce = false
  1427. local RenderStepped
  1428.  
  1429. function Keybind:SetOpen(Bool)
  1430. if Debounce then
  1431. return
  1432. end
  1433.  
  1434. Keybind.IsOpen = Bool
  1435.  
  1436. Debounce = true
  1437.  
  1438. if Keybind.IsOpen then
  1439. Items["KeybindWindow"].Instance.Visible = true
  1440. Items["KeybindWindow"].Instance.Parent = Library.Holder.Instance
  1441.  
  1442. RenderStepped = RunService.RenderStepped:Connect(function()
  1443. Items["KeybindWindow"].Instance.Position = UDim2New(0, Items["KeyButton"].Instance.AbsolutePosition.X + 18, 0, Items["KeyButton"].Instance.AbsolutePosition.Y - 25)
  1444. end)
  1445.  
  1446. for Index, Value in Library.OpenFrames do
  1447. if not Data.Section.IsSettings then
  1448. Value:SetOpen(false)
  1449. end
  1450. end
  1451.  
  1452. Library.OpenFrames[Keybind] = Keybind
  1453. else
  1454. if Library.OpenFrames[Keybind] then
  1455. Library.OpenFrames[Keybind] = nil
  1456. end
  1457.  
  1458. if RenderStepped then
  1459. RenderStepped:Disconnect()
  1460. RenderStepped = nil
  1461. end
  1462. end
  1463.  
  1464. local Descendants = Items["KeybindWindow"].Instance:GetDescendants()
  1465. TableInsert(Descendants, Items["KeybindWindow"].Instance)
  1466.  
  1467. local NewTween
  1468.  
  1469. for Index, Value in Descendants do
  1470. local TransparencyProperty = Tween:GetProperty(Value)
  1471.  
  1472. if not TransparencyProperty then
  1473. continue
  1474. end
  1475.  
  1476. if not Value.ClassName:find("UI") then
  1477. Value.ZIndex = Keybind.IsOpen and 2 or 1
  1478. end
  1479.  
  1480. if type(TransparencyProperty) == "table" then
  1481. for _, Property in TransparencyProperty do
  1482. NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed)
  1483. end
  1484. else
  1485. NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed)
  1486. end
  1487. end
  1488.  
  1489. NewTween.Tween.Completed:Connect(function()
  1490. Debounce = false
  1491. Items["KeybindWindow"].Instance.Visible = Keybind.IsOpen
  1492. task.wait(0.2)
  1493. Items["KeybindWindow"].Instance.Parent = not Keybind.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
  1494. end)
  1495. end
  1496.  
  1497. function Keybind:SetMode(Mode)
  1498. for Index, Value in Modes do
  1499. if Index == Mode then
  1500. Value:Tween(nil, {TextColor3 = FromRGB(255, 255, 255)})
  1501. else
  1502. Value:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
  1503. end
  1504. end
  1505.  
  1506. Library.Flags[Keybind.Flag] = {
  1507. Mode = Keybind.Mode,
  1508. Key = Keybind.Key,
  1509. Toggled = Keybind.Toggled
  1510. }
  1511.  
  1512. if Data.Callback then
  1513. Library:SafeCall(Data.Callback, Keybind.Toggled)
  1514. end
  1515. end
  1516.  
  1517. function Keybind:Get()
  1518. return Keybind.Key, Keybind.Mode, Keybind.Toggled
  1519. end
  1520.  
  1521. function Keybind:Set(Key)
  1522. if StringFind(tostring(Key), "Enum") then
  1523. Keybind.Key = tostring(Key)
  1524.  
  1525. Key = Key.Name == "Backspace" and "None" or Key.Name
  1526.  
  1527. local KeyString = Keys[Keybind.Key] or StringGSub(Key, "Enum.", "") or "None"
  1528. local TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None"
  1529.  
  1530. Keybind.Value = TextToDisplay
  1531. Items["KeyButton"].Instance.Text = TextToDisplay
  1532.  
  1533. Library.Flags[Keybind.Flag] = {
  1534. Mode = Keybind.Mode,
  1535. Key = Keybind.Key,
  1536. Toggled = Keybind.Toggled
  1537. }
  1538.  
  1539. if Data.Callback then
  1540. Library:SafeCall(Data.Callback, Keybind.Toggled)
  1541. end
  1542. elseif type(Key) == "table" then
  1543. local RealKey = Key.Key == "Backspace" and "None" or Key.Key
  1544. Keybind.Key = tostring(Key.Key)
  1545.  
  1546. if Key.Mode then
  1547. Keybind.Mode = Key.Mode
  1548. Keybind:SetMode(Key.Mode)
  1549. else
  1550. Keybind.Mode = "Toggle"
  1551. Keybind:SetMode("Toggle")
  1552. end
  1553.  
  1554. local KeyString = Keys[Keybind.Key] or StringGSub(tostring(RealKey), "Enum.", "") or RealKey
  1555. local TextToDisplay = KeyString and StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "") or "None"
  1556.  
  1557. TextToDisplay = StringGSub(StringGSub(KeyString, "KeyCode.", ""), "UserInputType.", "")
  1558.  
  1559. Keybind.Value = TextToDisplay
  1560. Items["KeyButton"].Instance.Text = TextToDisplay
  1561.  
  1562. if Data.Callback then
  1563. Library:SafeCall(Data.Callback, Keybind.Toggled)
  1564. end
  1565. elseif TableFind({"Toggle", "Hold", "Always"}, Key) then
  1566. Keybind.Mode = Key
  1567. Keybind:SetMode(Key)
  1568.  
  1569. if Data.Callback then
  1570. Library:SafeCall(Data.Callback, Keybind.Toggled)
  1571. end
  1572. end
  1573.  
  1574. Keybind.Picking = false
  1575. end
  1576.  
  1577. function Keybind:Press(Bool)
  1578. if Keybind.Mode == "Toggle" then
  1579. Keybind.Toggled = not Keybind.Toggled
  1580. elseif Keybind.Mode == "Hold" then
  1581. Keybind.Toggled = Bool
  1582. elseif Keybind.Mode == "Always" then
  1583. Keybind.Toggled = true
  1584. end
  1585.  
  1586. Library.Flags[Keybind.Flag] = {
  1587. Mode = Keybind.Mode,
  1588. Key = Keybind.Key,
  1589. Toggled = Keybind.Toggled
  1590. }
  1591.  
  1592. if Data.Callback then
  1593. Library:SafeCall(Data.Callback, Keybind.Toggled)
  1594. end
  1595. end
  1596.  
  1597. Items["KeyButton"]:Connect("MouseButton1Click", function()
  1598. Keybind.Picking = true
  1599.  
  1600. Items["KeyButton"].Instance.Text = "."
  1601. Library:Thread(function()
  1602. local Count = 1
  1603.  
  1604. while true do
  1605. if not Keybind.Picking then
  1606. break
  1607. end
  1608.  
  1609. if Count == 4 then
  1610. Count = 1
  1611. end
  1612.  
  1613. Items["KeyButton"].Instance.Text = Count == 1 and "." or Count == 2 and ".." or Count == 3 and "..."
  1614. Count += 1
  1615. task.wait(0.35)
  1616. end
  1617. end)
  1618.  
  1619. local InputBegan
  1620. InputBegan = UserInputService.InputBegan:Connect(function(Input)
  1621. if Input.UserInputType == Enum.UserInputType.Keyboard then
  1622. Keybind:Set(Input.KeyCode)
  1623. else
  1624. Keybind:Set(Input.UserInputType)
  1625. end
  1626.  
  1627. InputBegan:Disconnect()
  1628. InputBegan = nil
  1629. end)
  1630. end)
  1631.  
  1632. Items["KeyButton"]:Connect("MouseButton2Down", function()
  1633. Keybind:SetOpen(not Keybind.IsOpen)
  1634. end)
  1635.  
  1636. Items["KeyButton"]:Connect("Changed", function(Property)
  1637. if Property == "AbsolutePosition" and Keybind.IsOpen then
  1638. Keybind.IsOpen = not Library:IsClipped(Items["KeybindWindow"].Instance, Data.Section.Items["Section"].Instance.Parent)
  1639. Items["KeybindWindow"].Instance.Visible = Keybind.IsOpen
  1640. end
  1641. end)
  1642.  
  1643. Items["Toggle"]:Connect("MouseButton1Down", function()
  1644. Keybind.Mode = "Toggle"
  1645. Keybind:SetMode("Toggle")
  1646. end)
  1647.  
  1648. Items["Hold"]:Connect("MouseButton1Down", function()
  1649. Keybind.Mode = "Hold"
  1650. Keybind:SetMode("Hold")
  1651. end)
  1652.  
  1653. Items["Always"]:Connect("MouseButton1Down", function()
  1654. Keybind.Mode = "Always"
  1655. Keybind:SetMode("Always")
  1656. end)
  1657.  
  1658. Library:Connect(UserInputService.InputBegan, function(Input)
  1659. if Keybind.Value == "None" then
  1660. return
  1661. end
  1662.  
  1663. if tostring(Input.KeyCode) == Keybind.Key then
  1664. if Keybind.Mode == "Toggle" then
  1665. Keybind:Press()
  1666. elseif Keybind.Mode == "Hold" then
  1667. Keybind:Press(true)
  1668. elseif Keybind.Mode == "Always" then
  1669. Keybind:Press(true)
  1670. end
  1671. elseif tostring(Input.UserInputType) == Keybind.Key then
  1672. if Keybind.Mode == "Toggle" then
  1673. Keybind:Press()
  1674. elseif Keybind.Mode == "Hold" then
  1675. Keybind:Press(true)
  1676. elseif Keybind.Mode == "Always" then
  1677. Keybind:Press(true)
  1678. end
  1679. end
  1680.  
  1681. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1682. if not Keybind.IsOpen then
  1683. return
  1684. end
  1685.  
  1686. if Library:IsMouseOverFrame(Items["KeybindWindow"]) then
  1687. return
  1688. end
  1689.  
  1690. Keybind:SetOpen(false)
  1691. end
  1692. end)
  1693.  
  1694. Library:Connect(UserInputService.InputEnded, function(Input)
  1695. if Keybind.Value == "None" then
  1696. return
  1697. end
  1698.  
  1699. if tostring(Input.KeyCode) == Keybind.Key then
  1700. if Keybind.Mode == "Hold" then
  1701. Keybind:Press(false)
  1702. elseif Keybind.Mode == "Always" then
  1703. Keybind:Press(true)
  1704. end
  1705. elseif tostring(Input.UserInputType) == Keybind.Key then
  1706. if Keybind.Mode == "Hold" then
  1707. Keybind:Press(false)
  1708. elseif Keybind.Mode == "Always" then
  1709. Keybind:Press(true)
  1710. end
  1711. end
  1712. end)
  1713.  
  1714. if Data.Default then
  1715. Keybind:Set({
  1716. Mode = Data.Mode or "Toggle",
  1717. Key = Data.Default,
  1718. })
  1719. end
  1720.  
  1721. Library.SetFlags[Keybind.Flag] = function(Value)
  1722. Keybind:Set(Value)
  1723. end
  1724.  
  1725. return Keybind, Items
  1726. end
  1727.  
  1728. Library.Notification = function(self, Name, Duration, Icon)
  1729. local Items = { } do
  1730. Items["Notification"] = Instances:Create("Frame", {
  1731. Parent = Library.NotifHolder.Instance,
  1732. Name = "\0",
  1733. Size = UDim2New(0, 0, 0, 30),
  1734. BorderColor3 = FromRGB(0, 0, 0),
  1735. BorderSizePixel = 0,
  1736. AutomaticSize = Enum.AutomaticSize.X,
  1737. BackgroundColor3 = FromRGB(16, 18, 18)
  1738. }) Items["Notification"]:AddToTheme({BackgroundColor3 = "Background"})
  1739.  
  1740. Instances:Create("UICorner", {
  1741. Parent = Items["Notification"].Instance,
  1742. Name = "\0",
  1743. CornerRadius = UDimNew(0, 7)
  1744. })
  1745.  
  1746. Items["UIStroke"] = Instances:Create("UIStroke", {
  1747. Parent = Items["Notification"].Instance,
  1748. Name = "\0",
  1749. Color = FromRGB(30, 33, 33),
  1750. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1751. }) Items["UIStroke"]:AddToTheme({Color = "Border"})
  1752.  
  1753. Instances:Create("UIPadding", {
  1754. Parent = Items["Notification"].Instance,
  1755. Name = "\0",
  1756. PaddingRight = UDimNew(0, 8),
  1757. PaddingLeft = UDimNew(0, 8)
  1758. })
  1759.  
  1760. if Icon then
  1761. Items["Icon"] = Instances:Create("ImageLabel", {
  1762. Parent = Items["Notification"].Instance,
  1763. Name = "\0",
  1764. ImageColor3 = FromRGB(255, 255, 255),
  1765. BorderColor3 = FromRGB(0, 0, 0),
  1766. AnchorPoint = Vector2New(0, 0.5),
  1767. Image = "rbxassetid://"..Icon,
  1768. BackgroundTransparency = 1,
  1769. Position = UDim2New(0, 0, 0.5, 0),
  1770. Size = UDim2New(0, 16, 0, 16),
  1771. BorderSizePixel = 0,
  1772. BackgroundColor3 = FromRGB(255, 255, 255)
  1773. })
  1774. end
  1775.  
  1776. Items["Text"] = Instances:Create("TextLabel", {
  1777. Parent = Items["Notification"].Instance,
  1778. Name = "\0",
  1779. FontFace = Library.Font,
  1780. TextColor3 = FromRGB(255, 255, 255),
  1781. BorderColor3 = FromRGB(0, 0, 0),
  1782. Text = Name,
  1783. AnchorPoint = Vector2New(0, 0.5),
  1784. Size = UDim2New(0, 0, 0, 15),
  1785. BackgroundTransparency = 1,
  1786. Position = UDim2New(0, Icon and 24 or 0, 0.5, 0),
  1787. BorderSizePixel = 0,
  1788. AutomaticSize = Enum.AutomaticSize.X,
  1789. TextSize = 14,
  1790. BackgroundColor3 = FromRGB(255, 255, 255)
  1791. })
  1792. end
  1793.  
  1794. local Size = Items["Notification"].Instance.AbsoluteSize
  1795.  
  1796. for Index, Value in Items do
  1797. if Value.Instance:IsA("Frame") then
  1798. Value.Instance.BackgroundTransparency = 1
  1799. elseif Value.Instance:IsA("TextLabel") then
  1800. Value.Instance.TextTransparency = 1
  1801. elseif Value.Instance:IsA("ImageLabel") then
  1802. Value.Instance.ImageTransparency = 1
  1803. elseif Value.Instance:IsA("UIStroke") then
  1804. Value.Instance.Transparency = 1
  1805. end
  1806. end
  1807.  
  1808. task.wait(0.3)
  1809.  
  1810. Items["Notification"].Instance.AutomaticSize = Enum.AutomaticSize.Y
  1811.  
  1812. Library:Thread(function()
  1813. for Index, Value in Items do
  1814. if Value.Instance:IsA("Frame") then
  1815. Value:Tween(nil, {BackgroundTransparency = 0})
  1816. elseif Value.Instance:IsA("TextLabel") then
  1817. Value:Tween(nil, {TextTransparency = 0})
  1818. elseif Value.Instance:IsA("ImageLabel") then
  1819. Value:Tween(nil, {ImageTransparency = 0.5})
  1820. elseif Value.Instance:IsA("UIStroke") then
  1821. Value:Tween(nil, {Transparency = 0})
  1822. end
  1823. end
  1824.  
  1825. Items["Notification"]:Tween(nil, {Size = UDim2New(0, Size.X, 0, Size.Y)})
  1826.  
  1827. task.delay(Duration, function()
  1828. for Index, Value in Items do
  1829. if Value.Instance:IsA("Frame") then
  1830. Value:Tween(nil, {BackgroundTransparency = 1})
  1831. elseif Value.Instance:IsA("TextLabel") then
  1832. Value:Tween(nil, {TextTransparency = 1})
  1833. elseif Value.Instance:IsA("ImageLabel") then
  1834. Value:Tween(nil, {ImageTransparency = 1})
  1835. elseif Value.Instance:IsA("UIStroke") then
  1836. Value:Tween(nil, {Transparency = 1})
  1837. end
  1838. end
  1839.  
  1840. Items["Notification"]:Tween(nil, {Size = UDim2New(0, 0, 0, 0)})
  1841. task.wait(0.5)
  1842. Items["Notification"]:Clean()
  1843. end)
  1844. end)
  1845. end
  1846.  
  1847. Library.Window = function(self, Data)
  1848. local StartTime = tick()
  1849. Data = Data or { }
  1850.  
  1851. local Window = {
  1852. Name = Data.Name or Data.name or "Window",
  1853. SubTitle = Data.SubTitle or Data.subtitle,
  1854. ExpiresIn = Data.ExpiresIn or Data.expiresin or "23d",
  1855. Logo = Data.Logo or Data.logo or nil,
  1856. Size = Data.Size or Data.size or UDim2.fromOffset(568, 350),
  1857.  
  1858. Pages = { },
  1859. Items = { },
  1860. IsOpen = false
  1861. }
  1862.  
  1863. local Items = { } do
  1864. local FirstLetterOfName = StringSub(Window.Name, 1, 1)
  1865. Items["MainFrame"] = Instances:Create("Frame", {
  1866. Parent = Library.Holder.Instance,
  1867. Name = "\0",
  1868. AnchorPoint = Vector2New(0.5, 0.5),
  1869. Position = UDim2New(0.5, 0, 0.5, 0),
  1870. BorderColor3 = FromRGB(0, 0, 0),
  1871. Size = Window.Size,
  1872. BorderSizePixel = 0,
  1873. BackgroundColor3 = FromRGB(16, 18, 18)
  1874. }) Items["MainFrame"]:AddToTheme({BackgroundColor3 = "Background"})
  1875.  
  1876. Items["MainFrame"]:MakeDraggable()
  1877. Items["MainFrame"]:MakeResizeable(Vector2New(Items["MainFrame"].Instance.AbsoluteSize.X, Items["MainFrame"].Instance.AbsoluteSize.Y), Vector2New(9999, 9999))
  1878.  
  1879. Instances:Create("UICorner", {
  1880. Parent = Items["MainFrame"].Instance,
  1881. Name = "\0",
  1882. CornerRadius = UDimNew(0, 7)
  1883. })
  1884.  
  1885. Items["Side"] = Instances:Create("Frame", {
  1886. Parent = Items["MainFrame"].Instance,
  1887. Name = "\0",
  1888. BackgroundTransparency = 1,
  1889. BorderColor3 = FromRGB(0, 0, 0),
  1890. Size = UDim2New(0, 215, 1, 0),
  1891. BorderSizePixel = 0,
  1892. BackgroundColor3 = FromRGB(255, 255, 255)
  1893. })
  1894.  
  1895. Items["Title"] = Instances:Create("Frame", {
  1896. Parent = Items["Side"].Instance,
  1897. Name = "\0",
  1898. Position = UDim2New(0, 6, 0, 6),
  1899. BorderColor3 = FromRGB(0, 0, 0),
  1900. Size = UDim2New(1, -12, 0, 60),
  1901. BorderSizePixel = 0,
  1902. BackgroundColor3 = FromRGB(21, 24, 24)
  1903. }) Items["Title"]:AddToTheme({BackgroundColor3 = "Inline"})
  1904.  
  1905. Instances:Create("UICorner", {
  1906. Parent = Items["Title"].Instance,
  1907. Name = "\0",
  1908. CornerRadius = UDimNew(0, 7)
  1909. })
  1910.  
  1911. Instances:Create("UIStroke", {
  1912. Parent = Items["Title"].Instance,
  1913. Name = "\0",
  1914. Color = FromRGB(30, 33, 33),
  1915. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1916. }):AddToTheme({Color = "Border"})
  1917.  
  1918. Items["Background"] = Instances:Create("Frame", {
  1919. Parent = Items["Title"].Instance,
  1920. Name = "\0",
  1921. AnchorPoint = Vector2New(0, 0.5),
  1922. Position = UDim2New(0, 12, 0.5, 0),
  1923. BorderColor3 = FromRGB(0, 0, 0),
  1924. Size = UDim2New(0, 40, 0, 40),
  1925. BorderSizePixel = 0,
  1926. BackgroundColor3 = FromRGB(207, 207, 207)
  1927. })
  1928.  
  1929. Instances:Create("UICorner", {
  1930. Parent = Items["Background"].Instance,
  1931. Name = "\0",
  1932. CornerRadius = UDimNew(0, 7)
  1933. })
  1934.  
  1935. Instances:Create("UIStroke", {
  1936. Parent = Items["Background"].Instance,
  1937. Name = "\0",
  1938. Color = FromRGB(30, 33, 33),
  1939. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  1940. }):AddToTheme({Color = "Border"})
  1941.  
  1942. Items["Text"] = Instances:Create("TextLabel", {
  1943. Parent = Items["Background"].Instance,
  1944. Name = "\0",
  1945. FontFace = Library.Font,
  1946. TextColor3 = FromRGB(0, 0, 0),
  1947. BorderColor3 = FromRGB(0, 0, 0),
  1948. Text = FirstLetterOfName,
  1949. AnchorPoint = Vector2New(0.5, 0.5),
  1950. BackgroundTransparency = 1,
  1951. Position = UDim2New(0.5, 0, 0.5, 0),
  1952. Size = UDim2New(1, -10, 1, -10),
  1953. BorderSizePixel = 0,
  1954. TextSize = 22,
  1955. BackgroundColor3 = FromRGB(255, 255, 255)
  1956. })
  1957.  
  1958. if Window.Logo and Window.Logo ~= "" then
  1959. Items["LogoImage"] = Instances:Create("ImageLabel", {
  1960. Parent = Items["Background"].Instance,
  1961. Name = "\0",
  1962. AnchorPoint = Vector2New(0.5, 0.5),
  1963. Position = UDim2New(0.5, 0, 0.5, 0),
  1964. BorderColor3 = FromRGB(0, 0, 0),
  1965. Size = UDim2New(1, 0, 1, 0),
  1966. BorderSizePixel = 0,
  1967. Image = Window.Logo,
  1968. BackgroundTransparency = 1,
  1969. ScaleType = Enum.ScaleType.Fit,
  1970. ZIndex = 2
  1971. })
  1972.  
  1973. local LogoCorner = Instances:Create("UICorner", {
  1974. Parent = Items["LogoImage"].Instance,
  1975. Name = "\0",
  1976. CornerRadius = UDimNew(0, 7)
  1977. })
  1978.  
  1979. Items["Text"].Instance.Visible = false
  1980. end
  1981.  
  1982. Items["RealTitle"] = Instances:Create("TextLabel", {
  1983. Parent = Items["Title"].Instance,
  1984. Name = "\0",
  1985. FontFace = Library.Font,
  1986. TextColor3 = FromRGB(255, 255, 255),
  1987. BorderColor3 = FromRGB(0, 0, 0),
  1988. Text = Window.Name,
  1989. Size = UDim2New(0, 0, 0, 15),
  1990. BackgroundTransparency = 1,
  1991. Position = UDim2New(0, 65, 0, 14),
  1992. BorderSizePixel = 0,
  1993. AutomaticSize = Enum.AutomaticSize.X,
  1994. TextSize = 14,
  1995. BackgroundColor3 = FromRGB(255, 255, 255)
  1996. })
  1997.  
  1998. Items["Game"] = Instances:Create("TextLabel", {
  1999. Parent = Items["Title"].Instance,
  2000. Name = "\0",
  2001. FontFace = Library.Font,
  2002. TextColor3 = FromRGB(255, 255, 255),
  2003. TextTransparency = 0.5,
  2004. Text = Window.SubTitle,
  2005. Size = UDim2New(0, 0, 0, 15),
  2006. BorderSizePixel = 0,
  2007. BackgroundTransparency = 1,
  2008. Position = UDim2New(0, 65, 0, 30),
  2009. BorderColor3 = FromRGB(0, 0, 0),
  2010. AutomaticSize = Enum.AutomaticSize.X,
  2011. TextSize = 14,
  2012. BackgroundColor3 = FromRGB(255, 255, 255)
  2013. })
  2014.  
  2015. Items["Pages"] = Instances:Create("Frame", {
  2016. Parent = Items["Side"].Instance,
  2017. Name = "\0",
  2018. BackgroundTransparency = 1,
  2019. Position = UDim2New(0, 0, 0, 75),
  2020. BorderColor3 = FromRGB(0, 0, 0),
  2021. Size = UDim2New(1, 0, 1, -80),
  2022. BorderSizePixel = 0,
  2023. BackgroundColor3 = FromRGB(255, 255, 255)
  2024. })
  2025.  
  2026. Instances:Create("UIListLayout", {
  2027. Parent = Items["Pages"].Instance,
  2028. Name = "\0",
  2029. Padding = UDimNew(0, 8),
  2030. SortOrder = Enum.SortOrder.LayoutOrder
  2031. })
  2032.  
  2033. Instances:Create("UIPadding", {
  2034. Parent = Items["Pages"].Instance,
  2035. Name = "\0",
  2036. PaddingLeft = UDimNew(0, 8)
  2037. })
  2038.  
  2039. Items["Content"] = Instances:Create("Frame", {
  2040. Parent = Items["MainFrame"].Instance,
  2041. Name = "\0",
  2042. Position = UDim2New(0, 220, 0, 6),
  2043. BorderColor3 = FromRGB(0, 0, 0),
  2044. Size = UDim2New(1, -226, 1, -12),
  2045. BorderSizePixel = 0,
  2046. BackgroundColor3 = FromRGB(21, 24, 24)
  2047. }) Items["Content"]:AddToTheme({BackgroundColor3 = "Inline"})
  2048.  
  2049. Instances:Create("UICorner", {
  2050. Parent = Items["Content"].Instance,
  2051. Name = "\0",
  2052. CornerRadius = UDimNew(0, 7)
  2053. })
  2054.  
  2055. Instances:Create("UIStroke", {
  2056. Parent = Items["Content"].Instance,
  2057. Name = "\0",
  2058. Color = FromRGB(30, 33, 33),
  2059. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  2060. }):AddToTheme({Color = "Border"})
  2061.  
  2062. Items["Bottom_"] = Instances:Create("Frame", {
  2063. Parent = Items["Side"].Instance,
  2064. Name = "\0",
  2065. AnchorPoint = Vector2New(0, 1),
  2066. Position = UDim2New(0, 6, 1, -6),
  2067. BorderColor3 = FromRGB(0, 0, 0),
  2068. Size = UDim2New(1, -12, 0, 45),
  2069. BorderSizePixel = 0,
  2070. BackgroundColor3 = FromRGB(21, 24, 24)
  2071. }) Items["Bottom_"]:AddToTheme({BackgroundColor3 = "Inline"})
  2072.  
  2073. Instances:Create("UICorner", {
  2074. Parent = Items["Bottom_"].Instance,
  2075. Name = "\0",
  2076. CornerRadius = UDimNew(0, 7)
  2077. })
  2078.  
  2079. Instances:Create("UIStroke", {
  2080. Parent = Items["Bottom_"].Instance,
  2081. Name = "\0",
  2082. Color = FromRGB(30, 33, 33),
  2083. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  2084. }):AddToTheme({Color = "Border"})
  2085.  
  2086. Items["SubExpires"] = Instances:Create("TextLabel", {
  2087. Parent = Items["Bottom_"].Instance,
  2088. Name = "\0",
  2089. FontFace = Library.Font,
  2090. TextColor3 = FromRGB(255, 255, 255),
  2091. TextTransparency = 0.5,
  2092. Text = "Sub expires in "..Window.ExpiresIn,
  2093. Size = UDim2New(0, 0, 0, 15),
  2094. BorderSizePixel = 0,
  2095. BackgroundTransparency = 1,
  2096. Position = UDim2New(0, 10, 0, 8),
  2097. BorderColor3 = FromRGB(0, 0, 0),
  2098. AutomaticSize = Enum.AutomaticSize.X,
  2099. TextSize = 12,
  2100. BackgroundColor3 = FromRGB(255, 255, 255)
  2101. })
  2102.  
  2103. Items["SessionDuration"] = Instances:Create("TextLabel", {
  2104. Parent = Items["Bottom_"].Instance,
  2105. Name = "\0",
  2106. FontFace = Library.Font,
  2107. TextColor3 = FromRGB(255, 255, 255),
  2108. BorderColor3 = FromRGB(0, 0, 0),
  2109. Text = "Session duration: ",
  2110. Size = UDim2New(0, 0, 0, 15),
  2111. BackgroundTransparency = 1,
  2112. Position = UDim2New(0, 10, 0, 23),
  2113. BorderSizePixel = 0,
  2114. AutomaticSize = Enum.AutomaticSize.X,
  2115. TextSize = 12,
  2116. BackgroundColor3 = FromRGB(255, 255, 255)
  2117. })
  2118.  
  2119. Library:Thread(function()
  2120. while task.wait(1) do
  2121. local SecondsPassed = MathFloor(tick() - StartTime)
  2122. local MinutesPassed = MathFloor(SecondsPassed / 60)
  2123.  
  2124. if MinutesPassed > 0 then
  2125. SecondsPassed = SecondsPassed - MinutesPassed * 60
  2126. end
  2127.  
  2128. Items["SessionDuration"].Instance.Text = "Session duration: "..MinutesPassed..":"..SecondsPassed
  2129. end
  2130. end)
  2131.  
  2132. Window.Items = Items
  2133. end
  2134.  
  2135. local Debounce = false
  2136.  
  2137. function Window:SetCenter()
  2138. local CenterPosition = Items["MainFrame"].Instance.AbsolutePosition
  2139. task.wait()
  2140. Items["MainFrame"].Instance.AnchorPoint = Vector2New(0, 0)
  2141.  
  2142. Items["MainFrame"].Instance.Position = UDim2New(0, CenterPosition.X, 0, CenterPosition.Y)
  2143. end
  2144.  
  2145. function Window:SetOpen(Bool)
  2146. if Debounce then
  2147. return
  2148. end
  2149.  
  2150. Window.IsOpen = Bool
  2151.  
  2152. Debounce = true
  2153.  
  2154. if Window.IsOpen then
  2155. Items["MainFrame"].Instance.Visible = true
  2156. end
  2157.  
  2158. local Descendants = Items["MainFrame"].Instance:GetDescendants()
  2159. TableInsert(Descendants, Items["MainFrame"].Instance)
  2160.  
  2161. local NewTween
  2162.  
  2163. for Index, Value in Descendants do
  2164. local TransparencyProperty = Tween:GetProperty(Value)
  2165.  
  2166. if not TransparencyProperty then
  2167. continue
  2168. end
  2169.  
  2170. if type(TransparencyProperty) == "table" then
  2171. for _, Property in TransparencyProperty do
  2172. NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed)
  2173. end
  2174. else
  2175. NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed)
  2176. end
  2177. end
  2178.  
  2179. NewTween.Tween.Completed:Connect(function()
  2180. Debounce = false
  2181. Items["MainFrame"].Instance.Visible = Window.IsOpen
  2182. end)
  2183. end
  2184.  
  2185. Library:Connect(UserInputService.InputBegan, function(Input)
  2186. if tostring(Input.KeyCode) == Library.MenuKeybind or tostring(Input.UserInputType) == Library.MenuKeybind then
  2187. Window:SetOpen(not Window.IsOpen)
  2188. end
  2189. end)
  2190.  
  2191. Window:SetCenter()
  2192. task.wait()
  2193. Window:SetOpen(true)
  2194. return setmetatable(Window, Library)
  2195. end
  2196.  
  2197. Library.Page = function(self, Data)
  2198. Data = Data or { }
  2199.  
  2200. local Page = {
  2201. Window = self,
  2202.  
  2203. Name = Data.Name or Data.name or "Page",
  2204. Icon = Data.Icon or Data.icon or "136879043989014",
  2205.  
  2206. Items = { },
  2207. SubPages = { },
  2208. Active = false
  2209. }
  2210.  
  2211. local Items = { } do
  2212. Items["Inactive"] = Instances:Create("TextButton", {
  2213. Parent = Page.Window.Items["Pages"].Instance,
  2214. Name = "\0",
  2215. FontFace = Library.Font,
  2216. TextColor3 = FromRGB(0, 0, 0),
  2217. BorderColor3 = FromRGB(0, 0, 0),
  2218. Text = "",
  2219. AutoButtonColor = false,
  2220. BackgroundTransparency = 1,
  2221. Size = UDim2New(0, 200, 0, 30),
  2222. BorderSizePixel = 0,
  2223. TextSize = 14,
  2224. BackgroundColor3 = FromRGB(21, 24, 24)
  2225. }) Items["Inactive"]:AddToTheme({BackgroundColor3 = "Inline"})
  2226.  
  2227. Items["UIStroke"] = Instances:Create("UIStroke", {
  2228. Parent = Items["Inactive"].Instance,
  2229. Name = "\0",
  2230. Color = FromRGB(30, 33, 33),
  2231. Transparency = 1,
  2232. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  2233. }) Items["UIStroke"]:AddToTheme({Color = "Border"})
  2234.  
  2235. Instances:Create("UICorner", {
  2236. Parent = Items["Inactive"].Instance,
  2237. Name = "\0",
  2238. CornerRadius = UDimNew(0, 7)
  2239. })
  2240.  
  2241. Items["Icon"] = Instances:Create("ImageLabel", {
  2242. Parent = Items["Inactive"].Instance,
  2243. Name = "\0",
  2244. ImageColor3 = FromRGB(100, 100, 100),
  2245. BorderColor3 = FromRGB(0, 0, 0),
  2246. AnchorPoint = Vector2New(0, 0.5),
  2247. Image = "rbxassetid://"..Page.Icon,
  2248. BackgroundTransparency = 1,
  2249. Position = UDim2New(0, 10, 0.5, 0),
  2250. Size = UDim2New(0, 16, 0, 16),
  2251. BorderSizePixel = 0,
  2252. BackgroundColor3 = FromRGB(255, 255, 255)
  2253. })
  2254.  
  2255. Items["Text"] = Instances:Create("TextLabel", {
  2256. Parent = Items["Inactive"].Instance,
  2257. Name = "\0",
  2258. FontFace = Library.Font,
  2259. TextColor3 = FromRGB(100, 100, 100),
  2260. BorderColor3 = FromRGB(0, 0, 0),
  2261. Text = Page.Name,
  2262. AnchorPoint = Vector2New(0, 0.5),
  2263. Size = UDim2New(0, 0, 0, 15),
  2264. BackgroundTransparency = 1,
  2265. Position = UDim2New(0, 38, 0.5, 0),
  2266. BorderSizePixel = 0,
  2267. AutomaticSize = Enum.AutomaticSize.X,
  2268. TextSize = 14,
  2269. BackgroundColor3 = FromRGB(255, 255, 255)
  2270. })
  2271.  
  2272. Items["Page"] = Instances:Create("Frame", {
  2273. Parent = Library.UnusedHolder.Instance,
  2274. Name = "\0",
  2275. Visible = false,
  2276. BackgroundTransparency = 1,
  2277. BorderColor3 = FromRGB(0, 0, 0),
  2278. Size = UDim2New(1, 0, 1, 0),
  2279. BorderSizePixel = 0,
  2280. BackgroundColor3 = FromRGB(255, 255, 255)
  2281. })
  2282.  
  2283. Items["PageName"] = Instances:Create("TextLabel", {
  2284. Parent = Items["Page"].Instance,
  2285. Name = "\0",
  2286. FontFace = Library.Font,
  2287. TextColor3 = FromRGB(255, 255, 255),
  2288. BorderColor3 = FromRGB(0, 0, 0),
  2289. Text = Page.Name,
  2290. Size = UDim2New(0, 0, 0, 15),
  2291. BackgroundTransparency = 1,
  2292. Position = UDim2New(0, 15, 0, 15),
  2293. BorderSizePixel = 0,
  2294. AutomaticSize = Enum.AutomaticSize.X,
  2295. TextSize = 18,
  2296. BackgroundColor3 = FromRGB(255, 255, 255)
  2297. })
  2298.  
  2299. Items["SubPages"] = Instances:Create("Frame", {
  2300. Parent = Items["Page"].Instance,
  2301. Name = "\0",
  2302. Size = UDim2New(0, 0, 0, 30),
  2303. Position = UDim2New(0, 13, 0, 42),
  2304. BorderColor3 = FromRGB(0, 0, 0),
  2305. BorderSizePixel = 0,
  2306. AutomaticSize = Enum.AutomaticSize.X,
  2307. BackgroundColor3 = FromRGB(16, 18, 18)
  2308. }) Items["SubPages"]:AddToTheme({BackgroundColor3 = "Background"})
  2309.  
  2310. Instances:Create("UIPadding", {
  2311. Parent = Items["SubPages"].Instance,
  2312. Name = "\0",
  2313. PaddingTop = UDimNew(0, 2),
  2314. PaddingBottom = UDimNew(0, 2),
  2315. PaddingRight = UDimNew(0, 2),
  2316. PaddingLeft = UDimNew(0, 2)
  2317. })
  2318.  
  2319. Instances:Create("UIListLayout", {
  2320. Parent = Items["SubPages"].Instance,
  2321. Name = "\0",
  2322. Padding = UDimNew(0, 2),
  2323. FillDirection = Enum.FillDirection.Horizontal,
  2324. SortOrder = Enum.SortOrder.LayoutOrder
  2325. })
  2326.  
  2327. Instances:Create("UICorner", {
  2328. Parent = Items["SubPages"].Instance,
  2329. Name = "\0",
  2330. CornerRadius = UDimNew(0, 7)
  2331. })
  2332.  
  2333. Items["Columns"] = Instances:Create("Frame", {
  2334. Parent = Items["Page"].Instance,
  2335. Name = "\0",
  2336. Size = UDim2New(1, -20, 1, -82),
  2337. Position = UDim2New(0, 10, 0, 75),
  2338. BorderColor3 = FromRGB(0, 0, 0),
  2339. BorderSizePixel = 0,
  2340. AutomaticSize = Enum.AutomaticSize.X,
  2341. BackgroundColor3 = FromRGB(255, 255, 255),
  2342. BackgroundTransparency = 1
  2343. })
  2344.  
  2345. Page.Items = Items
  2346. end
  2347.  
  2348. local Debounce = false
  2349.  
  2350. function Page:Turn(Bool)
  2351. if Debounce then
  2352. return
  2353. end
  2354.  
  2355. Page.Active = Bool
  2356.  
  2357. Debounce = true
  2358. Items["Page"].Instance.Visible = Bool
  2359. Items["Page"].Instance.Parent = Bool and Page.Window.Items["Content"].Instance or Library.UnusedHolder.Instance
  2360.  
  2361. if Page.Active then
  2362. Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0})
  2363. Items["Icon"]:Tween(nil, {ImageColor3 = Library.Theme.Accent})
  2364. Items["Text"]:Tween(nil, {TextColor3 = Library.Theme.Accent})
  2365. Items["UIStroke"]:Tween(nil, {Transparency = 0})
  2366. else
  2367. Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1})
  2368. Items["Icon"]:Tween(nil, {ImageColor3 = FromRGB(100, 100, 100)})
  2369. Items["Text"]:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
  2370. Items["UIStroke"]:Tween(nil, {Transparency = 1})
  2371. end
  2372.  
  2373. Debounce = false
  2374. end
  2375.  
  2376. Items["Inactive"]:Connect("MouseButton1Down", function()
  2377. for Index, Value in Page.Window.Pages do
  2378. if Value == Page and Page.Active then
  2379. return
  2380. end
  2381.  
  2382. Value:Turn(Value == Page)
  2383. end
  2384. end)
  2385.  
  2386. if #Page.Window.Pages == 0 then
  2387. Page:Turn(true)
  2388. end
  2389.  
  2390. TableInsert(Page.Window.Pages, Page)
  2391. return setmetatable(Page, Library.Pages)
  2392. end
  2393.  
  2394. Library.Category = function(self, Name)
  2395. local Items = { } do
  2396. Items["Category"] = Instances:Create("TextLabel", {
  2397. Parent = self.Items["Pages"].Instance,
  2398. Name = "\0",
  2399. FontFace = Library.Font,
  2400. TextColor3 = FromRGB(255, 255, 255),
  2401. TextTransparency = 0.5,
  2402. Text = Name,
  2403. Size = UDim2New(0, 0, 0, 15),
  2404. BackgroundTransparency = 1,
  2405. BorderSizePixel = 0,
  2406. BorderColor3 = FromRGB(0, 0, 0),
  2407. AutomaticSize = Enum.AutomaticSize.X,
  2408. TextSize = 12,
  2409. BackgroundColor3 = FromRGB(255, 255, 255)
  2410. })
  2411. end
  2412.  
  2413. return Items
  2414. end
  2415.  
  2416. Library.Pages.SubPage = function(self, Data)
  2417. Data = Data or { }
  2418.  
  2419. local Page = {
  2420. Window = self.Window,
  2421. Page = self,
  2422. Name = Data.Name or Data.name or "SubPage",
  2423. Columns = 1,
  2424. Items = { },
  2425. ColumnsData = { },
  2426. Active = false
  2427. }
  2428.  
  2429. local Items = { } do
  2430. Items["Inactive"] = Instances:Create("TextButton", {
  2431. Parent = Page.Page.Items["SubPages"].Instance,
  2432. Name = "\0",
  2433. FontFace = Library.Font,
  2434. TextColor3 = FromRGB(255, 255, 255),
  2435. TextTransparency = 0.5,
  2436. Text = Page.Name,
  2437. AutoButtonColor = false,
  2438. Size = UDim2New(0, 0, 1, 0),
  2439. BackgroundTransparency = 1,
  2440. BorderSizePixel = 0,
  2441. BorderColor3 = FromRGB(0, 0, 0),
  2442. AutomaticSize = Enum.AutomaticSize.X,
  2443. TextSize = 14,
  2444. BackgroundColor3 = FromRGB(30, 34, 34)
  2445. }) Items["Inactive"]:AddToTheme({BackgroundColor3 = "Element"})
  2446.  
  2447. Instances:Create("UIPadding", {
  2448. Parent = Items["Inactive"].Instance,
  2449. Name = "\0",
  2450. PaddingRight = UDimNew(0, 8),
  2451. PaddingLeft = UDimNew(0, 8)
  2452. })
  2453.  
  2454. Instances:Create("UICorner", {
  2455. Parent = Items["Inactive"].Instance,
  2456. Name = "\0",
  2457. CornerRadius = UDimNew(0, 7)
  2458. })
  2459.  
  2460. Items["Page"] = Instances:Create("Frame", {
  2461. Parent = Library.UnusedHolder.Instance,
  2462. Name = "\0",
  2463. Visible = false,
  2464. BackgroundTransparency = 1,
  2465. BorderColor3 = FromRGB(0, 0, 0),
  2466. Size = UDim2New(1, 0, 1, 0),
  2467. BorderSizePixel = 0,
  2468. BackgroundColor3 = FromRGB(255, 255, 255)
  2469. })
  2470.  
  2471. local NewColumn = Instances:Create("ScrollingFrame", {
  2472. Parent = Items["Page"].Instance,
  2473. Name = "\0",
  2474. ScrollBarImageColor3 = FromRGB(0, 0, 0),
  2475. Active = true,
  2476. BorderColor3 = FromRGB(0, 0, 0),
  2477. ScrollBarThickness = 0,
  2478. BackgroundTransparency = 1,
  2479. Size = UDim2New(1, 0, 1, 0),
  2480. Position = UDim2New(0, 0, 0, 0),
  2481. BorderSizePixel = 0,
  2482. BackgroundColor3 = FromRGB(255, 255, 255),
  2483. AutomaticCanvasSize = Enum.AutomaticSize.Y,
  2484. CanvasSize = UDim2New(0, 0, 0, 0),
  2485. ScrollBarImageTransparency = 0.5,
  2486. })
  2487.  
  2488. Instances:Create("UIPadding", {
  2489. Parent = NewColumn.Instance,
  2490. Name = "\0",
  2491. PaddingTop = UDimNew(0, 10),
  2492. PaddingBottom = UDimNew(0, 10),
  2493. PaddingRight = UDimNew(0, 20),
  2494. PaddingLeft = UDimNew(0, 5)
  2495. })
  2496.  
  2497. Instances:Create("UIListLayout", {
  2498. Parent = NewColumn.Instance,
  2499. Name = "\0",
  2500. Padding = UDimNew(0, 12),
  2501. SortOrder = Enum.SortOrder.LayoutOrder,
  2502. HorizontalAlignment = Enum.HorizontalAlignment.Center
  2503. })
  2504.  
  2505. Page.ColumnsData[1] = NewColumn
  2506. end
  2507.  
  2508. function Page:Turn(Bool)
  2509. if Page.Active == Bool then return end
  2510. Page.Active = Bool
  2511. Items["Page"].Instance.Visible = Bool
  2512. Items["Page"].Instance.Parent = Bool and Page.Page.Items["Columns"].Instance or Library.UnusedHolder.Instance
  2513. if Page.Active then
  2514. Items["Inactive"]:Tween(nil, {BackgroundTransparency = 0, TextTransparency = 0})
  2515. Items["Inactive"]:Tween(nil, {TextColor3 = Library.Theme.Accent})
  2516. else
  2517. Items["Inactive"]:Tween(nil, {BackgroundTransparency = 1, TextTransparency = 0.5})
  2518. Items["Inactive"]:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
  2519. end
  2520. end
  2521.  
  2522. Items["Inactive"]:Connect("MouseButton1Down", function()
  2523. for _, Value in Page.Page.SubPages do
  2524. Value:Turn(Value == Page)
  2525. end
  2526. end)
  2527.  
  2528. if #Page.Page.SubPages == 0 then
  2529. Page:Turn(true)
  2530. end
  2531.  
  2532. table.insert(Page.Page.SubPages, Page)
  2533. return setmetatable(Page, Library.Pages)
  2534. end
  2535.  
  2536. Library.Pages.Section = function(self, Data)
  2537. Data = Data or { }
  2538.  
  2539. local Section = {
  2540. Window = self.Window,
  2541. Page = self,
  2542. Name = Data.Name or Data.name or "Section",
  2543. Icon = Data.Icon or Data.icon or "",
  2544. Side = 1,
  2545. Items = { }
  2546. }
  2547.  
  2548. local Items = { } do
  2549. Items["Section"] = Instances:Create("Frame", {
  2550. Parent = Section.Page.ColumnsData[1].Instance,
  2551. Name = "\0",
  2552. Size = UDim2New(1, 0, 0, 25),
  2553. BorderColor3 = FromRGB(0, 0, 0),
  2554. BorderSizePixel = 0,
  2555. AutomaticSize = Enum.AutomaticSize.Y,
  2556. BackgroundColor3 = FromRGB(21, 24, 24)
  2557. }) Items["Section"]:AddToTheme({BackgroundColor3 = "Inline"})
  2558.  
  2559. Instances:Create("UICorner", {
  2560. Parent = Items["Section"].Instance,
  2561. Name = "\0",
  2562. CornerRadius = UDimNew(0, 7)
  2563. })
  2564.  
  2565. Instances:Create("UIStroke", {
  2566. Parent = Items["Section"].Instance,
  2567. Name = "\0",
  2568. Color = FromRGB(30, 33, 33),
  2569. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  2570. }):AddToTheme({Color = "Border"})
  2571.  
  2572. Items["Icon"] = Instances:Create("ImageLabel", {
  2573. Parent = Items["Section"].Instance,
  2574. Name = "\0",
  2575. ImageColor3 = FromRGB(100, 100, 100),
  2576. BorderColor3 = FromRGB(0, 0, 0),
  2577. Image = "rbxassetid://"..Section.Icon,
  2578. BackgroundTransparency = 1,
  2579. Position = UDim2New(0, 12, 0, 12),
  2580. Size = UDim2New(0, 16, 0, 16),
  2581. BorderSizePixel = 0,
  2582. BackgroundColor3 = FromRGB(255, 255, 255)
  2583. })
  2584.  
  2585. Instances:Create("UIPadding", {
  2586. Parent = Items["Section"].Instance,
  2587. Name = "\0",
  2588. PaddingBottom = UDimNew(0, 12)
  2589. })
  2590.  
  2591. Items["Text"] = Instances:Create("TextLabel", {
  2592. Parent = Items["Section"].Instance,
  2593. Name = "\0",
  2594. FontFace = Library.Font,
  2595. TextColor3 = FromRGB(100, 100, 100),
  2596. BorderColor3 = FromRGB(0, 0, 0),
  2597. Text = Section.Name,
  2598. Size = UDim2New(0, 0, 0, 15),
  2599. BackgroundTransparency = 1,
  2600. Position = UDim2New(0, 35, 0, 12),
  2601. BorderSizePixel = 0,
  2602. AutomaticSize = Enum.AutomaticSize.X,
  2603. TextSize = 14,
  2604. BackgroundColor3 = FromRGB(255, 255, 255)
  2605. })
  2606.  
  2607. Items["Content"] = Instances:Create("Frame", {
  2608. Parent = Items["Section"].Instance,
  2609. Name = "\0",
  2610. BorderColor3 = FromRGB(0, 0, 0),
  2611. BackgroundTransparency = 1,
  2612. Position = UDim2New(0, 12, 0, 42),
  2613. Size = UDim2New(1, -24, 0, 0),
  2614. BorderSizePixel = 0,
  2615. AutomaticSize = Enum.AutomaticSize.Y,
  2616. BackgroundColor3 = FromRGB(255, 255, 255)
  2617. })
  2618.  
  2619. Instances:Create("UIListLayout", {
  2620. Parent = Items["Content"].Instance,
  2621. Name = "\0",
  2622. Padding = UDimNew(0, 8),
  2623. SortOrder = Enum.SortOrder.LayoutOrder
  2624. })
  2625.  
  2626. Section.Items = Items
  2627. end
  2628.  
  2629. return setmetatable(Section, Library.Sections)
  2630. end
  2631.  
  2632. Library.Sections.Toggle = function(self, Data)
  2633. Data = Data or { }
  2634.  
  2635. local Toggle = {
  2636. Window = self.Window,
  2637. Page = self.Page,
  2638. Section = self,
  2639.  
  2640. Name = Data.Name or Data.name or "Toggle",
  2641. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  2642. Default = Data.Default or Data.default or false,
  2643. Callback = Data.Callback or Data.callback or function() end,
  2644.  
  2645. Value = false
  2646. }
  2647.  
  2648. local Items = { } do
  2649. Items["Toggle"] = Instances:Create("TextButton", {
  2650. Parent = Toggle.Section.Items["Content"].Instance,
  2651. Name = "\0",
  2652. FontFace = Library.Font,
  2653. TextColor3 = FromRGB(0, 0, 0),
  2654. BorderColor3 = FromRGB(0, 0, 0),
  2655. Text = "",
  2656. AutoButtonColor = false,
  2657. BackgroundTransparency = 1,
  2658. Size = UDim2New(1, 0, 0, 16),
  2659. BorderSizePixel = 0,
  2660. TextSize = 14,
  2661. BackgroundColor3 = FromRGB(255, 255, 255)
  2662. })
  2663.  
  2664. Items["Text"] = Instances:Create("TextLabel", {
  2665. Parent = Items["Toggle"].Instance,
  2666. Name = "\0",
  2667. FontFace = Library.Font,
  2668. TextColor3 = FromRGB(100, 100, 100),
  2669. BorderColor3 = FromRGB(0, 0, 0),
  2670. Text = Toggle.Name,
  2671. AnchorPoint = Vector2New(0, 0.5),
  2672. Size = UDim2New(0, 0, 0, 15),
  2673. BackgroundTransparency = 1,
  2674. Position = UDim2New(0, 0, 0.5, 0),
  2675. BorderSizePixel = 0,
  2676. AutomaticSize = Enum.AutomaticSize.X,
  2677. TextSize = 14,
  2678. BackgroundColor3 = FromRGB(255, 255, 255)
  2679. })
  2680.  
  2681. Items["Indicator"] = Instances:Create("Frame", {
  2682. Parent = Items["Toggle"].Instance,
  2683. Name = "\0",
  2684. BorderColor3 = FromRGB(0, 0, 0),
  2685. AnchorPoint = Vector2New(1, 0),
  2686. BackgroundTransparency = 1,
  2687. Position = UDim2New(1, 0, 0, 0),
  2688. Size = UDim2New(0, 14, 0, 14),
  2689. BorderSizePixel = 0,
  2690. BackgroundColor3 = FromRGB(30, 33, 33)
  2691. }) Items["Indicator"]:AddToTheme({BackgroundColor3 = "Element"})
  2692.  
  2693. Instances:Create("UIStroke", {
  2694. Parent = Items["Indicator"].Instance,
  2695. Name = "\0",
  2696. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2697. Color = FromRGB(56, 62, 62),
  2698. Thickness = 2
  2699. }):AddToTheme({Color = "Border 2"})
  2700.  
  2701. Instances:Create("UICorner", {
  2702. Parent = Items["Indicator"].Instance,
  2703. Name = "\0",
  2704. CornerRadius = UDimNew(0, 4)
  2705. })
  2706.  
  2707. Items["Inline"] = Instances:Create("Frame", {
  2708. Parent = Items["Indicator"].Instance,
  2709. Name = "\0",
  2710. BackgroundTransparency = 1,
  2711. BorderColor3 = FromRGB(0, 0, 0),
  2712. Size = UDim2New(1, 0, 1, 0),
  2713. BorderSizePixel = 0,
  2714. BackgroundColor3 = FromRGB(255, 255, 255)
  2715. }) Items["Inline"]:AddToTheme({BackgroundColor3 = "Accent"})
  2716.  
  2717. Instances:Create("UICorner", {
  2718. Parent = Items["Inline"].Instance,
  2719. Name = "\0",
  2720. CornerRadius = UDimNew(0, 4)
  2721. })
  2722.  
  2723. Items["CheckImage"] = Instances:Create("ImageLabel", {
  2724. Parent = Items["Inline"].Instance,
  2725. Name = "\0",
  2726. ImageColor3 = FromRGB(0, 0, 0),
  2727. BorderColor3 = FromRGB(0, 0, 0),
  2728. AnchorPoint = Vector2New(0.5, 0.5),
  2729. Image = "rbxassetid://132128200461292",
  2730. ImageTransparency = 1,
  2731. BackgroundTransparency = 1,
  2732. Position = UDim2New(0.5, 0, 0.5, 0),
  2733. Size = UDim2New(1, -4, 1, -4),
  2734. BorderSizePixel = 0,
  2735. BackgroundColor3 = FromRGB(255, 255, 255)
  2736. })
  2737.  
  2738. Items["SubElements"] = Instances:Create("Frame", {
  2739. Parent = Items["Toggle"].Instance,
  2740. Name = "\0",
  2741. BorderColor3 = FromRGB(0, 0, 0),
  2742. AnchorPoint = Vector2New(1, 0),
  2743. BackgroundTransparency = 1,
  2744. Position = UDim2New(1, -25, 0, 0),
  2745. Size = UDim2New(0, 0, 1, 0),
  2746. BorderSizePixel = 0,
  2747. AutomaticSize = Enum.AutomaticSize.X,
  2748. BackgroundColor3 = FromRGB(255, 255, 255)
  2749. })
  2750.  
  2751. Instances:Create("UIListLayout", {
  2752. Parent = Items["SubElements"].Instance,
  2753. Name = "\0",
  2754. FillDirection = Enum.FillDirection.Horizontal,
  2755. HorizontalAlignment = Enum.HorizontalAlignment.Right,
  2756. Padding = UDimNew(0, 6),
  2757. SortOrder = Enum.SortOrder.LayoutOrder
  2758. })
  2759. end
  2760.  
  2761. function Toggle:Get()
  2762. return Toggle.Value
  2763. end
  2764.  
  2765. function Toggle:Set(Value)
  2766. Toggle.Value = Value
  2767. Library.Flags[Toggle.Flag] = Value
  2768.  
  2769. if Toggle.Value then
  2770. Items["Inline"]:Tween(nil, {BackgroundTransparency = 0})
  2771. Items["CheckImage"]:Tween(nil, {ImageTransparency = 0})
  2772. Items["Text"]:Tween(nil, {TextColor3 = FromRGB(255, 255, 255)})
  2773. else
  2774. Items["Inline"]:Tween(nil, {BackgroundTransparency = 1})
  2775. Items["CheckImage"]:Tween(nil, {ImageTransparency = 1})
  2776. Items["Text"]:Tween(nil, {TextColor3 = FromRGB(100, 100, 100)})
  2777. end
  2778.  
  2779. if Toggle.Callback then
  2780. Library:SafeCall(Toggle.Callback, Toggle.Value)
  2781. end
  2782. end
  2783.  
  2784. function Toggle:SetVisibility(Bool)
  2785. Items["Toggle"].Instance.Visible = Bool
  2786. end
  2787.  
  2788. function Toggle:Colorpicker(Data)
  2789. Data = Data or { }
  2790.  
  2791. local Colorpicker = {
  2792. Window = Toggle.Window,
  2793. Page = Toggle.Page,
  2794. Section = Toggle.Section,
  2795.  
  2796. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  2797. Default = Data.Default or Data.default or Color3.fromRGB(255, 255, 255),
  2798. Callback = Data.Callback or Data.callback or function() end
  2799. }
  2800.  
  2801. local NewColorpicker, ColorpickerItems = Library:CreateColorpicker({
  2802. Parent = Items["SubElements"],
  2803. Page = Colorpicker.Page,
  2804. Section = Colorpicker.Section,
  2805. Flag = Colorpicker.Flag,
  2806. Default = Colorpicker.Default,
  2807. Callback = Colorpicker.Callback
  2808. })
  2809.  
  2810. return NewColorpicker
  2811. end
  2812.  
  2813. function Toggle:Keybind(Data)
  2814. Data = Data or { }
  2815.  
  2816. local Keybind = {
  2817. Window = Toggle.Window,
  2818. Page = Toggle.Page,
  2819. Section = Toggle.Section,
  2820.  
  2821. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  2822. Default = Data.Default or Data.default or Enum.KeyCode.E,
  2823. Callback = Data.Callback or Data.callback or function() end,
  2824. Mode = Data.Mode or Data.mode or "Toggle"
  2825. }
  2826.  
  2827. local NewKeybind = Library:CreateKeybind({
  2828. Parent = Items["SubElements"],
  2829. Page = Keybind.Page,
  2830. Section = Keybind.Section,
  2831. Flag = Keybind.Flag,
  2832. Default = Keybind.Default,
  2833. Mode = Keybind.Mode,
  2834. Callback = Keybind.Callback
  2835. })
  2836.  
  2837. return NewKeybind
  2838. end
  2839.  
  2840. Items["Toggle"]:Connect("MouseButton1Down", function()
  2841. Toggle:Set(not Toggle.Value)
  2842. end)
  2843.  
  2844. Toggle:Set(Toggle.Default)
  2845.  
  2846. Library.SetFlags[Toggle.Flag] = function(Value)
  2847. Toggle:Set(Value)
  2848. end
  2849.  
  2850. return Toggle
  2851. end
  2852.  
  2853. Library.Sections.Button = function(self, Data)
  2854. Data = Data or { }
  2855.  
  2856. local Button = {
  2857. Window = self.Window,
  2858. Page = self.Page,
  2859. Section = self,
  2860.  
  2861. Name = Data.Name or Data.name,
  2862. Callback = Data.Callback or Data.callback or function() end
  2863. }
  2864.  
  2865. local Items = { } do
  2866. Items["Button"] = Instances:Create("TextButton", {
  2867. Parent = Button.Section.Items["Content"].Instance,
  2868. Name = "\0",
  2869. FontFace = Library.Font,
  2870. TextColor3 = FromRGB(255, 255, 255),
  2871. BorderColor3 = FromRGB(0, 0, 0),
  2872. Text = Button.Name,
  2873. AutoButtonColor = false,
  2874. Size = UDim2New(1, 0, 0, 25),
  2875. BorderSizePixel = 0,
  2876. TextSize = 14,
  2877. BackgroundColor3 = FromRGB(30, 34, 34)
  2878. })
  2879. Items["Button"]:AddToTheme({BackgroundColor3 = "Element"})
  2880.  
  2881. Instances:Create("UICorner", {
  2882. Parent = Items["Button"].Instance,
  2883. Name = "\0",
  2884. CornerRadius = UDimNew(0, 4)
  2885. })
  2886.  
  2887. Instances:Create("UIStroke", {
  2888. Parent = Items["Button"].Instance,
  2889. Name = "\0",
  2890. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2891. Color = FromRGB(56, 62, 62),
  2892. Thickness = 2
  2893. }):AddToTheme({Color = "Border 2"})
  2894.  
  2895. Instances:Create("UIPadding", {
  2896. Parent = Items["Button"].Instance,
  2897. Name = "\0",
  2898. PaddingBottom = UDimNew(0, 1)
  2899. })
  2900. end
  2901.  
  2902. function Button:SetVisibility(Bool)
  2903. Items["Button"].Instance.Visible = Bool
  2904. end
  2905.  
  2906. function Button:Press()
  2907. Items["Button"]:ChangeItemTheme({BackgroundColor3 = "Accent"})
  2908. Items["Button"]:Tween(nil, {
  2909. BackgroundColor3 = Library.Theme.Accent,
  2910. TextColor3 = FromRGB(0, 0, 0)
  2911. })
  2912.  
  2913. task.wait(0.1)
  2914.  
  2915. Items["Button"]:ChangeItemTheme({BackgroundColor3 = "Element"})
  2916. Items["Button"]:Tween(nil, {
  2917. BackgroundColor3 = Library.Theme.Element,
  2918. TextColor3 = FromRGB(255, 255, 255) -- White text on element background
  2919. })
  2920.  
  2921. Library:SafeCall(Button.Callback)
  2922. end
  2923.  
  2924. Items["Button"]:Connect("MouseEnter", function()
  2925. Items["Button"]:Tween(nil, {TextColor3 = Library.Theme.Accent})
  2926. end)
  2927.  
  2928. Items["Button"]:Connect("MouseLeave", function()
  2929. Items["Button"]:Tween(nil, {TextColor3 = FromRGB(255, 255, 255)})
  2930. end)
  2931.  
  2932. Items["Button"]:Connect("MouseButton1Down", function()
  2933. Button:Press()
  2934. end)
  2935.  
  2936. return Button
  2937. end
  2938.  
  2939. Library.Sections.Slider = function(self, Data)
  2940. Data = Data or { }
  2941.  
  2942. local Slider = {
  2943. Window = self.Window,
  2944. Page = self.Page,
  2945. Section = self,
  2946.  
  2947. Name = Data.Name or Data.name or "Slider",
  2948. Min = Data.Min or Data.min or 0,
  2949. Max = Data.Max or Data.max or 100,
  2950. Callback = Data.Callback or Data.callback or function() end,
  2951. Default = Data.Default or Data.default or 0,
  2952. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  2953. Decimals = Data.Decimals or Data.decimals or 1,
  2954. Suffix = Data.Suffix or Data.suffix or "",
  2955.  
  2956. Value = 0,
  2957. Sliding = false
  2958. }
  2959.  
  2960. local Items = { } do
  2961. Items["Slider"] = Instances:Create("Frame", {
  2962. Parent = Slider.Section.Items["Content"].Instance,
  2963. Name = "\0",
  2964. BackgroundTransparency = 1,
  2965. BorderColor3 = FromRGB(0, 0, 0),
  2966. Size = UDim2New(1, 0, 0, 30),
  2967. BorderSizePixel = 0,
  2968. BackgroundColor3 = FromRGB(255, 255, 255)
  2969. })
  2970.  
  2971. Items["Text"] = Instances:Create("TextLabel", {
  2972. Parent = Items["Slider"].Instance,
  2973. Name = "\0",
  2974. FontFace = Library.Font,
  2975. TextColor3 = FromRGB(255, 255, 255),
  2976. BorderColor3 = FromRGB(0, 0, 0),
  2977. Text = Slider.Name,
  2978. BackgroundTransparency = 1,
  2979. Size = UDim2New(0, 0, 0, 15),
  2980. BorderSizePixel = 0,
  2981. AutomaticSize = Enum.AutomaticSize.X,
  2982. TextSize = 14,
  2983. BackgroundColor3 = FromRGB(255, 255, 255)
  2984. })
  2985.  
  2986. Items["Value"] = Instances:Create("TextLabel", {
  2987. Parent = Items["Slider"].Instance,
  2988. Name = "\0",
  2989. FontFace = Library.Font,
  2990. TextColor3 = FromRGB(100, 100, 100),
  2991. BorderColor3 = FromRGB(0, 0, 0),
  2992. Text = "",
  2993. AnchorPoint = Vector2New(1, 0),
  2994. Size = UDim2New(0, 0, 0, 15),
  2995. BackgroundTransparency = 1,
  2996. Position = UDim2New(1, 0, 0, 0),
  2997. BorderSizePixel = 0,
  2998. AutomaticSize = Enum.AutomaticSize.X,
  2999. TextSize = 14,
  3000. BackgroundColor3 = FromRGB(255, 255, 255)
  3001. })
  3002.  
  3003. Items["RealSlider"] = Instances:Create("TextButton", {
  3004. Parent = Items["Slider"].Instance,
  3005. Text = "",
  3006. AutoButtonColor = false,
  3007. Name = "\0",
  3008. AnchorPoint = Vector2New(0, 1),
  3009. Position = UDim2New(0, 0, 1, 0),
  3010. BorderColor3 = FromRGB(0, 0, 0),
  3011. Size = UDim2New(1, 0, 0, 5),
  3012. BorderSizePixel = 0,
  3013. BackgroundColor3 = FromRGB(30, 34, 34)
  3014. }) Items["RealSlider"]:AddToTheme({BackgroundColor3 = "Element"})
  3015.  
  3016. Instances:Create("UICorner", {
  3017. Parent = Items["RealSlider"].Instance,
  3018. Name = "\0",
  3019. CornerRadius = UDimNew(1, 0)
  3020. })
  3021.  
  3022. Items["Accent"] = Instances:Create("Frame", {
  3023. Parent = Items["RealSlider"].Instance,
  3024. Name = "\0",
  3025. BorderColor3 = FromRGB(0, 0, 0),
  3026. Size = UDim2New(0.4000000059604645, 0, 1, 0),
  3027. BorderSizePixel = 0,
  3028. BackgroundColor3 = FromRGB(255, 255, 255)
  3029. }) Items["Accent"]:AddToTheme({BackgroundColor3 = "Accent"})
  3030.  
  3031. Instances:Create("UICorner", {
  3032. Parent = Items["Accent"].Instance,
  3033. Name = "\0",
  3034. CornerRadius = UDimNew(0, 7)
  3035. })
  3036.  
  3037. Items["Circle"] = Instances:Create("Frame", {
  3038. Parent = Items["Accent"].Instance,
  3039. Name = "\0",
  3040. AnchorPoint = Vector2New(1, 0.5),
  3041. Position = UDim2New(1, 5, 0.5, 0),
  3042. BorderColor3 = FromRGB(0, 0, 0),
  3043. Size = UDim2New(0, 8, 0, 8),
  3044. BorderSizePixel = 0,
  3045. BackgroundColor3 = FromRGB(255, 255, 255)
  3046. }) Items["Circle"]:AddToTheme({BackgroundColor3 = "Accent"})
  3047.  
  3048. Instances:Create("UICorner", {
  3049. Parent = Items["Circle"].Instance,
  3050. Name = "\0",
  3051. CornerRadius = UDimNew(0, 7)
  3052. })
  3053.  
  3054. Instances:Create("UIGradient", {
  3055. Parent = Items["Accent"].Instance,
  3056. Name = "\0",
  3057. Color = RGBSequence{RGBSequenceKeypoint(0, FromRGB(180, 180, 180)), RGBSequenceKeypoint(1, FromRGB(255, 255, 255))}
  3058. })
  3059. end
  3060.  
  3061. function Slider:Get()
  3062. return Slider.Value
  3063. end
  3064.  
  3065. function Slider:SetVisibility(Bool)
  3066. Items["Slider"].Instance.Visible = Bool
  3067. end
  3068.  
  3069. function Slider:Set(Value)
  3070. Slider.Value = Library:Round(MathClamp(Value, Slider.Min, Slider.Max), Slider.Decimals)
  3071. Library.Flags[Slider.Flag] = Slider.Value
  3072.  
  3073. Items["Accent"]:Tween(TweenInfo.new(0.35, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2New((Slider.Value - Slider.Min) / (Slider.Max - Slider.Min), -2, 1, 0)})
  3074. Items["Value"].Instance.Text = StringFormat("%s%s", Slider.Value, Slider.Suffix)
  3075.  
  3076. if Slider.Callback then
  3077. Library:SafeCall(Slider.Callback, Slider.Value)
  3078. end
  3079. end
  3080.  
  3081. local InputChanged
  3082. local InputChanged2
  3083.  
  3084. Items["RealSlider"]:Connect("InputBegan", function(Input)
  3085. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  3086. Slider.Sliding = true
  3087.  
  3088. local SizeX = (Input.Position.X - Items["RealSlider"].Instance.AbsolutePosition.X) / Items["RealSlider"].Instance.AbsoluteSize.X
  3089. local Value = ((Slider.Max - Slider.Min) * SizeX) + Slider.Min
  3090.  
  3091. Slider:Set(Value)
  3092.  
  3093. if InputChanged then
  3094. return
  3095. end
  3096.  
  3097. InputChanged = Input.Changed:Connect(function()
  3098. if Input.UserInputState == Enum.UserInputState.End then
  3099. Slider.Sliding = false
  3100.  
  3101. InputChanged:Disconnect()
  3102. InputChanged = nil
  3103. end
  3104. end)
  3105. end
  3106. end)
  3107.  
  3108. Items["Circle"]:Connect("InputBegan", function(Input)
  3109. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  3110. Slider.Sliding = true
  3111.  
  3112. local SizeX = (Input.Position.X - Items["RealSlider"].Instance.AbsolutePosition.X) / Items["RealSlider"].Instance.AbsoluteSize.X
  3113. local Value = ((Slider.Max - Slider.Min) * SizeX) + Slider.Min
  3114.  
  3115. Slider:Set(Value)
  3116.  
  3117. if InputChanged2 or InputChanged then
  3118. return
  3119. end
  3120.  
  3121. InputChanged2 = Input.Changed:Connect(function()
  3122. if Input.UserInputState == Enum.UserInputState.End then
  3123. Slider.Sliding = false
  3124.  
  3125. InputChanged2:Disconnect()
  3126. InputChanged2 = nil
  3127. end
  3128. end)
  3129. end
  3130. end)
  3131.  
  3132. Library:Connect(UserInputService.InputChanged, function(Input)
  3133. if Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch then
  3134. if Slider.Sliding then
  3135. local SizeX = (Input.Position.X - Items["RealSlider"].Instance.AbsolutePosition.X) / Items["RealSlider"].Instance.AbsoluteSize.X
  3136. local Value = ((Slider.Max - Slider.Min) * SizeX) + Slider.Min
  3137.  
  3138. Slider:Set(Value)
  3139. end
  3140. end
  3141. end)
  3142.  
  3143. Slider:Set(Slider.Default)
  3144.  
  3145. Library.SetFlags[Slider.Flag] = function(Value)
  3146. Slider:Set(Value)
  3147. end
  3148.  
  3149. return Slider
  3150. end
  3151.  
  3152. Library.Sections.Dropdown = function(self, Data)
  3153. Data = Data or { }
  3154.  
  3155. local Dropdown = {
  3156. Window = self.Window,
  3157. Page = self.Page,
  3158. Section = self,
  3159.  
  3160. Name = Data.Name or Data.name or "Dropdown",
  3161. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  3162. Items = Data.Items or Data.items or { },
  3163. Default = Data.Default or Data.default or "",
  3164. Callback = Data.Callback or Data.callback or function() end,
  3165. Multi = Data.Multi or Data.multi or false,
  3166.  
  3167. Value = { },
  3168. Options = { },
  3169. IsOpen = false
  3170. }
  3171.  
  3172. local Items = { } do
  3173. Items["Dropdown"] = Instances:Create("Frame", {
  3174. Parent = Dropdown.Section.Items["Content"].Instance,
  3175. Name = "\0",
  3176. BackgroundTransparency = 1,
  3177. BorderColor3 = FromRGB(0, 0, 0),
  3178. Size = UDim2New(1, 0, 0, 25),
  3179. BorderSizePixel = 0,
  3180. BackgroundColor3 = FromRGB(255, 255, 255)
  3181. })
  3182.  
  3183. Items["Text"] = Instances:Create("TextLabel", {
  3184. Parent = Items["Dropdown"].Instance,
  3185. Name = "\0",
  3186. FontFace = Library.Font,
  3187. TextColor3 = FromRGB(255, 255, 255),
  3188. BorderColor3 = FromRGB(0, 0, 0),
  3189. Text = Dropdown.Name,
  3190. AnchorPoint = Vector2New(0, 0.5),
  3191. Size = UDim2New(0, 0, 0, 15),
  3192. BackgroundTransparency = 1,
  3193. Position = UDim2New(0, 0, 0.5, 0),
  3194. BorderSizePixel = 0,
  3195. AutomaticSize = Enum.AutomaticSize.X,
  3196. TextSize = 14,
  3197. BackgroundColor3 = FromRGB(255, 255, 255)
  3198. })
  3199.  
  3200. Items["RealDropdown"] = Instances:Create("TextButton", {
  3201. Parent = Items["Dropdown"].Instance,
  3202. Name = "\0",
  3203. FontFace = Library.Font,
  3204. TextColor3 = FromRGB(0, 0, 0),
  3205. BorderColor3 = FromRGB(0, 0, 0),
  3206. Text = "",
  3207. AutoButtonColor = false,
  3208. AnchorPoint = Vector2New(1, 0.5),
  3209. Position = UDim2New(1, 0, 0.5, 0),
  3210. Size = UDim2New(0, 80, 0, 25),
  3211. BorderSizePixel = 0,
  3212. TextSize = 14,
  3213. BackgroundColor3 = FromRGB(30, 34, 34)
  3214. }) Items["RealDropdown"]:AddToTheme({BackgroundColor3 = "Element"})
  3215.  
  3216. Instances:Create("UICorner", {
  3217. Parent = Items["RealDropdown"].Instance,
  3218. Name = "\0",
  3219. CornerRadius = UDimNew(0, 4)
  3220. })
  3221.  
  3222. Items["Value"] = Instances:Create("TextLabel", {
  3223. Parent = Items["RealDropdown"].Instance,
  3224. Name = "\0",
  3225. FontFace = Library.Font,
  3226. TextColor3 = FromRGB(100, 100, 100),
  3227. BorderColor3 = FromRGB(0, 0, 0),
  3228. Text = "...",
  3229. AnchorPoint = Vector2New(0, 0.5),
  3230. Size = UDim2New(1, -6, 0, 15),
  3231. BackgroundTransparency = 1,
  3232. Position = UDim2New(0, 6, 0.5, 0),
  3233. BorderSizePixel = 0,
  3234. TextSize = 12,
  3235. TextXAlignment = Enum.TextXAlignment.Left,
  3236. TextTruncate = Enum.TextTruncate.AtEnd,
  3237. BackgroundColor3 = FromRGB(255, 255, 255)
  3238. })
  3239.  
  3240. Items["Icon"] = Instances:Create("ImageLabel", {
  3241. Parent = Items["RealDropdown"].Instance,
  3242. Name = "\0",
  3243. ImageColor3 = FromRGB(100, 100, 100),
  3244. BorderColor3 = FromRGB(0, 0, 0),
  3245. AnchorPoint = Vector2New(1, 0.5),
  3246. Image = "rbxassetid://135448248851234",
  3247. BackgroundTransparency = 1,
  3248. Position = UDim2New(1, -5, 0.5, 0),
  3249. Size = UDim2New(0, 16, 0, 16),
  3250. BorderSizePixel = 0,
  3251. BackgroundColor3 = FromRGB(255, 255, 255)
  3252. })
  3253.  
  3254. Items["OptionHolder"] = Instances:Create("Frame", {
  3255. Parent = Library.UnusedHolder.Instance,
  3256. Name = "\0",
  3257. Visible = false,
  3258. BorderColor3 = FromRGB(0, 0, 0),
  3259. AnchorPoint = Vector2New(0, 0),
  3260. Position = UDim2New(1, 0, 0.5, 0),
  3261. Size = UDim2New(0, 80, 0, 0), -- Dynamic height handles this now
  3262. BorderSizePixel = 0,
  3263. BackgroundColor3 = FromRGB(21, 24, 24)
  3264. }) Items["OptionHolder"]:AddToTheme({BackgroundColor3 = "Inline"})
  3265.  
  3266. Instances:Create("UIStroke", {
  3267. Parent = Items["OptionHolder"].Instance,
  3268. Name = "\0",
  3269. Color = FromRGB(30, 33, 33),
  3270. ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  3271. }):AddToTheme({Color = "Border"})
  3272.  
  3273. Items["Holder"] = Instances:Create("ScrollingFrame", {
  3274. Parent = Items["OptionHolder"].Instance,
  3275. Name = "\0",
  3276. Active = true,
  3277. AutomaticCanvasSize = Enum.AutomaticSize.Y, -- Dynamic scrolling canvas
  3278. ScrollBarThickness = 4,
  3279. Size = UDim2New(1, 0, 1, 0),
  3280. BorderSizePixel = 0,
  3281. BackgroundTransparency = 1,
  3282. ScrollingDirection = Enum.ScrollingDirection.Y,
  3283. BorderColor3 = FromRGB(0, 0, 0),
  3284. BackgroundColor3 = FromRGB(255, 255, 255),
  3285. CanvasSize = UDim2New(0, 0, 0, 0)
  3286. }) Items["Holder"]:AddToTheme({ScrollBarImageColor3 = "Accent"})
  3287.  
  3288. Instances:Create("UIListLayout", {
  3289. Parent = Items["Holder"].Instance,
  3290. Name = "\0",
  3291. SortOrder = Enum.SortOrder.LayoutOrder
  3292. })
  3293.  
  3294. Instances:Create("UIPadding", {
  3295. Parent = Items["OptionHolder"].Instance,
  3296. Name = "\0",
  3297. PaddingBottom = UDimNew(0, 4)
  3298. })
  3299. end
  3300.  
  3301. function Dropdown:Get()
  3302. return Dropdown.Value
  3303. end
  3304.  
  3305. function Dropdown:SetVisibility(Bool)
  3306. Items["Dropdown"].Instance.Visible = Bool
  3307. end
  3308.  
  3309. local Debounce = false
  3310. local RenderStepped
  3311.  
  3312. function Dropdown:SetOpen(Bool)
  3313. if Debounce then
  3314. return
  3315. end
  3316.  
  3317. Dropdown.IsOpen = Bool
  3318.  
  3319. Debounce = true
  3320.  
  3321. if Dropdown.IsOpen then
  3322. Items["OptionHolder"].Instance.Visible = true
  3323. Items["OptionHolder"].Instance.Parent = Library.Holder.Instance
  3324.  
  3325. RenderStepped = RunService.RenderStepped:Connect(function()
  3326. -- Count the options to calculate height dynamically up to a limit
  3327. local OptionCount = 0
  3328. for _ in pairs(Dropdown.Options) do OptionCount = OptionCount + 1 end
  3329.  
  3330. -- Calculates height (25px per item) but caps out at 125px (5 items max viewable)
  3331. local CalculatedHeight = math.clamp(OptionCount * 25, 25, 125)
  3332.  
  3333. Items["OptionHolder"].Instance.Position = UDim2New(0, Items["RealDropdown"].Instance.AbsolutePosition.X, 0, Items["RealDropdown"].Instance.AbsolutePosition.Y + 28)
  3334. Items["OptionHolder"].Instance.Size = UDim2New(0, Items["RealDropdown"].Instance.AbsoluteSize.X, 0, CalculatedHeight)
  3335. end)
  3336.  
  3337. for Index, Value in Library.OpenFrames do
  3338. if Value ~= Dropdown and not Dropdown.Section.IsSettings then
  3339. Value:SetOpen(false)
  3340. end
  3341. end
  3342.  
  3343. Library.OpenFrames[Dropdown] = Dropdown
  3344. else
  3345. if Library.OpenFrames[Dropdown] then
  3346. Library.OpenFrames[Dropdown] = nil
  3347. end
  3348.  
  3349. if RenderStepped then
  3350. RenderStepped:Disconnect()
  3351. RenderStepped = nil
  3352. end
  3353. end
  3354.  
  3355. local Descendants = Items["OptionHolder"].Instance:GetDescendants()
  3356. TableInsert(Descendants, Items["OptionHolder"].Instance)
  3357.  
  3358. local NewTween
  3359.  
  3360. for Index, Value in Descendants do
  3361. local TransparencyProperty = Tween:GetProperty(Value)
  3362.  
  3363. if not TransparencyProperty then
  3364. continue
  3365. end
  3366.  
  3367. if not Value.ClassName:find("UI") then
  3368. Value.ZIndex = Dropdown.IsOpen and 3 or 1
  3369. end
  3370.  
  3371. if type(TransparencyProperty) == "table" then
  3372. for _, Property in TransparencyProperty do
  3373. NewTween = Tween:FadeItem(Value, Property, Bool, Library.FadeSpeed)
  3374. end
  3375. else
  3376. NewTween = Tween:FadeItem(Value, TransparencyProperty, Bool, Library.FadeSpeed)
  3377. end
  3378. end
  3379.  
  3380. NewTween.Tween.Completed:Connect(function()
  3381. Debounce = false
  3382. Items["OptionHolder"].Instance.Visible = Dropdown.IsOpen
  3383. task.wait(0.2)
  3384. Items["OptionHolder"].Instance.Parent = not Dropdown.IsOpen and Library.UnusedHolder.Instance or Library.Holder.Instance
  3385. end)
  3386. end
  3387.  
  3388. function Dropdown:Set(Option)
  3389. if Dropdown.Multi then
  3390. if type(Option) ~= "table" then
  3391. return
  3392. end
  3393.  
  3394. Dropdown.Value = Option
  3395. Library.Flags[Dropdown.Flag] = Option
  3396.  
  3397. for Index, Value in Option do
  3398. local OptionData = Dropdown.Options[Value]
  3399.  
  3400. if not OptionData then
  3401. continue
  3402. end
  3403.  
  3404. OptionData.Selected = true
  3405. OptionData:Toggle("Active")
  3406. end
  3407.  
  3408. Items["Value"].Instance.Text = TableConcat(Option, ", ")
  3409. else
  3410. if not Dropdown.Options[Option] then
  3411. return
  3412. end
  3413.  
  3414. local OptionData = Dropdown.Options[Option]
  3415.  
  3416. Dropdown.Value = Option
  3417. Library.Flags[Dropdown.Flag] = Option
  3418.  
  3419. for Index, Value in Dropdown.Options do
  3420. if Value ~= OptionData then
  3421. Value.Selected = false
  3422. Value:Toggle("Inactive")
  3423. else
  3424. Value.Selected = true
  3425. Value:Toggle("Active")
  3426. end
  3427. end
  3428.  
  3429. Items["Value"].Instance.Text = Option
  3430. end
  3431.  
  3432. if Dropdown.Callback then
  3433. Library:SafeCall(Dropdown.Callback, Dropdown.Value)
  3434. end
  3435. end
  3436.  
  3437. function Dropdown:Add(Option)
  3438. local OptionButton = Instances:Create("TextButton", {
  3439. Parent = Items["Holder"].Instance,
  3440. Name = "\0",
  3441. FontFace = Library.Font,
  3442. TextColor3 = FromRGB(100, 100, 100),
  3443. BorderColor3 = FromRGB(0, 0, 0),
  3444. Text = Option,
  3445. AutoButtonColor = false,
  3446. BackgroundTransparency = 1,
  3447. Size = UDim2New(1, -6, 0, 25), -- Shrunk size slightly to leave space for scrollbar
  3448. BorderSizePixel = 0,
  3449. TextSize = 14,
  3450. BackgroundColor3 = FromRGB(255, 255, 255)
  3451. }) OptionButton:AddToTheme({BackgroundColor3 = "Accent"})
  3452.  
  3453. local OptionData = {
  3454. Button = OptionButton,
  3455. Name = Option,
  3456. Selected = false
  3457. }
  3458.  
  3459. function OptionData:Toggle(Value)
  3460. if Value == "Active" then
  3461. OptionData.Button:Tween(nil, {BackgroundTransparency = 0, TextColor3 = FromRGB(0, 0, 0)})
  3462. else
  3463. OptionData.Button:Tween(nil, {BackgroundTransparency = 1, TextColor3 = FromRGB(100, 100, 100)})
  3464. end
  3465. end
  3466.  
  3467. function OptionData:Set()
  3468. OptionData.Selected = not OptionData.Selected
  3469.  
  3470. if Dropdown.Multi then
  3471. local Index = TableFind(Dropdown.Value, OptionData.Name)
  3472.  
  3473. if Index then
  3474. TableRemove(Dropdown.Value, Index)
  3475. else
  3476. TableInsert(Dropdown.Value, OptionData.Name)
  3477. end
  3478.  
  3479. OptionData:Toggle(Index and "Inactive" or "Active")
  3480.  
  3481. Library.Flags[Dropdown.Flag] = Dropdown.Value
  3482.  
  3483. local TextFormat = #Dropdown.Value > 0 and TableConcat(Dropdown.Value, ", ") or "..."
  3484. Items["Value"].Instance.Text = TextFormat
  3485. else
  3486. if OptionData.Selected then
  3487. Dropdown.Value = OptionData.Name
  3488. Library.Flags[Dropdown.Flag] = OptionData.Name
  3489.  
  3490. OptionData.Selected = true
  3491. OptionData:Toggle("Active")
  3492.  
  3493. for Index, Value in Dropdown.Options do
  3494. if Value ~= OptionData then
  3495. Value.Selected = false
  3496. Value:Toggle("Inactive")
  3497. end
  3498. end
  3499.  
  3500. Items["Value"].Instance.Text = OptionData.Name
  3501. else
  3502. Dropdown.Value = nil
  3503. Library.Flags[Dropdown.Flag] = nil
  3504.  
  3505. OptionData.Selected = false
  3506. OptionData:Toggle("Inactive")
  3507.  
  3508. Items["Value"].Instance.Text = "..."
  3509. end
  3510. end
  3511.  
  3512. if Dropdown.Callback then
  3513. Library:SafeCall(Dropdown.Callback, Dropdown.Value)
  3514. end
  3515. end
  3516.  
  3517. OptionData.Button:Connect("MouseButton1Down", function()
  3518. OptionData:Set()
  3519. end)
  3520.  
  3521. Dropdown.Options[OptionData.Name] = OptionData
  3522. return OptionData
  3523. end
  3524.  
  3525. function Dropdown:Remove(Option)
  3526. if Dropdown.Options[Option] then
  3527. Dropdown.Options[Option].Button:Clean()
  3528. Dropdown.Options[Option] = nil
  3529. end
  3530. end
  3531.  
  3532. function Dropdown:Refresh(List)
  3533. for Index, Value in Dropdown.Options do
  3534. Dropdown:Remove(Value.Name)
  3535. end
  3536.  
  3537. for Index, Value in List do
  3538. Dropdown:Add(Value)
  3539. end
  3540. end
  3541.  
  3542. Items["RealDropdown"]:Connect("MouseButton1Down", function()
  3543. Dropdown:SetOpen(not Dropdown.IsOpen)
  3544. end)
  3545.  
  3546. Library:Connect(UserInputService.InputBegan, function(Input)
  3547. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  3548. if Dropdown.IsOpen then
  3549. if Library:IsMouseOverFrame(Items["OptionHolder"]) then
  3550. return
  3551. end
  3552.  
  3553. Dropdown:SetOpen(false)
  3554. end
  3555. end
  3556. end)
  3557.  
  3558. Items["RealDropdown"]:Connect("Changed", function(Property)
  3559. if Property == "AbsolutePosition" and Dropdown.IsOpen then
  3560. Dropdown.IsOpen = not Library:IsClipped(Items["OptionHolder"].Instance, Dropdown.Section.Items["Section"].Instance.Parent)
  3561. Items["OptionHolder"].Instance.Visible = Dropdown.IsOpen
  3562. end
  3563. end)
  3564.  
  3565. for Index, Value in Dropdown.Items do
  3566. Dropdown:Add(Value)
  3567. end
  3568.  
  3569. if Dropdown.Default then
  3570. Dropdown:Set(Dropdown.Default)
  3571. end
  3572.  
  3573. Library.SetFlags[Dropdown.Flag] = function(Value)
  3574. Dropdown:Set(Value)
  3575. end
  3576.  
  3577. return Dropdown
  3578. end
  3579.  
  3580. Library.Sections.Label = function(self, Name)
  3581. local Label = {
  3582. Window = self.Window,
  3583. Page = self.Page,
  3584. Section = self,
  3585.  
  3586. Name = Name or "Label"
  3587. }
  3588.  
  3589. local Items = { } do
  3590. Items["Label"] = Instances:Create("Frame", {
  3591. Parent = Label.Section.Items["Content"].Instance,
  3592. Name = "\0",
  3593. BackgroundTransparency = 1,
  3594. BorderColor3 = FromRGB(0, 0, 0),
  3595. Size = UDim2New(1, 0, 0, 17),
  3596. BorderSizePixel = 0,
  3597. BackgroundColor3 = FromRGB(255, 255, 255)
  3598. })
  3599.  
  3600. Items["Text"] = Instances:Create("TextLabel", {
  3601. Parent = Items["Label"].Instance,
  3602. Name = "\0",
  3603. FontFace = Library.Font,
  3604. TextColor3 = FromRGB(100, 100, 100),
  3605. BorderColor3 = FromRGB(0, 0, 0),
  3606. Text = Label.Name,
  3607. AnchorPoint = Vector2New(0, 0.5),
  3608. Size = UDim2New(0, 0, 0, 15),
  3609. BackgroundTransparency = 1,
  3610. Position = UDim2New(0, 0, 0.5, 0),
  3611. BorderSizePixel = 0,
  3612. AutomaticSize = Enum.AutomaticSize.X,
  3613. TextSize = 14,
  3614. BackgroundColor3 = FromRGB(255, 255, 255)
  3615. })
  3616.  
  3617. Items["SubElements"] = Instances:Create("Frame", {
  3618. Parent = Items["Label"].Instance,
  3619. Name = "\0",
  3620. BorderColor3 = FromRGB(0, 0, 0),
  3621. AnchorPoint = Vector2New(1, 0),
  3622. BackgroundTransparency = 1,
  3623. Position = UDim2New(1, 0, 0, 0),
  3624. Size = UDim2New(0, 0, 1, 0),
  3625. BorderSizePixel = 0,
  3626. AutomaticSize = Enum.AutomaticSize.X,
  3627. BackgroundColor3 = FromRGB(255, 255, 255)
  3628. })
  3629.  
  3630. Instances:Create("UIListLayout", {
  3631. Parent = Items["SubElements"].Instance,
  3632. Name = "\0",
  3633. FillDirection = Enum.FillDirection.Horizontal,
  3634. HorizontalAlignment = Enum.HorizontalAlignment.Right,
  3635. Padding = UDimNew(0, 6),
  3636. SortOrder = Enum.SortOrder.LayoutOrder
  3637. })
  3638. end
  3639.  
  3640. function Label:SetText(Text)
  3641. Text = tostring(Text)
  3642. Items["Label"].Instance.Text = Text
  3643. end
  3644.  
  3645. function Label:SetVisibility(Bool)
  3646. Items["Label"].Instance.Visible = Bool
  3647. end
  3648.  
  3649. function Label:Colorpicker(Data)
  3650. Data = Data or { }
  3651.  
  3652. local Colorpicker = {
  3653. Window = Label.Window,
  3654. Page = Label.Page,
  3655. Section = Label.Section,
  3656.  
  3657. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  3658. Default = Data.Default or Data.default or Color3.fromRGB(255, 255, 255),
  3659. Callback = Data.Callback or Data.callback or function() end
  3660. }
  3661.  
  3662. local NewColorpicker, ColorpickerItems = Library:CreateColorpicker({
  3663. Parent = Items["SubElements"],
  3664. Page = Colorpicker.Page,
  3665. Section = Colorpicker.Section,
  3666. Flag = Colorpicker.Flag,
  3667. Default = Colorpicker.Default,
  3668. Callback = Colorpicker.Callback
  3669. })
  3670.  
  3671. return NewColorpicker
  3672. end
  3673.  
  3674. function Label:Keybind(Data)
  3675. Data = Data or { }
  3676.  
  3677. local Keybind = {
  3678. Window = Label.Window,
  3679. Page = Label.Page,
  3680. Section = Label.Section,
  3681.  
  3682. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  3683. Default = Data.Default or Data.default or Enum.KeyCode.E,
  3684. Callback = Data.Callback or Data.callback or function() end,
  3685. Mode = Data.Mode or Data.mode or "Toggle"
  3686. }
  3687.  
  3688. local NewKeybind = Library:CreateKeybind({
  3689. Parent = Items["SubElements"],
  3690. Page = Keybind.Page,
  3691. Section = Keybind.Section,
  3692. Flag = Keybind.Flag,
  3693. Default = Keybind.Default,
  3694. Mode = Keybind.Mode,
  3695. Callback = Keybind.Callback
  3696. })
  3697.  
  3698. return NewKeybind
  3699. end
  3700.  
  3701. return Label
  3702. end
  3703.  
  3704. Library.Sections.Textbox = function(self, Data)
  3705. Data = Data or { }
  3706.  
  3707. local Textbox = {
  3708. Window = self.Window,
  3709. Page = self.Page,
  3710. Section = self,
  3711.  
  3712. Flag = Data.Flag or Data.flag or Library:NextFlag(),
  3713. Default = Data.Default or Data.default or "",
  3714. Callback = Data.Callback or Data.callback or function() end,
  3715. Placeholder = Data.Placeholder or Data.placeholder or "Placeholder",
  3716. Numeric = Data.Numeric or Data.numeric or false,
  3717. Finished = Data.Finished or Data.finished or false,
  3718.  
  3719. Value = ""
  3720. }
  3721.  
  3722. local Items = { } do
  3723. Items["Textbox"] = Instances:Create("Frame", {
  3724. Parent = Textbox.Section.Items["Content"].Instance,
  3725. Name = "\0",
  3726. BackgroundTransparency = 1,
  3727. BorderColor3 = FromRGB(0, 0, 0),
  3728. Size = UDim2New(1, 0, 0, 25),
  3729. BorderSizePixel = 0,
  3730. BackgroundColor3 = FromRGB(255, 255, 255)
  3731. })
  3732.  
  3733. Items["Input"] = Instances:Create("TextBox", {
  3734. Parent = Items["Textbox"].Instance,
  3735. Name = "\0",
  3736. FontFace = Library.Font,
  3737. CursorPosition = -1,
  3738. TextColor3 = FromRGB(255, 255, 255),
  3739. BorderColor3 = FromRGB(0, 0, 0),
  3740. Text = "",
  3741. Size = UDim2New(1, 0, 1, 0),
  3742. ClipsDescendants = true,
  3743. BorderSizePixel = 0,
  3744. PlaceholderColor3 = FromRGB(100, 100, 100),
  3745. TextXAlignment = Enum.TextXAlignment.Left,
  3746. PlaceholderText = Textbox.Placeholder,
  3747. TextSize = 14,
  3748. BackgroundColor3 = FromRGB(30, 34, 34)
  3749. }) Items["Input"]:AddToTheme({BackgroundColor3 = "Element"})
  3750.  
  3751. Instances:Create("UICorner", {
  3752. Parent = Items["Input"].Instance,
  3753. Name = "\0",
  3754. CornerRadius = UDimNew(0, 4)
  3755. })
  3756.  
  3757. Instances:Create("UIStroke", {
  3758. Parent = Items["Input"].Instance,
  3759. Name = "\0",
  3760. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  3761. Color = FromRGB(56, 62, 62),
  3762. Thickness = 2
  3763. }):AddToTheme({Color = "Border 2"})
  3764.  
  3765. Instances:Create("UIPadding", {
  3766. Parent = Items["Input"].Instance,
  3767. Name = "\0",
  3768. PaddingLeft = UDimNew(0, 8)
  3769. })
  3770. end
  3771.  
  3772. function Textbox:Get()
  3773. return Textbox.Value
  3774. end
  3775.  
  3776. function Textbox:SetVisibility(Bool)
  3777. Items["Textbox"].Instance.Visible = Bool
  3778. end
  3779.  
  3780. function Textbox:Set(Value)
  3781. if Textbox.Numeric then
  3782. if (not tonumber(Value)) and StringLen(tostring(Value)) > 0 then
  3783. Value = Textbox.Value
  3784. end
  3785. end
  3786.  
  3787. Textbox.Value = Value
  3788. Items["Input"].Instance.Text = Value
  3789. Library.Flags[Textbox.Flag] = Value
  3790.  
  3791. if Textbox.Callback then
  3792. Library:SafeCall(Textbox.Callback, Value)
  3793. end
  3794. end
  3795.  
  3796. if Textbox.Finished then
  3797. Items["Input"]:Connect("FocusLost", function(PressedEnterQuestionMark)
  3798. if PressedEnterQuestionMark then
  3799. Textbox:Set(Items["Input"].Instance.Text)
  3800. end
  3801. end)
  3802. else
  3803. Items["Input"].Instance:GetPropertyChangedSignal("Text"):Connect(function()
  3804. Textbox:Set(Items["Input"].Instance.Text)
  3805. end)
  3806. end
  3807.  
  3808. if Textbox.Default then
  3809. Textbox:Set(Textbox.Default)
  3810. end
  3811.  
  3812. Library.SetFlags[Textbox.Flag] = function(Value)
  3813. Textbox:Set(Value)
  3814. end
  3815.  
  3816. return Textbox
  3817. end
  3818. end
  3819.  
  3820. Library.CreateSettingsPage = function(self, Window)
  3821. local SettingsPage = Window:Page({Name = "Settings", Icon = "72732892493295"}) do
  3822. local ConfigsSubPage = SettingsPage:SubPage({Name = "Configs"})
  3823. local ThemingSubPage = SettingsPage:SubPage({Name = "Theming"})
  3824. local SettingsSubPage = SettingsPage:SubPage({Name = "Settings"})
  3825.  
  3826. do -- Configs
  3827. local ConfigsSection = ConfigsSubPage:Section({Name = "Configs", Side = 1, Icon = "97491613646216"})
  3828.  
  3829. local ConfigName = ""
  3830. local ConfigSelected
  3831.  
  3832. local ConfigsList = ConfigsSection:Dropdown({
  3833. Name = "Configs",
  3834. Flag = "ConfigsList",
  3835. Items = { },
  3836. Multi = false,
  3837. Callback = function(Value)
  3838. ConfigSelected = Value
  3839. end
  3840. })
  3841.  
  3842. local AutoloadDropdown = ConfigsSection:Dropdown({
  3843. Name = "Auto Load Config",
  3844. Flag = "AutoloadList",
  3845. Items = { },
  3846. Multi = false,
  3847. Callback = function(Value)
  3848. local path = Library.Folders.Autoload .. "/autoload.txt"
  3849. if Value and Value ~= "None" then
  3850. writefile(path, Value)
  3851. elseif Value == "None" then
  3852. if isfile(path) then
  3853. delfile(path)
  3854. end
  3855. end
  3856. end
  3857. })
  3858.  
  3859. ConfigsSection:Textbox({
  3860. Default = "",
  3861. Flag = "ConfigName",
  3862. Placeholder = "Config name",
  3863. Callback = function(Value)
  3864. ConfigName = Value
  3865. end
  3866. })
  3867.  
  3868. ConfigsSection:Button({
  3869. Name = "Create",
  3870. Callback = function()
  3871. if ConfigName and ConfigName ~= "" then
  3872. if not isfile(Library.Folders.Configs .. "/" .. ConfigName .. ".json") then
  3873. writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig())
  3874. Library:RefreshConfigsList({ConfigsList, AutoloadDropdown})
  3875. end
  3876. end
  3877. end})
  3878.  
  3879. ConfigsSection:Button({
  3880. Name = "Delete",
  3881. Callback = function()
  3882. if ConfigSelected and ConfigSelected ~= "None" then
  3883. Library:DeleteConfig(ConfigSelected)
  3884. Library:RefreshConfigsList({ConfigsList, AutoloadDropdown})
  3885. end
  3886. end})
  3887.  
  3888. ConfigsSection:Button({
  3889. Name = "Load",
  3890. Callback = function()
  3891. if ConfigSelected and ConfigSelected ~= "None" then
  3892. local success = Library:LoadConfig(readfile(Library.Folders.Configs .. "/" .. ConfigSelected))
  3893. if success then
  3894. -- Removes .json from the name for a cleaner notification
  3895. local cleanName = string.gsub(ConfigSelected, "%.json$", "")
  3896. Library:Notification("Successfully loaded: " .. cleanName, 3)
  3897. else
  3898. Library:Notification("Failed to load config.", 3)
  3899. end
  3900. end
  3901. end})
  3902.  
  3903. ConfigsSection:Button({
  3904. Name = "Save",
  3905. Callback = function()
  3906. if ConfigName and ConfigName ~= "" then
  3907. writefile(Library.Folders.Configs .. "/" .. ConfigName .. ".json", Library:GetConfig())
  3908. Library:RefreshConfigsList({ConfigsList, AutoloadDropdown})
  3909. end
  3910. end})
  3911.  
  3912. ConfigsSection:Button({
  3913. Name = "Refresh",
  3914. Callback = function()
  3915. Library:RefreshConfigsList({ConfigsList, AutoloadDropdown})
  3916. end})
  3917.  
  3918. Library:RefreshConfigsList({ConfigsList, AutoloadDropdown})
  3919.  
  3920. task.spawn(function()
  3921. local autoloadPath = Library.Folders.Autoload .. "/autoload.txt"
  3922.  
  3923. if isfile(autoloadPath) then
  3924. local configName = readfile(autoloadPath)
  3925. local configPath = Library.Folders.Configs .. "/" .. configName
  3926.  
  3927. if isfile(configPath) then
  3928. task.wait(3)
  3929. local success = Library:LoadConfig(readfile(configPath))
  3930. AutoloadDropdown:Set(configName)
  3931.  
  3932. if success then
  3933. local cleanName = string.gsub(configName, "%.json$", "")
  3934. Library:Notification("Auto-loaded: " .. cleanName, 4)
  3935. end
  3936. else
  3937. AutoloadDropdown:Set("None")
  3938. end
  3939. else
  3940. AutoloadDropdown:Set("None")
  3941. end
  3942. end)
  3943. end
  3944.  
  3945. do -- Theming
  3946. local ThemingSection = ThemingSubPage:Section({Name = "Theming", Icon = "131595494666590", Side = 1})
  3947. for Index, Value in Library.Theme do
  3948. ThemingSection:Label(Index):Colorpicker({
  3949. Flag = Index.."Theme",
  3950. Default = Value,
  3951. Callback = function(Value)
  3952. Library.Theme[Index] = Value
  3953. Library:ChangeTheme(Index, Value)
  3954. end
  3955. })
  3956. end
  3957. end
  3958.  
  3959. do -- Settings
  3960. local SettingsSection = SettingsSubPage:Section({Name = "Settings", Icon = "72732892493295", Side = 1})
  3961.  
  3962. SettingsSection:Button({
  3963. Name = "Unload",
  3964. Callback = function()
  3965. Library:Unload()
  3966. end
  3967. })
  3968.  
  3969. SettingsSection:Label("Menu Keybind"):Keybind({
  3970. Name = "Menu Keybind",
  3971. Flag = "MenuKeybind",
  3972. Default = Library.MenuKeybind,
  3973. Mode = "Toggle",
  3974. Callback = function()
  3975. Library.MenuKeybind = Library.Flags["MenuKeybind"].Key
  3976. end
  3977. })
  3978.  
  3979. SettingsSection:Slider({
  3980. Name = "Tween Speed",
  3981. Default = 0.3,
  3982. Flag = "Tween Speed",
  3983. Decimals = 0.01,
  3984. Suffix = "s",
  3985. Max = 10,
  3986. Min = 0,
  3987. Callback = function(Value)
  3988. Library.Tween.Time = Value
  3989. end
  3990. })
  3991.  
  3992. SettingsSection:Dropdown({
  3993. Name = "Tween Style",
  3994. Flag = "Tween style",
  3995. Items = { "Linear", "Quad", "Quart", "Back", "Bounce", "Circular", "Cubic", "Elastic", "Exponential", "Sine", "Quint" },
  3996. Default = "Quart",
  3997. Callback = function(Value)
  3998. if not Value then Value = "Quint" end
  3999. Library.Tween.Style = Enum.EasingStyle[Value]
  4000. end
  4001. })
  4002.  
  4003. SettingsSection:Dropdown({
  4004. Name = "Tween Direction",
  4005. Flag = "Tween direction",
  4006. Items = { "In", "Out", "InOut" },
  4007. Default = "Out",
  4008. Callback = function(Value)
  4009. if not Value then Value = "Out" end
  4010. Library.Tween.Direction = Enum.EasingDirection[Value]
  4011. end
  4012. })
  4013. end
  4014. end
  4015. end
  4016. end
  4017.  
  4018. getgenv().Library = Library
  4019. return Library
Advertisement
Add Comment
Please, Sign In to add comment