Messi33536086

Untitled

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