Messi33536086

Untitled

Oct 18th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 114.16 KB | None | 0 0
  1. -- ++++++++ WAX BUNDLED DATA BELOW ++++++++ --
  2.  
  3. -- Will be used later for getting flattened globals
  4. local ImportGlobals
  5.  
  6. -- Holds direct closure data (defining this before the DOM tree for line debugging etc)
  7. local ClosureBindings = {
  8. function()local wax,script,require=ImportGlobals(1)local ImportGlobals return (function(...)wait(1)
  9. function generateRandomString(length)
  10. local charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_=+[]{}|;:',.<>?/`~"
  11. local randomString = ""
  12. math.randomseed(os.time()) -- Seed the random generator
  13.  
  14. for i = 1, length do
  15. local randomIndex = math.random(1, #charset)
  16. randomString = randomString .. charset:sub(randomIndex, randomIndex)
  17. end
  18.  
  19. return randomString
  20. end
  21.  
  22. local UserInputService = game:GetService("UserInputService")
  23. local TweenService = game:GetService("TweenService")
  24.  
  25. local ElementsTable = require(script.elements)
  26. local Tools = require(script.tools)
  27. local Components = script.components
  28.  
  29. local Create = Tools.Create
  30. local AddConnection = Tools.AddConnection
  31. local AddScrollAnim = Tools.AddScrollAnim
  32. local isMobile = Tools.isMobile()
  33. local CurrentThemeProps = Tools.GetPropsCurrentTheme()
  34.  
  35. local function MakeDraggable(DragPoint, Main)
  36. -- if isMobile then return end
  37. local Dragging, DragInput, MousePos, FramePos = false
  38. AddConnection(DragPoint.InputBegan, function(Input)
  39. if
  40. Input.UserInputType == Enum.UserInputType.MouseButton1
  41. or Input.UserInputType == Enum.UserInputType.Touch
  42. then
  43. Dragging = true
  44. MousePos = Input.Position
  45. FramePos = Main.Position
  46.  
  47. AddConnection(Input.Changed, function()
  48. if Input.UserInputState == Enum.UserInputState.End then
  49. Dragging = false
  50. end
  51. end)
  52. end
  53. end)
  54. AddConnection(DragPoint.InputChanged, function(Input)
  55. if Input.UserInputType == Enum.UserInputType.MouseMovement then
  56. DragInput = Input
  57. end
  58. end)
  59. AddConnection(UserInputService.InputChanged, function(Input)
  60. if
  61. (Input.UserInputType == Enum.UserInputType.MouseMovement or Input.UserInputType == Enum.UserInputType.Touch)
  62. and Dragging
  63. then
  64. local Delta = Input.Position - MousePos
  65. Main.Position =
  66. UDim2.new(FramePos.X.Scale, FramePos.X.Offset + Delta.X, FramePos.Y.Scale, FramePos.Y.Offset + Delta.Y)
  67. end
  68. end)
  69. end
  70.  
  71. local Library = {
  72. Window = nil,
  73. Flags = {},
  74. Signals = {},
  75. ToggleBind = nil,
  76. }
  77.  
  78.  
  79.  
  80. local GUI = Create("ScreenGui", {
  81. Name = generateRandomString(16),
  82. Parent = gethui(), --game.Players.LocalPlayer.PlayerGui,
  83. ResetOnSpawn = false,
  84. ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
  85. })
  86.  
  87. require(Components.notif):Init(GUI)
  88.  
  89. function Library:SetTheme(themeName)
  90. Tools.SetTheme(themeName)
  91. end
  92.  
  93. function Library:GetTheme()
  94. return Tools.GetPropsCurrentTheme()
  95. end
  96.  
  97. function Library:AddTheme(themeName, themeProps)
  98. Tools.AddTheme(themeName, themeProps)
  99. end
  100.  
  101. function Library:IsRunning()
  102. return GUI.Parent == gethui() -- game.Players.LocalPlayer.PlayerGui -- testing ver with playergui
  103. end
  104.  
  105. task.spawn(function()
  106. while Library:IsRunning() do
  107. task.wait()
  108. end
  109. for i, Connection in pairs(Tools.Signals) do
  110. Connection:Disconnect()
  111. end
  112. end)
  113.  
  114. local Elements = {}
  115. Elements.__index = Elements
  116. Elements.__namecall = function(Table, Key, ...)
  117. return Elements[Key](...)
  118. end
  119.  
  120. for _, ElementComponent in ipairs(ElementsTable) do
  121. assert(ElementComponent.__type, "ElementComponent missing __type")
  122. assert(type(ElementComponent.New) == "function", "ElementComponent missing New function")
  123.  
  124. Elements["Add" .. ElementComponent.__type] = function(self, Idx, Config)
  125. ElementComponent.Container = self.Container
  126. ElementComponent.Type = self.Type
  127. ElementComponent.ScrollFrame = self.ScrollFrame
  128. ElementComponent.Library = Library -- Assign Library correctly
  129.  
  130. return ElementComponent:New(Idx, Config)
  131. end
  132. end
  133.  
  134. Library.Elements = Elements
  135.  
  136. function Library:Callback(Callback, ...)
  137. local success, result = pcall(Callback, ...)
  138.  
  139. if success then
  140. -- print(`Callback executed successfully!`)
  141. return result
  142. else
  143. local errorMessage = tostring(result)
  144. local errorLine = string.match(errorMessage, ":(%d+):")
  145. local errorInfo = `Callback execution failed.\n`
  146. errorInfo = errorInfo .. `Error: {errorMessage}\n`
  147.  
  148. if errorLine then
  149. errorInfo = errorInfo .. `Occurred on line: {errorLine}\n`
  150. end
  151.  
  152. errorInfo = errorInfo
  153. .. `Possible Fix: Please check the function implementation for potential issues such as invalid arguments or logic errors at the indicated line number.`
  154. print(errorInfo)
  155. end
  156. end
  157.  
  158. function Library:Notification(titleText, descriptionText, duration)
  159. require(Components.notif):ShowNotification(titleText, descriptionText, duration)
  160. end
  161.  
  162. function Library:Dialog(config)
  163. return require(Components.dialog):Create(config, self.LoadedWindow)
  164. end
  165.  
  166. function Library:Load(cfgs)
  167.  
  168. cfgs = cfgs or {}
  169. cfgs.Title = cfgs.Title or "Window"
  170. cfgs.ToggleButton = cfgs.ToggleButton or ""
  171. cfgs.BindGui = cfgs.BindGui or Enum.KeyCode.RightControl
  172.  
  173. if Library.Window then
  174. print("Cannot create more than one window.")
  175. GUI:Destroy()
  176. end
  177.  
  178. Library.Window = GUI
  179.  
  180. local canvas_group = Create("CanvasGroup", {
  181. AnchorPoint = Vector2.new(0.5, 0.5),
  182. -- BackgroundColor3 = Color3.fromRGB(9, 9, 9),
  183. ThemeProps = {
  184. BackgroundColor3 = "maincolor",
  185. },
  186. Position = UDim2.new(0.5, 0, 0.3, 0),
  187. Size = UDim2.new(0, 650, 0, 400),
  188. Parent = GUI,
  189. Visible = false
  190. }, {
  191. Create("UICorner", {
  192. CornerRadius = UDim.new(0, 6),
  193. }),
  194. })
  195.  
  196. -- shared.Window = canvas_group
  197.  
  198. if isMobile then
  199. canvas_group.Size = UDim2.new(0.8, 0, 0.8, 0)
  200. end
  201.  
  202. local togglebtn = Create("ImageButton", {
  203. AnchorPoint = Vector2.new(0.5, 0),
  204. AutoButtonColor = false,
  205. ThemeProps = {
  206. BackgroundColor3 = "maincolor",
  207. },
  208. Position = UDim2.new(0.5, 8, 0, 0),
  209. Size = UDim2.new(0, 45, 0, 45),
  210. Parent = GUI,
  211. Image = cfgs.ToggleButton,
  212. }, {
  213. Create("UICorner", {
  214. CornerRadius = UDim.new(0, 6),
  215. }),
  216. Create("UIStroke", {
  217. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  218. ThemeProps = {
  219. Color = "bordercolor",
  220. },
  221. Enabled = true,
  222. LineJoinMode = Enum.LineJoinMode.Round,
  223. Thickness = 1,
  224. Archivable = true,
  225. }),
  226. })
  227.  
  228. local function ToggleVisibility()
  229. local isVisible = canvas_group.Visible
  230. local endPosition = isVisible and UDim2.new(0.5, 0, -1, 0) or UDim2.new(0.5, 0, 0.5, 0)
  231. local fadeTo = isVisible and 1 or 0
  232.  
  233. local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
  234.  
  235. local positionTween = TweenService:Create(canvas_group, tweenInfo, { Position = endPosition })
  236. -- local fadeTween = TweenService:Create(canvas_group, tweenInfo, { BackgroundTransparency = fadeTo })
  237. -- local toggleFadeTween = TweenService:Create(togglebtn, tweenInfo, { BackgroundTransparency = fadeTo })
  238. -- local toggleFadeSTween = TweenService:Create(togglebtn.UIStroke, tweenInfo, { Transparency = fadeTo })
  239.  
  240. canvas_group.Visible = true
  241. togglebtn.Visible = false
  242.  
  243. positionTween:Play()
  244. -- fadeTween:Play()
  245. -- toggleFadeTween:Play()
  246. -- toggleFadeSTween:Play()
  247.  
  248.  
  249. positionTween.Completed:Connect(function()
  250. if isVisible then
  251. canvas_group.Visible = false
  252. togglebtn.Visible = true
  253. end
  254. end)
  255. end
  256.  
  257. ToggleVisibility()
  258. -- ToggleVisibility()
  259.  
  260. MakeDraggable(togglebtn, togglebtn)
  261. AddConnection(togglebtn.MouseButton1Click, ToggleVisibility)
  262. AddConnection(UserInputService.InputBegan, function(value)
  263. if value.KeyCode == cfgs.BindGui then
  264. ToggleVisibility()
  265. end
  266. end)
  267.  
  268. local top_frame = Create("Frame", {
  269. ThemeProps = {
  270. BackgroundColor3 = "maincolor",
  271. },
  272. BorderColor3 = Color3.fromRGB(39, 39, 42),
  273. Size = UDim2.new(1, 0, 0, 40),
  274. ZIndex = 9,
  275. Parent = canvas_group,
  276. }, {
  277. Create("UIStroke", {
  278. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  279. ThemeProps = {
  280. Color = "bordercolor",
  281. },
  282. Thickness = 1,
  283. }),
  284. })
  285.  
  286. local title = Create("TextLabel", {
  287. Font = Enum.Font.GothamMedium,
  288. RichText = true,
  289. Text = cfgs.Title,
  290. ThemeProps = {
  291. TextColor3 = "titlecolor",
  292. BackgroundColor3 = "maincolor",
  293. },
  294. BorderSizePixel = 0,
  295. TextSize = 15,
  296. TextXAlignment = Enum.TextXAlignment.Left,
  297. BackgroundTransparency = 1,
  298. Position = UDim2.new(0, 14, 0, 0),
  299. Size = UDim2.new(0, 200, 0, 40),
  300. ZIndex = 10,
  301. Parent = top_frame,
  302. })
  303.  
  304. local minimizebtn = Create("TextButton", {
  305. Text = "",
  306. BackgroundTransparency = 1,
  307. ThemeProps = {
  308. BackgroundColor3 = "maincolor",
  309. },
  310. BorderSizePixel = 0,
  311. AnchorPoint = Vector2.new(1, 0.5),
  312. Position = UDim2.new(1, -36, 0.5, 0),
  313. Size = UDim2.new(0, 28, 0, 28),
  314. ZIndex = 10,
  315. Parent = top_frame,
  316. }, {
  317. Create("ImageLabel", {
  318. Image = "rbxassetid://15269257100",
  319. ImageRectOffset = Vector2.new(514, 257),
  320. ImageRectSize = Vector2.new(256, 256),
  321. AnchorPoint = Vector2.new(0.5, 0.5),
  322. BackgroundTransparency = 1,
  323. Position = UDim2.new(0.5, 0, 0.5, 0),
  324. Size = UDim2.new(1, -10, 1, -10),
  325. ThemeProps = {
  326. BackgroundColor3 = "maincolor",
  327. },
  328. BorderSizePixel = 0,
  329. ZIndex = 11,
  330. }),
  331. })
  332.  
  333. local closebtn = Create("TextButton", {
  334. Text = "",
  335. BackgroundTransparency = 1,
  336. ThemeProps = {
  337. BackgroundColor3 = "maincolor",
  338. },
  339. BorderSizePixel = 0,
  340. AnchorPoint = Vector2.new(1, 0.5),
  341. Position = UDim2.new(1, -8, 0.5, 0),
  342. Size = UDim2.new(0, 28, 0, 28),
  343. ZIndex = 10,
  344. RichText = true,
  345. Parent = top_frame,
  346. }, {
  347. Create("ImageLabel", {
  348. Image = "rbxassetid://15269329696",
  349. ImageRectOffset = Vector2.new(0, 514),
  350. ImageRectSize = Vector2.new(256, 256),
  351. AnchorPoint = Vector2.new(0.5, 0.5),
  352. BackgroundTransparency = 1,
  353. Position = UDim2.new(0.5, 0, 0.5, 0),
  354. Size = UDim2.new(1, -10, 1, -10),
  355. ThemeProps = {
  356. BackgroundColor3 = "maincolor",
  357. },
  358. BorderSizePixel = 0,
  359. ZIndex = 11,
  360. }),
  361. })
  362.  
  363. AddConnection(minimizebtn.MouseButton1Click, ToggleVisibility)
  364. AddConnection(closebtn.MouseButton1Click, function()
  365. canvas_group:Destroy()
  366. togglebtn:Destroy()
  367. end)
  368.  
  369. local tab_frame = Create("Frame", {
  370. BackgroundTransparency = 1,
  371. ThemeProps = {
  372. BackgroundColor3 = "maincolor",
  373. },
  374. BorderSizePixel = 0,
  375. BorderColor3 = Color3.fromRGB(39, 39, 42),
  376. Position = UDim2.new(0, 0, 0, 40),
  377. Size = UDim2.new(0, 140, 1, -40),
  378. Parent = canvas_group,
  379. }, {
  380. Create("UIStroke", {
  381. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  382. -- Color = Color3.fromRGB(39, 39, 42),
  383. ThemeProps = {
  384. Color = "bordercolor",
  385. },
  386. Thickness = 1,
  387. }),
  388. })
  389.  
  390. local TabHolder = Create("ScrollingFrame", {
  391. ThemeProps = {
  392. ScrollBarImageColor3 = "scrollcolor",
  393. BackgroundColor3 = "maincolor",
  394. },
  395. ScrollBarThickness = 2,
  396. ScrollBarImageTransparency = 1,
  397. CanvasSize = UDim2.new(0, 0, 0, 0),
  398. BackgroundTransparency = 1,
  399. BorderSizePixel = 0,
  400. Size = UDim2.new(1, 0, 1, 0),
  401. Parent = tab_frame,
  402. }, {
  403. Create("UIPadding", {
  404. PaddingBottom = UDim.new(0, 6),
  405. PaddingTop = UDim.new(0, 0),
  406. }),
  407. Create("UIListLayout", {
  408. SortOrder = Enum.SortOrder.LayoutOrder,
  409. }),
  410. })
  411.  
  412. AddConnection(TabHolder.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  413. TabHolder.CanvasSize = UDim2.new(0, 0, 0, TabHolder.UIListLayout.AbsoluteContentSize.Y + 28)
  414. end)
  415.  
  416. AddScrollAnim(TabHolder)
  417.  
  418. local containerFolder = Create("Folder", {
  419. Parent = canvas_group,
  420. })
  421.  
  422. if not isMobile then
  423. MakeDraggable(top_frame, canvas_group)
  424. end
  425.  
  426. Library.LoadedWindow = canvas_group
  427.  
  428. local Tabs = {}
  429.  
  430. local TabModule = require(Components.tab):Init(containerFolder)
  431. function Tabs:AddTab(title)
  432. return TabModule:New(title, TabHolder)
  433. end
  434. function Tabs:SelectTab(Tab)
  435. Tab = Tab or 1
  436. TabModule:SelectTab(Tab)
  437. end
  438.  
  439. return Tabs
  440. end
  441. return Library
  442.  
  443. end)() end,
  444. [3] = function()local wax,script,require=ImportGlobals(3)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  445. local ButtonComponent = require(script.Parent.Parent.elements.buttons)
  446.  
  447. local Create = Tools.Create
  448.  
  449. local DialogModule = {}
  450. local ActiveDialog = nil
  451.  
  452. function DialogModule:Create(config, parent)
  453. -- Remove existing dialog if any
  454. if ActiveDialog then
  455. ActiveDialog:Destroy()
  456. end
  457.  
  458. local scrolling_frame = Instance.new("ScrollingFrame")
  459. scrolling_frame.AutomaticCanvasSize = Enum.AutomaticSize.Y
  460. scrolling_frame.CanvasSize = UDim2.new(0, 0, 0, 0)
  461. scrolling_frame.ScrollBarImageColor3 = Color3.new(0.109804, 0.109804, 0.117647)
  462. scrolling_frame.ScrollBarThickness = 4
  463. scrolling_frame.Active = true
  464. scrolling_frame.BackgroundColor3 = Color3.new(0, 0, 0)
  465. scrolling_frame.BackgroundTransparency = 0.1
  466. scrolling_frame.BorderColor3 = Color3.new(0, 0, 0)
  467. scrolling_frame.BorderSizePixel = 0
  468. scrolling_frame.Size = UDim2.new(1, 0, 1, 0)
  469. scrolling_frame.Visible = true
  470. scrolling_frame.ZIndex = 100
  471. scrolling_frame.Parent = parent
  472.  
  473. -- Add a full-frame button to prevent clicks passing through
  474. local blocker = Instance.new("TextButton")
  475. blocker.Size = UDim2.new(1, 0, 1, 0)
  476. blocker.Position = UDim2.new(0, 0, 0, 0)
  477. blocker.BackgroundTransparency = 1 -- Fully transparent
  478. blocker.Text = "" -- No text
  479. blocker.AutoButtonColor = false -- Prevents hover effects
  480. blocker.Parent = scrolling_frame
  481.  
  482. local uipadding_3 = Instance.new("UIPadding")
  483. uipadding_3.PaddingBottom = UDim.new(0, 45)
  484. uipadding_3.PaddingTop = UDim.new(0, 45)
  485. uipadding_3.Parent = scrolling_frame
  486.  
  487. local dialog = Create("CanvasGroup", {
  488. AnchorPoint = Vector2.new(0.5, 0),
  489. AutomaticSize = Enum.AutomaticSize.Y,
  490. Position = UDim2.new(0.5, 0, 0, 0),
  491. Size = UDim2.new(0, 400, 0, 0),
  492. ThemeProps = {
  493. BackgroundColor3 = "maincolor",
  494. },
  495. Parent = scrolling_frame,
  496. }, {
  497. Create("UICorner", { CornerRadius = UDim.new(0, 6) }),
  498. Create("UIStroke", {
  499. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  500. ThemeProps = { Color = "bordercolor" },
  501. Thickness = 1,
  502. }),
  503. })
  504.  
  505. local uilist_layout = Instance.new("UIListLayout")
  506. uilist_layout.SortOrder = Enum.SortOrder.LayoutOrder
  507. uilist_layout.Parent = dialog
  508.  
  509. -- Create top bar with title
  510. Create("Frame", {
  511. Size = UDim2.new(1, 0, 0, 40),
  512. ThemeProps = { BackgroundColor3 = "maincolor" },
  513. Parent = dialog,
  514. }, {
  515. Create("UIStroke", {
  516. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  517. ThemeProps = { Color = "bordercolor" },
  518. Thickness = 1,
  519. }),
  520. Create("TextLabel", {
  521. Font = Enum.Font.GothamMedium,
  522. Text = config.Title,
  523. TextSize = 16,
  524. TextXAlignment = Enum.TextXAlignment.Left,
  525. Position = UDim2.new(0, 12, 0, 0),
  526. Size = UDim2.new(1, -24, 1, 0),
  527. BackgroundTransparency = 1,
  528. ThemeProps = { TextColor3 = "titlecolor" },
  529. }),
  530. })
  531.  
  532. -- Create content container
  533. local content = Create("TextLabel", {
  534. Text = config.Content,
  535. TextSize = 14,
  536. Font = Enum.Font.Gotham,
  537. TextWrapped = true,
  538. TextXAlignment = Enum.TextXAlignment.Left,
  539. TextYAlignment = Enum.TextYAlignment.Top,
  540. Size = UDim2.new(1, -24, 0, 0),
  541. AutomaticSize = Enum.AutomaticSize.Y,
  542. Position = UDim2.new(0, 12, 0, 50),
  543. RichText = true,
  544. BackgroundTransparency = 1,
  545. ThemeProps = { TextColor3 = "descriptioncolor" },
  546. Parent = dialog,
  547. })
  548.  
  549. local uipadding = Instance.new("UIPadding")
  550. uipadding.PaddingBottom = UDim.new(0, 8)
  551. uipadding.PaddingLeft = UDim.new(0, 12)
  552. uipadding.PaddingRight = UDim.new(0, 12)
  553. uipadding.PaddingTop = UDim.new(0, 8)
  554. uipadding.Parent = content
  555.  
  556. -- Create button container
  557. local buttonContainer = Create("Frame", {
  558. Size = UDim2.new(1, 0, 0, 52),
  559. AutomaticSize = Enum.AutomaticSize.Y,
  560. ThemeProps = { BackgroundColor3 = "maincolor" },
  561. Parent = dialog,
  562. }, {
  563. Create("UIStroke", {
  564. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  565. ThemeProps = { Color = "bordercolor" },
  566. Thickness = 1,
  567. }),
  568. Create("UIPadding", {
  569. PaddingTop = UDim.new(0, 10),
  570. PaddingBottom = UDim.new(0, 10),
  571. PaddingLeft = UDim.new(0, 12),
  572. PaddingRight = UDim.new(0, 12),
  573. }),
  574. Create("UIListLayout", {
  575. Padding = UDim.new(0, 8),
  576. FillDirection = Enum.FillDirection.Horizontal,
  577. HorizontalAlignment = Enum.HorizontalAlignment.Right,
  578. SortOrder = Enum.SortOrder.LayoutOrder,
  579. }),
  580. })
  581.  
  582. -- Add buttons
  583. for i, buttonConfig in ipairs(config.Buttons) do
  584. local wrappedCallback = function()
  585. buttonConfig.Callback()
  586. scrolling_frame:Destroy()
  587. end
  588.  
  589. -- Create a new button instance with the container
  590. local button = setmetatable({
  591. Container = buttonContainer
  592. }, ButtonComponent):New({
  593. Title = buttonConfig.Title,
  594. Variant = buttonConfig.Variant or (i == 1 and "Primary" or "Ghost"),
  595. Callback = wrappedCallback,
  596. })
  597. end
  598.  
  599. ActiveDialog = scrolling_frame
  600. return dialog
  601. end
  602.  
  603.  
  604. return DialogModule
  605.  
  606. end)() end,
  607. [4] = function()local wax,script,require=ImportGlobals(4)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  608. local Create = Tools.Create
  609.  
  610. return function(title, desc, parent)
  611. local Element = {}
  612. Element.Frame = Create("TextButton", {
  613. Font = Enum.Font.SourceSans,
  614. Text = "",
  615. Name = "Element",
  616. TextColor3 = Color3.fromRGB(0, 0, 0),
  617. TextSize = 14,
  618. AutomaticSize = Enum.AutomaticSize.Y,
  619.  
  620. BackgroundTransparency = 1,
  621. ThemeProps = {
  622. BackgroundColor3 = "maincolor",
  623. },
  624. BorderColor3 = Color3.fromRGB(0, 0, 0),
  625. BorderSizePixel = 0,
  626. Position = UDim2.new(0, 0, 0.519230783, 0),
  627. Size = UDim2.new(1, 0, 0, 0),
  628. Visible = true,
  629. Parent = parent,
  630. }, {
  631. Create("UIListLayout", {
  632. Padding = UDim.new(0, 6),
  633. SortOrder = Enum.SortOrder.LayoutOrder,
  634. }, {}),
  635. })
  636.  
  637. Element.topbox = Create("Frame", {
  638. AutomaticSize = Enum.AutomaticSize.Y,
  639.  
  640. BackgroundTransparency = 1,
  641. ThemeProps = {
  642. BackgroundColor3 = "maincolor",
  643. },
  644. BorderColor3 = Color3.fromRGB(0, 0, 0),
  645. BorderSizePixel = 0,
  646. Size = UDim2.new(1, 0, 0, 0),
  647. Visible = true,
  648. Parent = Element.Frame,
  649. })
  650.  
  651. local name = Create("TextLabel", {
  652. Font = Enum.Font.Gotham,
  653. LineHeight = 1.2,
  654. RichText = true,
  655. Text = title,
  656. ThemeProps = {
  657. TextColor3 = "titlecolor",
  658. BackgroundColor3 = "maincolor",
  659. },
  660. TextSize = 16,
  661. TextTruncate = Enum.TextTruncate.AtEnd,
  662. TextWrapped = true,
  663. TextXAlignment = Enum.TextXAlignment.Left,
  664. AutomaticSize = Enum.AutomaticSize.Y,
  665.  
  666. BackgroundTransparency = 1,
  667. BorderColor3 = Color3.fromRGB(0, 0, 0),
  668. BorderSizePixel = 0,
  669. Size = UDim2.new(1, 0, 0, 0),
  670. Visible = true,
  671. Parent = Element.topbox,
  672. Name = "Title",
  673. }, {
  674. Create("UIPadding", {
  675. PaddingBottom = UDim.new(0, 0),
  676. PaddingLeft = UDim.new(0, 0),
  677. PaddingRight = UDim.new(0, 36),
  678. PaddingTop = UDim.new(0, 2),
  679. Archivable = true,
  680. }),
  681. })
  682.  
  683. local description = Create("TextLabel", {
  684. Font = Enum.Font.Gotham,
  685. RichText = true,
  686. Name = "Description",
  687. -- TextColor3 = Color3.fromRGB(168, 168, 168),
  688. ThemeProps = {
  689. TextColor3 = "elementdescription",
  690. BackgroundColor3 = "maincolor",
  691. },
  692. TextSize = 14,
  693. TextWrapped = true,
  694. TextXAlignment = Enum.TextXAlignment.Left,
  695. AutomaticSize = Enum.AutomaticSize.Y,
  696. Text = desc,
  697. BackgroundTransparency = 1,
  698. BorderColor3 = Color3.fromRGB(0, 0, 0),
  699. BorderSizePixel = 0,
  700. Position = UDim2.new(0, 0, 0, 23),
  701. Size = UDim2.new(1, 0, 0, 0),
  702. Visible = true,
  703. Parent = Element.Frame,
  704. }, {})
  705.  
  706. function Element:SetTitle(Set)
  707. name.Text = Set
  708. end
  709.  
  710. function Element:SetDesc(Set)
  711. if Set == nil then
  712. Set = ""
  713. end
  714. if Set == "" then
  715. description.Visible = false
  716. else
  717. description.Visible = true
  718. end
  719. description.Text = Set
  720. end
  721.  
  722. Element:SetDesc(desc)
  723. Element:SetTitle(title)
  724.  
  725. function Element:Destroy()
  726. Element.Frame:Destroy()
  727. end
  728.  
  729. return Element
  730. end
  731.  
  732. end)() end,
  733. [5] = function()local wax,script,require=ImportGlobals(5)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  734. local TweenService = game:GetService("TweenService")
  735.  
  736. local Create = Tools.Create
  737. local AddConnection = Tools.AddConnection
  738.  
  739. local Notif = {}
  740.  
  741. function Notif:Init(Gui)
  742. self.MainHolder = Create("Frame", {
  743. AnchorPoint = Vector2.new(1, 1),
  744. BackgroundColor3 = Color3.fromRGB(255,255,255),
  745. BackgroundTransparency = 1,
  746. BorderColor3 = Color3.fromRGB(0,0,0),
  747. BorderSizePixel = 0,
  748. Position = UDim2.new(1, 0, 1, 0),
  749. Size = UDim2.new(0, 262, 0, 100),
  750. Visible = true,
  751. Parent = Gui,
  752. }, {
  753. Create("UIPadding", {
  754. PaddingBottom = UDim.new(0, 12),
  755. PaddingLeft = UDim.new(0, 0),
  756. PaddingRight = UDim.new(0, 12),
  757. PaddingTop = UDim.new(0, 0),
  758. Archivable = true,
  759. }),
  760. Create("UIListLayout", {
  761. HorizontalAlignment = Enum.HorizontalAlignment.Right,
  762. SortOrder = Enum.SortOrder.LayoutOrder,
  763. VerticalAlignment = Enum.VerticalAlignment.Bottom,
  764. Padding = UDim.new(0, 8),
  765. })
  766. })
  767.  
  768. end
  769.  
  770. function Notif:ShowNotification(titleText, descriptionText, duration)
  771. local main = Create("CanvasGroup", {
  772. AutomaticSize = Enum.AutomaticSize.Y,
  773. BackgroundColor3 = Color3.fromRGB(9, 9, 9),
  774. BackgroundTransparency = 1, -- Начальная прозрачность для эффекта появления
  775. BorderSizePixel = 0,
  776. ClipsDescendants = true,
  777. Size = UDim2.new(0, 300, 0, 0),
  778. Position = UDim2.new(1, -10, 0.5, -150),
  779. AnchorPoint = Vector2.new(1, 0.5),
  780. Visible = true,
  781. Parent = self.MainHolder,
  782. }, {
  783. Create("UICorner", {
  784. CornerRadius = UDim.new(0, 6),
  785. }),
  786. Create("UIStroke", {
  787. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  788. Color = Color3.fromRGB(23, 23, 23),
  789. Thickness = 1,
  790. }),
  791. })
  792.  
  793. local holderin = Create("Frame", {
  794. AutomaticSize = Enum.AutomaticSize.Y,
  795. BackgroundTransparency = 1,
  796. Size = UDim2.new(1, 0, 0, 0),
  797. Visible = true,
  798. Parent = main,
  799. }, {
  800. Create("UIPadding", {
  801. PaddingBottom = UDim.new(0, 12),
  802. PaddingLeft = UDim.new(0, 14),
  803. PaddingRight = UDim.new(0, 14),
  804. PaddingTop = UDim.new(0, 12),
  805. }),
  806. Create("UIListLayout", {
  807. Padding = UDim.new(0, 8),
  808. SortOrder = Enum.SortOrder.LayoutOrder,
  809. }),
  810. })
  811.  
  812. local topframe = Create("Frame", {
  813. AutomaticSize = Enum.AutomaticSize.XY,
  814. BackgroundTransparency = 1,
  815. Visible = true,
  816. Parent = holderin,
  817. })
  818.  
  819. local user = Create("ImageLabel", {
  820. Image = "rbxassetid://10723415903",
  821. BackgroundTransparency = 1,
  822. Size = UDim2.new(0, 18, 0, 18),
  823. Visible = true,
  824. Parent = topframe,
  825. })
  826.  
  827. local title = Create("TextLabel", {
  828. Font = Enum.Font.GothamMedium,
  829. LineHeight = 1.2,
  830. RichText = true,
  831. TextColor3 = Color3.fromRGB(225, 225, 225),
  832. TextSize = 18,
  833. TextWrapped = true,
  834. TextXAlignment = Enum.TextXAlignment.Left,
  835. TextYAlignment = Enum.TextYAlignment.Top,
  836. AutomaticSize = Enum.AutomaticSize.XY,
  837. BackgroundTransparency = 1,
  838. Text = titleText,
  839. Visible = true,
  840. Parent = topframe,
  841. }, {
  842. Create("UIPadding", {
  843. PaddingLeft = UDim.new(0, 24),
  844. }),
  845. })
  846.  
  847. local description = Create("TextLabel", {
  848. Font = Enum.Font.Gotham,
  849. RichText = true,
  850. TextColor3 = Color3.fromRGB(225, 225, 225),
  851. TextSize = 16,
  852. TextWrapped = true,
  853. TextXAlignment = Enum.TextXAlignment.Left,
  854. TextYAlignment = Enum.TextYAlignment.Top,
  855. AutomaticSize = Enum.AutomaticSize.XY,
  856. LayoutOrder = 1,
  857. BackgroundTransparency = 1,
  858. Text = descriptionText,
  859. Visible = true,
  860. Parent = holderin,
  861. })
  862.  
  863. local progress = Create("Frame", {
  864. AnchorPoint = Vector2.new(0.5, 1),
  865. BackgroundTransparency = 1,
  866. Position = UDim2.new(0.5, 0, 1, 0),
  867. Size = UDim2.new(1, 0, 0, 2),
  868. Visible = true,
  869. Parent = main,
  870. }, {
  871. Create("UICorner", {
  872. CornerRadius = UDim.new(1, 0),
  873. }),
  874. })
  875.  
  876. local progressindicator = Create("Frame", {
  877. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  878. Size = UDim2.new(1, 0, 0, 2),
  879. Visible = true,
  880. Parent = progress,
  881. }, {
  882. Create("UICorner", {
  883. CornerRadius = UDim.new(1, 0),
  884. }),
  885. })
  886.  
  887. -- Анимация плавного появления для всех элементов
  888. local fadeInTweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  889. local fadeInTween = TweenService:Create(main, fadeInTweenInfo, {BackgroundTransparency = 0.4})
  890. fadeInTween:Play()
  891.  
  892. local fadeInTweenTitle = TweenService:Create(title, fadeInTweenInfo, {TextTransparency = 0})
  893. fadeInTweenTitle:Play()
  894.  
  895. local fadeInTweenDescription = TweenService:Create(description, fadeInTweenInfo, {TextTransparency = 0})
  896. fadeInTweenDescription:Play()
  897.  
  898. local fadeInTweenUser = TweenService:Create(user, fadeInTweenInfo, {ImageTransparency = 0})
  899. fadeInTweenUser:Play()
  900.  
  901. -- Tween для прогресса
  902. local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
  903. local tween = TweenService:Create(progressindicator, tweenInfo, {Size = UDim2.new(0, 0, 0, 2)})
  904. tween:Play()
  905.  
  906. -- Удаление уведомления после завершения Tween
  907. tween.Completed:Connect(function()
  908. main:Destroy()
  909. end)
  910.  
  911. -- if not game:GetService("RunService"):IsStudio() then
  912. --require(script.Parent.Parent.Packages.blurModule):ModifyFrame(main)
  913. -- end
  914. end
  915.  
  916. return Notif
  917.  
  918. end)() end,
  919. [6] = function()local wax,script,require=ImportGlobals(6)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  920.  
  921. local Create = Tools.Create
  922. local AddConnection = Tools.AddConnection
  923.  
  924. return function(cfgs, Parent)
  925. cfgs = cfgs or {}
  926. cfgs.Title = cfgs.Title or nil
  927. cfgs.Description = cfgs.Description or nil
  928. cfgs.Defualt = cfgs.Defualt or false
  929. cfgs.Locked = cfgs.Locked or false
  930. cfgs.TitleTextSize = cfgs.TitleTextSize or 14
  931.  
  932. local Section = {}
  933.  
  934. Section.SectionFrame = Create("Frame", {
  935. AutomaticSize = Enum.AutomaticSize.Y,
  936. Name = "Section",
  937. BackgroundTransparency = 1,
  938. ThemeProps = {
  939. BackgroundColor3 = "maincolor",
  940. },
  941. BorderSizePixel = 0,
  942. BorderColor3 = Color3.fromRGB(0, 0, 0),
  943. Size = UDim2.new(1, 0, 0, 0),
  944. Visible = true,
  945. Parent = Parent,
  946. }, {
  947. Create("UIPadding", {
  948. PaddingBottom = UDim.new(0, 6),
  949. PaddingLeft = UDim.new(0, 12),
  950. PaddingRight = UDim.new(0, 12),
  951. PaddingTop = UDim.new(0, 6),
  952. Archivable = true,
  953. }),
  954. Create("UIStroke", {
  955. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  956. ThemeProps = {
  957. Color = "bordercolor"
  958. },
  959. Enabled = true,
  960. LineJoinMode = Enum.LineJoinMode.Round,
  961. Thickness = 1,
  962. Archivable = true,
  963. }),
  964. Create("UIListLayout", {
  965. Padding = UDim.new(0, 6),
  966. SortOrder = Enum.SortOrder.LayoutOrder,
  967. }),
  968. })
  969.  
  970. local topbox = Create("TextButton", {
  971. AutomaticSize = Enum.AutomaticSize.Y,
  972. Text = "",
  973. BackgroundTransparency = 1,
  974. ThemeProps = {
  975. BackgroundColor3 = "maincolor",
  976. },
  977. BorderSizePixel = 0,
  978. BorderColor3 = Color3.fromRGB(0, 0, 0),
  979. Size = UDim2.new(1, 0, 0, 0),
  980. Visible = true,
  981. Parent = Section.SectionFrame,
  982. }, {
  983. Create("UIListLayout", {
  984. Padding = UDim.new(0, 2),
  985. SortOrder = Enum.SortOrder.LayoutOrder,
  986. }, {}),
  987. })
  988.  
  989. local chevronIcon = Create("ImageButton", {
  990. ThemeProps = {
  991. ImageColor3 = "titlecolor",
  992. },
  993. Image = "rbxassetid://15269180996",
  994. ImageRectOffset = Vector2.new(0, 257),
  995. ImageRectSize = Vector2.new(256, 256),
  996. BackgroundTransparency = 1,
  997. BorderSizePixel = 0,
  998. Size = UDim2.new(0, 24, 0, 24),
  999. AnchorPoint = Vector2.new(1, 0),
  1000. Position = UDim2.new(1, 0, 0, 0),
  1001. Rotation = 90,
  1002. Name = "chevron-down",
  1003. ZIndex = 99,
  1004. -- Parent = topbox,
  1005. })
  1006.  
  1007. local name = Create("TextLabel", {
  1008. Font = Enum.Font.Gotham,
  1009. LineHeight = 1.2000000476837158,
  1010. RichText = true,
  1011. -- TextColor3 = Color3.fromRGB(234, 234, 234),
  1012. ThemeProps = {
  1013. TextColor3 = "titlecolor",
  1014. BackgroundColor3 = "maincolor",
  1015. },
  1016. TextSize = 14,
  1017. TextTruncate = Enum.TextTruncate.AtEnd,
  1018. TextWrapped = true,
  1019. TextXAlignment = Enum.TextXAlignment.Left,
  1020. AutomaticSize = Enum.AutomaticSize.Y,
  1021. Text = "",
  1022. BackgroundTransparency = 1,
  1023. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1024. BorderSizePixel = 0,
  1025. Size = UDim2.new(1, 0, 0, 0),
  1026. Visible = false,
  1027. Parent = topbox,
  1028. }, {
  1029. chevronIcon
  1030. })
  1031. if cfgs.description ~= nil and cfgs.description ~= "" then
  1032. local description = Create("TextLabel", {
  1033. Font = Enum.Font.Gotham,
  1034. RichText = true,
  1035. -- TextColor3 = Color3.fromRGB(168, 168, 168),
  1036. ThemeProps = {
  1037. TextColor3 = "descriptioncolor",
  1038. BackgroundColor3 = "maincolor",
  1039. },
  1040. TextSize = 14,
  1041. TextWrapped = true,
  1042. TextXAlignment = Enum.TextXAlignment.Left,
  1043. AutomaticSize = Enum.AutomaticSize.Y,
  1044. Text = "",
  1045. BackgroundTransparency = 1,
  1046. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1047. BorderSizePixel = 0,
  1048. Position = UDim2.new(0, 0, 0, 23),
  1049. Size = UDim2.new(1, 0, 0, 16),
  1050. Visible = true,
  1051. Parent = topbox,
  1052. }, {})
  1053. description.Text = cfgs.Description or ""
  1054. description.Visible = cfgs.Description ~= nil
  1055. end
  1056.  
  1057. if cfgs.Title ~= nil and cfgs.Title ~= "" then
  1058. -- topbox.AutomaticSize = Enum.AutomaticSize.Y
  1059.  
  1060. -- name.AutomaticSize = Enum.AutomaticSize.Y
  1061. -- name.TextWrapped = true
  1062. name.Size = UDim2.new(1, 0, 0, 16)
  1063. name.Text = cfgs.Title
  1064. name.TextSize = cfgs.TitleTextSize
  1065. name.Visible = true
  1066. end
  1067.  
  1068. Section.SectionContainer = Create("Frame", {
  1069. -- AutomaticSize = Enum.AutomaticSize.Y,
  1070. Name = "SectionContainer",
  1071. ClipsDescendants = true,
  1072. BackgroundTransparency = 1,
  1073. ThemeProps = {
  1074. BackgroundColor3 = "maincolor",
  1075. },
  1076. BorderSizePixel = 0,
  1077. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1078. Size = UDim2.new(1, 0, 0, 0),
  1079. Visible = true,
  1080. Parent = Section.SectionFrame,
  1081. }, {
  1082. Create("UIListLayout", {
  1083. Padding = UDim.new(0, 12),
  1084. SortOrder = Enum.SortOrder.LayoutOrder,
  1085. }, {}),
  1086. Create("UIPadding", {
  1087. PaddingBottom = UDim.new(0, 1),
  1088. PaddingLeft = UDim.new(0, 6),
  1089. PaddingRight = UDim.new(0, 1),
  1090. PaddingTop = UDim.new(0, 1),
  1091. Archivable = true,
  1092. }),
  1093. })
  1094.  
  1095. local isExpanded = cfgs.Defualt
  1096. if cfgs.Defualt == true then
  1097. chevronIcon.Rotation = 0
  1098. end
  1099. local function toggleSection()
  1100. isExpanded = not isExpanded
  1101. local targetRotation = isExpanded and 0 or 90
  1102.  
  1103. -- Animate chevron rotation
  1104. game:GetService("TweenService"):Create(chevronIcon, TweenInfo.new(0.3), {
  1105. Rotation = targetRotation
  1106. }):Play()
  1107.  
  1108. -- Animate section container
  1109. local targetSize = isExpanded and UDim2.new(1, 0, 0, Section.SectionContainer.UIListLayout.AbsoluteContentSize.Y + 18) or UDim2.new(1, 0, 0, 0)
  1110. game:GetService("TweenService"):Create(Section.SectionContainer, TweenInfo.new(0.3), {
  1111. Size = targetSize
  1112. }):Play()
  1113. end
  1114. if cfgs.Locked == false then
  1115. AddConnection(topbox.MouseButton1Click, toggleSection)
  1116. AddConnection(chevronIcon.MouseButton1Click, toggleSection)
  1117. end
  1118. if cfgs.Locked == true then
  1119. topbox:Destroy()
  1120. end
  1121.  
  1122. AddConnection(Section.SectionContainer.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1123. if isExpanded then
  1124. Section.SectionContainer.Size = UDim2.new(1, 0, 0, Section.SectionContainer.UIListLayout.AbsoluteContentSize.Y + 18)
  1125. end
  1126. end)
  1127.  
  1128. return Section
  1129. end
  1130. end)() end,
  1131. [7] = function()local wax,script,require=ImportGlobals(7)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  1132.  
  1133. local TweenService = game:GetService("TweenService")
  1134.  
  1135. local Create = Tools.Create
  1136. local AddConnection = Tools.AddConnection
  1137. local AddScrollAnim = Tools.AddScrollAnim
  1138. local CurrentThemeProps = Tools.GetPropsCurrentTheme()
  1139.  
  1140. -- Add debug toggle
  1141. local SEARCH_DEBUG = false
  1142.  
  1143. local function debugLog(...)
  1144. if SEARCH_DEBUG then
  1145. print("[Search]", ...)
  1146. end
  1147. end
  1148.  
  1149. local TabModule = {
  1150. Window = nil,
  1151. Tabs = {},
  1152. Containers = {},
  1153. SelectedTab = 0,
  1154. TabCount = 0,
  1155. }
  1156.  
  1157. function TabModule:Init(Window)
  1158. TabModule.Window = Window
  1159. return TabModule
  1160. end
  1161.  
  1162. function TabModule:New(Title, Parent)
  1163. local Library = require(script.Parent.Parent)
  1164. local Window = TabModule.Window
  1165. local Elements = Library.Elements
  1166.  
  1167. TabModule.TabCount = TabModule.TabCount + 1
  1168. local TabIndex = TabModule.TabCount
  1169.  
  1170. local Tab = {
  1171. Selected = false,
  1172. Name = Title,
  1173. Type = "Tab",
  1174. }
  1175.  
  1176. Tab.TabBtn = Create("TextButton", {
  1177. Text = "",
  1178. BackgroundTransparency = 1,
  1179. Size = UDim2.new(1, 0, 0, 32),
  1180. Parent = Parent,
  1181. ThemeProps = {
  1182. BackgroundColor3 = "maincolor",
  1183. },
  1184. BorderSizePixel = 0,
  1185. }, {
  1186. Create("TextLabel", {
  1187. Name = "Title",
  1188. Font = Enum.Font.Gotham,
  1189. TextColor3 = Color3.fromRGB(63, 63, 63),
  1190. TextSize = 14,
  1191. ThemeProps = {
  1192. BackgroundColor3 = "maincolor",
  1193. },
  1194. BorderSizePixel = 0,
  1195. TextXAlignment = Enum.TextXAlignment.Left,
  1196. AnchorPoint = Vector2.new(0, 0.5),
  1197. BackgroundTransparency = 1,
  1198. Position = UDim2.new(0, 14, 0.5, 0),
  1199. Size = UDim2.new(0.8, 0, 0.9, 0),
  1200. Text = Title,
  1201. }),
  1202. Create("Frame", {
  1203. Name = "Line",
  1204. BackgroundColor3 = Color3.fromRGB(29, 29, 29),
  1205. Position = UDim2.new(0, 4, 0, 0),
  1206. Size = UDim2.new(0, 2, 1, 0),
  1207. BorderSizePixel = 0,
  1208. }),
  1209. })
  1210. Tab.Container = Create("ScrollingFrame", {
  1211. CanvasSize = UDim2.new(0, 0, 0, 0),
  1212. ThemeProps = {
  1213. ScrollBarImageColor3 = "scrollocolor",
  1214. BackgroundColor3 = "maincolor",
  1215. },
  1216. ScrollBarThickness = 2,
  1217. ScrollBarImageTransparency = 1,
  1218. BackgroundTransparency = 1,
  1219. BorderSizePixel = 0,
  1220. Position = UDim2.new(0, 140, 0, 40),
  1221. Size = UDim2.new(1, -140, 1, -40),
  1222. Visible = false,
  1223. Parent = TabModule.Window,
  1224. }, {
  1225. Create("UIListLayout", {
  1226. SortOrder = Enum.SortOrder.LayoutOrder,
  1227. }),
  1228. })
  1229.  
  1230. AddScrollAnim(Tab.Container)
  1231.  
  1232. AddConnection(Tab.Container.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"), function()
  1233. Tab.Container.CanvasSize = UDim2.new(0, 0, 0, Tab.Container.UIListLayout.AbsoluteContentSize.Y + 28)
  1234. end)
  1235.  
  1236. -- Add search container at the top of the tab container
  1237. Tab.SearchContainer = Create("Frame", {
  1238. Size = UDim2.new(1, 0, 0, 36),
  1239. BackgroundTransparency = 1,
  1240. Parent = Parent,
  1241. LayoutOrder = -1, -- Make sure it appears at the top
  1242. ThemeProps = {
  1243. BackgroundColor3 = "maincolor",
  1244. },
  1245. })
  1246.  
  1247. local SearchBox = Create("TextBox", {
  1248. Size = UDim2.new(1, 0, 0, 32),
  1249. Position = UDim2.new(0, 0, 0, 0),
  1250. PlaceholderText = "Search elements...",
  1251. TextXAlignment = Enum.TextXAlignment.Left,
  1252. Text = "",
  1253. Font = Enum.Font.Gotham,
  1254. TextSize = 14,
  1255. BackgroundTransparency = 1,
  1256. ThemeProps = {
  1257. -- BackgroundColor3 = "elementbackground",
  1258. TextColor3 = "titlecolor",
  1259. PlaceholderColor3 = "descriptioncolor",
  1260. },
  1261. Parent = Tab.SearchContainer,
  1262. ClearTextOnFocus = false,
  1263. }, {
  1264. Create("UIPadding", {
  1265. PaddingLeft = UDim.new(0, 8),
  1266. PaddingRight = UDim.new(0, 8),
  1267. }),
  1268.  
  1269. Create("UIStroke", {
  1270. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  1271. ThemeProps = {
  1272. Color = "bordercolor",
  1273. },
  1274. Thickness = 1,
  1275. }),
  1276. })
  1277.  
  1278. -- Function to filter elements based on search text
  1279. local function searchInElement(element, searchText)
  1280. local title = element:FindFirstChild("Title", true)
  1281. local desc = element:FindFirstChild("Description", true)
  1282.  
  1283. if title then
  1284. debugLog("Checking title:", title.Text)
  1285. local cleanTitle = title.Text:gsub("^%s+", "")
  1286. if string.find(string.lower(cleanTitle), searchText) then
  1287. debugLog("Found match in title")
  1288. return true
  1289. end
  1290. end
  1291.  
  1292. if desc then
  1293. debugLog("Checking description:", desc.Text)
  1294. if string.find(string.lower(desc.Text), searchText) then
  1295. debugLog("Found match in description")
  1296. return true
  1297. end
  1298. end
  1299.  
  1300. return false
  1301. end
  1302.  
  1303. local function updateSearch()
  1304. local searchText = string.lower(SearchBox.Text)
  1305. debugLog("Search text:", searchText)
  1306.  
  1307. if not Tab.Container.Visible then
  1308. debugLog("Tab not visible, skipping search")
  1309. return
  1310. end
  1311.  
  1312. -- Loop through all children in the container
  1313. for _, child in ipairs(Tab.Container:GetChildren()) do
  1314. if child ~= SearchContainer then
  1315. if child.Name == "Section" then
  1316. -- Handle section elements
  1317. local sectionContainer = child:FindFirstChild("SectionContainer")
  1318. if sectionContainer then
  1319. local visible = false
  1320. debugLog("Checking section:", child.Name)
  1321.  
  1322. -- Search through elements in section
  1323. for _, element in ipairs(sectionContainer:GetChildren()) do
  1324. if element.Name == "Element" then
  1325. local elementVisible = searchInElement(element, searchText)
  1326. element.Visible = elementVisible or searchText == ""
  1327. if elementVisible then
  1328. visible = true
  1329. end
  1330. end
  1331. end
  1332.  
  1333. -- Show section if any elements match or search is empty
  1334. child.Visible = visible or searchText == ""
  1335. debugLog("Section visibility:", child.Visible)
  1336. end
  1337. elseif child.Name == "Element" then
  1338. -- Handle standalone elements
  1339. local elementVisible = searchInElement(child, searchText)
  1340. child.Visible = elementVisible or searchText == ""
  1341. debugLog("Standalone element visibility:", child.Visible)
  1342. end
  1343. end
  1344. end
  1345. end
  1346.  
  1347. -- Update search when tab is selected
  1348. AddConnection(Tab.Container:GetPropertyChangedSignal("Visible"), function()
  1349. if Tab.Container.Visible then
  1350. updateSearch()
  1351. end
  1352. end)
  1353.  
  1354. AddConnection(SearchBox:GetPropertyChangedSignal("Text"), updateSearch)
  1355.  
  1356. Tab.ContainerFrame = Tab.Container
  1357.  
  1358. AddConnection(Tab.TabBtn.MouseButton1Click, function()
  1359. TabModule:SelectTab(TabIndex)
  1360. end)
  1361.  
  1362. TabModule.Containers[TabIndex] = Tab.ContainerFrame
  1363. TabModule.Tabs[TabIndex] = Tab
  1364.  
  1365. function Tab:AddSection(cfgs)
  1366. cfgs = cfgs or {}
  1367. cfgs.Title = cfgs.Title or nil
  1368. cfgs.Description = cfgs.Description or nil
  1369. local Section = { Type = "Section" }
  1370.  
  1371. local SectionFrame = require(script.Parent.section)(cfgs, Tab.Container)
  1372. Section.Container = SectionFrame.SectionContainer
  1373.  
  1374. function Section:AddGroupButton()
  1375. local GroupButton = { Type = "Group" }
  1376. GroupButton.GroupContainer = Create("Frame", {
  1377. AutomaticSize = Enum.AutomaticSize.Y,
  1378. BackgroundTransparency = 1,
  1379. Size = UDim2.new(1, 0, 0, 0),
  1380. Visible = true,
  1381. ThemeProps = {
  1382. BackgroundColor3 = "maincolor",
  1383. },
  1384. BorderSizePixel = 0,
  1385. Parent = SectionFrame.SectionContainer,
  1386. }, {
  1387. Create("UIListLayout", {
  1388. Padding = UDim.new(0, 6),
  1389. Wraps = true,
  1390. FillDirection = Enum.FillDirection.Horizontal,
  1391. SortOrder = Enum.SortOrder.LayoutOrder,
  1392. }),
  1393. })
  1394.  
  1395. GroupButton.Container = GroupButton.GroupContainer
  1396.  
  1397. setmetatable(GroupButton, Elements)
  1398. return GroupButton
  1399. end
  1400.  
  1401. setmetatable(Section, Elements)
  1402. return Section
  1403. end
  1404.  
  1405. -- setmetatable(Tab, Elements)
  1406. return Tab
  1407. end
  1408.  
  1409. function TabModule:SelectTab(Tab)
  1410. TabModule.SelectedTab = Tab
  1411.  
  1412. for _, v in next, TabModule.Tabs do
  1413. TweenService:Create(
  1414. v.TabBtn.Title,
  1415. TweenInfo.new(0.125, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
  1416. { TextColor3 = CurrentThemeProps.offTextBtn }
  1417. ):Play()
  1418. TweenService:Create(
  1419. v.TabBtn.Line,
  1420. TweenInfo.new(0.125, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
  1421. { BackgroundColor3 = CurrentThemeProps.offBgLineBtn }
  1422. ):Play()
  1423. v.Selected = false
  1424.  
  1425. -- Hide search container for non-selected tabs
  1426. if v.SearchContainer then
  1427. v.SearchContainer.Visible = false
  1428. end
  1429. end
  1430.  
  1431. local selectedTab = TabModule.Tabs[Tab]
  1432. TweenService:Create(
  1433. selectedTab.TabBtn.Title,
  1434. TweenInfo.new(0.125, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
  1435. { TextColor3 = CurrentThemeProps.onTextBtn }
  1436. ):Play()
  1437. TweenService:Create(
  1438. selectedTab.TabBtn.Line,
  1439. TweenInfo.new(0.125, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
  1440. { BackgroundColor3 = CurrentThemeProps.onBgLineBtn }
  1441. ):Play()
  1442.  
  1443. task.spawn(function()
  1444. for _, Container in pairs(TabModule.Containers) do
  1445. Container.Visible = false
  1446. end
  1447.  
  1448. -- Show search container for selected tab
  1449. if selectedTab.SearchContainer then
  1450. selectedTab.SearchContainer.Visible = true
  1451. end
  1452.  
  1453. TabModule.Containers[Tab].Visible = true
  1454. end)
  1455. end
  1456.  
  1457. return TabModule
  1458.  
  1459. end)() end,
  1460. [8] = function()local wax,script,require=ImportGlobals(8)local ImportGlobals return (function(...)local Elements = {}
  1461.  
  1462. for _, Theme in next, script:GetChildren() do
  1463. table.insert(Elements, require(Theme))
  1464. end
  1465.  
  1466. return Elements
  1467. end)() end,
  1468. [9] = function()local wax,script,require=ImportGlobals(9)local ImportGlobals return (function(...)local UserInputService = game:GetService("UserInputService")
  1469.  
  1470. local Tools = require(script.Parent.Parent.tools)
  1471. local Components = script.Parent.Parent.components
  1472.  
  1473. local Create = Tools.Create
  1474. local AddConnection = Tools.AddConnection
  1475.  
  1476. local BlacklistedKeys = {
  1477. Enum.KeyCode.Unknown,
  1478. Enum.KeyCode.W,
  1479. Enum.KeyCode.A,
  1480. Enum.KeyCode.S,
  1481. Enum.KeyCode.D,
  1482. Enum.KeyCode.Up,
  1483. Enum.KeyCode.Left,
  1484. Enum.KeyCode.Down,
  1485. Enum.KeyCode.Right,
  1486. Enum.KeyCode.Slash,
  1487. Enum.KeyCode.Tab,
  1488. Enum.KeyCode.Backspace,
  1489. Enum.KeyCode.Escape,
  1490. }
  1491.  
  1492. local Element = {}
  1493. Element.__index = Element
  1494. Element.__type = "Bind"
  1495.  
  1496. function Element:New(Idx, Config)
  1497. assert(Config.Title, "Bind - Missing Title")
  1498. Config.Description = Config.Description or nil
  1499. Config.Hold = Config.Hold or false
  1500. Config.Callback = Config.Callback or function() end
  1501. Config.ChangeCallback = Config.ChangeCallback or function() end
  1502. local Bind = { Value = nil, Binding = false, Type = "Bind" }
  1503. local Holding = false
  1504.  
  1505. local BindFrame = require(Components.element)(Config.Title, Config.Description, self.Container)
  1506.  
  1507. local value = Create("TextLabel", {
  1508. Font = Enum.Font.Gotham,
  1509. RichText = true,
  1510. Text = "",
  1511. ThemeProps = {
  1512. BackgroundColor3 = "bordercolor",
  1513. TextColor3 = "titlecolor",
  1514. },
  1515. TextSize = 14,
  1516. AnchorPoint = Vector2.new(1, 0),
  1517. AutomaticSize = Enum.AutomaticSize.X,
  1518. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1519. BorderSizePixel = 0,
  1520. Position = UDim2.new(1, 0, 0, 0),
  1521. Size = UDim2.new(0, 0, 0, 16),
  1522. Visible = true,
  1523. Parent = BindFrame.topbox,
  1524. }, {
  1525. Create("UIPadding", {
  1526. PaddingBottom = UDim.new(0, 0),
  1527. PaddingLeft = UDim.new(0, 4),
  1528. PaddingRight = UDim.new(0, 4),
  1529. PaddingTop = UDim.new(0, 0),
  1530. Archivable = true,
  1531. }),
  1532. Create("UICorner", {
  1533. CornerRadius = UDim.new(0, 4),
  1534. Archivable = true,
  1535. }),
  1536. })
  1537.  
  1538. AddConnection(BindFrame.Frame.InputEnded, function(Input)
  1539. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  1540. if Bind.Binding then
  1541. return
  1542. end
  1543. Bind.Binding = true
  1544. value.Text = "..."
  1545. end
  1546. end)
  1547.  
  1548. function Bind:Set(Key)
  1549. Bind.Binding = false
  1550. Bind.Value = Key or Bind.Value
  1551. Bind.Value = Bind.Value.Name or Bind.Value
  1552. value.Text = Bind.Value
  1553. Config.ChangeCallback(Bind.Value)
  1554. end
  1555.  
  1556. AddConnection(UserInputService.InputBegan, function(Input)
  1557. if UserInputService:GetFocusedTextBox() then
  1558. return
  1559. end
  1560. if (Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value) and not Bind.Binding then
  1561. if Config.Hold then
  1562. Holding = true
  1563. Config.Callback(Holding)
  1564. else
  1565. Config.Callback()
  1566. end
  1567. elseif Bind.Binding then
  1568. local Key
  1569. pcall(function()
  1570. if not table.find(BlacklistedKeys, Input.KeyCode) then
  1571. Key = Input.KeyCode
  1572. end
  1573. end)
  1574. Key = Key or Bind.Value
  1575. Bind:Set(Key)
  1576. end
  1577. end)
  1578.  
  1579. AddConnection(UserInputService.InputEnded, function(Input)
  1580. if Input.KeyCode.Name == Bind.Value or Input.UserInputType.Name == Bind.Value then
  1581. if Config.Hold and Holding then
  1582. Holding = false
  1583. Config.Callback(Holding)
  1584. end
  1585. end
  1586. end)
  1587.  
  1588. Bind:Set(Config.Default)
  1589.  
  1590. self.Library.Flags[Idx] = Bind
  1591. return Bind
  1592. end
  1593.  
  1594. return Element
  1595.  
  1596. end)() end,
  1597. [10] = function()local wax,script,require=ImportGlobals(10)local ImportGlobals return (function(...)local TweenService = game:GetService("TweenService")
  1598.  
  1599. local Tools = require(script.Parent.Parent.tools)
  1600.  
  1601. local Create = Tools.Create
  1602. local AddConnection = Tools.AddConnection
  1603. local CurrentThemeProps = Tools.GetPropsCurrentTheme()
  1604.  
  1605. local Element = {}
  1606. Element.__index = Element
  1607. Element.__type = "Button"
  1608.  
  1609. local ButtonStyles = {
  1610. Primary = {
  1611. TextColor3 = Color3.fromRGB(9, 9, 9),
  1612. BackgroundColor3 = CurrentThemeProps.primarycolor,
  1613. BackgroundTransparency = 0,
  1614. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1615. BorderSizePixel = 0,
  1616. HoverConfig = {
  1617. BackgroundTransparency = 0.1,
  1618. },
  1619. FocusConfig = {
  1620. BackgroundTransparency = 0.2,
  1621. },
  1622. },
  1623. Ghost = {
  1624. TextColor3 = Color3.fromRGB(244, 244, 244),
  1625. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1626. BackgroundTransparency = 1,
  1627. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1628. BorderSizePixel = 0,
  1629. HoverConfig = {
  1630. BackgroundTransparency = 0.98,
  1631. },
  1632. FocusConfig = {
  1633. BackgroundTransparency = 0.94,
  1634. },
  1635. },
  1636. Outline = {
  1637. TextColor3 = Color3.fromRGB(244, 244, 244),
  1638. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1639. BackgroundTransparency = 1,
  1640. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1641. BorderSizePixel = 1,
  1642. UIStroke = {
  1643. Color = Color3.fromRGB(39, 39, 42),
  1644. Thickness = 1,
  1645. },
  1646. HoverConfig = {
  1647. BackgroundTransparency = 0.94,
  1648. },
  1649. FocusConfig = {
  1650. BackgroundTransparency = 0.98,
  1651. },
  1652. },
  1653. }
  1654.  
  1655. local function ApplyTweens(button, config, uiStroke)
  1656. local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  1657. local tweenGoals = {}
  1658.  
  1659. for property, value in pairs(config) do
  1660. if property ~= "UIStroke" then
  1661. tweenGoals[property] = value
  1662. end
  1663. end
  1664.  
  1665. local tween = TweenService:Create(button, tweenInfo, tweenGoals)
  1666. tween:Play()
  1667.  
  1668. if uiStroke and config.UIStroke then
  1669. local strokeTweenGoals = {}
  1670. for property, value in pairs(config.UIStroke) do
  1671. strokeTweenGoals[property] = value
  1672. end
  1673. local strokeTween = TweenService:Create(uiStroke, tweenInfo, strokeTweenGoals)
  1674. strokeTween:Play()
  1675. end
  1676. end
  1677.  
  1678. local function CreateButton(style, text, parent)
  1679. local config = ButtonStyles[style]
  1680. assert(config, "Invalid button style: " .. style)
  1681.  
  1682. local button = Create("TextButton", {
  1683. Font = Enum.Font.Gotham,
  1684. LineHeight = 1.25,
  1685. Text = text,
  1686. TextColor3 = config.TextColor3,
  1687. TextSize = 14,
  1688. AutomaticSize = Enum.AutomaticSize.XY,
  1689. BackgroundColor3 = config.BackgroundColor3,
  1690. BackgroundTransparency = config.BackgroundTransparency,
  1691. BorderColor3 = config.BorderColor3,
  1692. BorderSizePixel = config.BorderSizePixel,
  1693. Visible = true,
  1694. Parent = parent,
  1695. }, {
  1696. Create("UIPadding", {
  1697. PaddingBottom = UDim.new(0, 8),
  1698. PaddingLeft = UDim.new(0, 16),
  1699. PaddingRight = UDim.new(0, 16),
  1700. PaddingTop = UDim.new(0, 8),
  1701. Archivable = true,
  1702. }),
  1703. Create("UICorner", {
  1704. CornerRadius = UDim.new(0, 6),
  1705. Archivable = true,
  1706. }),
  1707. })
  1708.  
  1709. if config.UIStroke then
  1710. Create("UIStroke", {
  1711. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  1712. Color = config.UIStroke.Color,
  1713. Enabled = true,
  1714. LineJoinMode = Enum.LineJoinMode.Round,
  1715. Thickness = config.UIStroke.Thickness,
  1716. Archivable = true,
  1717. Parent = button,
  1718. })
  1719. end
  1720.  
  1721. button.MouseEnter:Connect(function()
  1722. if config.HoverConfig then
  1723. ApplyTweens(button, config.HoverConfig)
  1724. end
  1725. end)
  1726.  
  1727. button.MouseLeave:Connect(function()
  1728. ApplyTweens(button, {
  1729. BackgroundColor3 = config.BackgroundColor3,
  1730. TextColor3 = config.TextColor3,
  1731. BackgroundTransparency = config.BackgroundTransparency,
  1732. BorderColor3 = config.BorderColor3,
  1733. BorderSizePixel = config.BorderSizePixel,
  1734. UIStroke = config.UIStroke,
  1735. })
  1736. end)
  1737.  
  1738. button.MouseButton1Down:Connect(function()
  1739. if config.FocusConfig then
  1740. ApplyTweens(button, config.FocusConfig)
  1741. end
  1742. end)
  1743.  
  1744. button.MouseButton1Up:Connect(function()
  1745. if config.HoverConfig then
  1746. ApplyTweens(button, config.HoverConfig)
  1747. else
  1748. ApplyTweens(button, {
  1749. BackgroundColor3 = config.BackgroundColor3,
  1750. TextColor3 = config.TextColor3,
  1751. BackgroundTransparency = config.BackgroundTransparency,
  1752. BorderColor3 = config.BorderColor3,
  1753. BorderSizePixel = config.BorderSizePixel,
  1754. UIStroke = config.UIStroke,
  1755. })
  1756. end
  1757. end)
  1758.  
  1759. return button
  1760. end
  1761.  
  1762. function Element:New(Config)
  1763. assert(Config.Title, "Button - Missing Title")
  1764. Config.Variant = Config.Variant or "Primary"
  1765. Config.Callback = Config.Callback or function() end
  1766. local Button = {}
  1767.  
  1768. Button.StyledButton = CreateButton(Config.Variant, Config.Title, self.Container)
  1769. Button.StyledButton.MouseButton1Click:Connect(Config.Callback)
  1770.  
  1771. return Button
  1772. end
  1773.  
  1774. return Element
  1775.  
  1776. end)() end,
  1777. [11] = function()local wax,script,require=ImportGlobals(11)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  1778. local Components = script.Parent.Parent.components
  1779.  
  1780. local TweenService = game:GetService("TweenService")
  1781. local LocalPlayer = game:GetService("Players").LocalPlayer
  1782. local mouse = LocalPlayer:GetMouse()
  1783.  
  1784. local Create = Tools.Create
  1785. local AddConnection = Tools.AddConnection
  1786.  
  1787. local HueSelectionPosition, RainbowColorValue = 0, 0
  1788. local rainbowIncrement, hueIncrement, maxHuePosition = 1 / 255, 1, 127
  1789. coroutine.wrap(function()
  1790. while true do
  1791. RainbowColorValue = (RainbowColorValue + rainbowIncrement) % 1
  1792. HueSelectionPosition = (HueSelectionPosition + hueIncrement) % maxHuePosition
  1793. wait(0.06)
  1794. end
  1795. end)()
  1796.  
  1797. local Element = {}
  1798. Element.__index = Element
  1799. Element.__type = "Colorpicker"
  1800.  
  1801. function Element:New(Idx, Config)
  1802. assert(Config.Title, "Colorpicker - Missing Title")
  1803. Config.Description = Config.Description or nil
  1804. assert(Config.Default, "AddColorPicker: Missing default value.")
  1805.  
  1806. local Colorpicker = {
  1807. Value = Config.Default,
  1808. Transparency = Config.Transparency or 0,
  1809. Type = "Colorpicker",
  1810. Callback = Config.Callback or function(Color) end,
  1811. RainbowColorPicker = false,
  1812. ColorpickerToggle = false, -- Added missing toggle state
  1813. }
  1814.  
  1815. local RainbowColorPicker = Colorpicker.RainbowColorPicker
  1816.  
  1817. function Colorpicker:SetHSVFromRGB(Color)
  1818. local H, S, V = Color3.toHSV(Color)
  1819. Colorpicker.Hue = H
  1820. Colorpicker.Sat = S
  1821. Colorpicker.Vib = V
  1822. end
  1823. Colorpicker:SetHSVFromRGB(Colorpicker.Value)
  1824.  
  1825. local ColorpickerFrame = require(Components.element)(Config.Title, Config.Description, self.Container)
  1826.  
  1827. local InputFrame = Create("CanvasGroup", {
  1828. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1829. BackgroundTransparency = 1,
  1830. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1831. BorderSizePixel = 0,
  1832. Size = UDim2.new(1, 0, 0, 30),
  1833. Visible = true,
  1834. Parent = ColorpickerFrame.Frame,
  1835. }, {
  1836. Create("UIStroke", {
  1837. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  1838. Color = Color3.fromRGB(24, 24, 26),
  1839. Enabled = true,
  1840. LineJoinMode = Enum.LineJoinMode.Round,
  1841. Thickness = 1,
  1842. Archivable = true,
  1843. }),
  1844. Create("UICorner", {
  1845. CornerRadius = UDim.new(0, 4),
  1846. Archivable = true,
  1847. }),
  1848. })
  1849.  
  1850. local colorBox = Create("Frame", {
  1851. AnchorPoint = Vector2.new(0, 0.5),
  1852. BackgroundColor3 = Color3.fromRGB(3, 255, 150),
  1853. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1854. BorderSizePixel = 0,
  1855. Position = UDim2.new(0, 0, 0.5, 0),
  1856. Size = UDim2.new(0, 30, 1, 0),
  1857. Visible = true,
  1858. Parent = InputFrame,
  1859. }, {
  1860. Create("UIStroke", {
  1861. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  1862. Color = Color3.fromRGB(24, 24, 26),
  1863. Enabled = true,
  1864. LineJoinMode = Enum.LineJoinMode.Round,
  1865. Thickness = 1,
  1866. Archivable = true,
  1867. }),
  1868. })
  1869.  
  1870. local inputHex = Create("TextBox", {
  1871. Font = Enum.Font.GothamMedium,
  1872. LineHeight = 1.2000000476837158,
  1873. PlaceholderColor3 = Color3.fromRGB(178, 178, 178),
  1874. Text = "#03ff96",
  1875. TextColor3 = Color3.fromRGB(178, 178, 178),
  1876. TextSize = 14,
  1877. TextXAlignment = Enum.TextXAlignment.Left,
  1878. AnchorPoint = Vector2.new(1, 0.5),
  1879. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1880. BackgroundTransparency = 1,
  1881. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1882. BorderSizePixel = 0,
  1883. Position = UDim2.new(1, 0, 0.5, 0),
  1884. Size = UDim2.new(1, -30, 1, 0),
  1885. Visible = true,
  1886. Parent = InputFrame,
  1887. }, {
  1888. Create("UIPadding", {
  1889. PaddingBottom = UDim.new(0, 0),
  1890. PaddingLeft = UDim.new(0, 12),
  1891. PaddingRight = UDim.new(0, 12),
  1892. PaddingTop = UDim.new(0, 0),
  1893. Archivable = true,
  1894. }),
  1895. })
  1896.  
  1897. AddConnection(inputHex.FocusLost, function(Enter)
  1898. if Enter then
  1899. local Success, Result = pcall(Color3.fromHex, inputHex.Text)
  1900. if Success and typeof(Result) == "Color3" then
  1901. Colorpicker.Hue, Colorpicker.Sat, Colorpicker.Vib = Color3.toHSV(Result)
  1902. end
  1903. end
  1904. end)
  1905.  
  1906. -- Colorpicker
  1907. local colorpicker_frame = Create("TextButton", {
  1908. AutoButtonColor = false,
  1909. Text = "",
  1910. ZIndex = 20,
  1911. BackgroundColor3 = Color3.fromRGB(9, 9, 11),
  1912. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1913. BorderSizePixel = 0,
  1914. Position = UDim2.new(0, 0, 0, 46),
  1915. Size = UDim2.new(1, 0, 0, 166),
  1916. Visible = false,
  1917. Parent = ColorpickerFrame.Frame,
  1918. }, {
  1919. Create("UIPadding", {
  1920. PaddingBottom = UDim.new(0, 6),
  1921. PaddingLeft = UDim.new(0, 6),
  1922. PaddingRight = UDim.new(0, 6),
  1923. PaddingTop = UDim.new(0, 6),
  1924. Archivable = true,
  1925. }),
  1926. })
  1927.  
  1928. local color = Create("ImageLabel", {
  1929. Image = "rbxassetid://4155801252",
  1930. BackgroundColor3 = Color3.fromRGB(255, 0, 4),
  1931. Size = UDim2.new(1, -10, 0, 127),
  1932. Visible = true,
  1933. ZIndex = 10,
  1934. Parent = colorpicker_frame,
  1935. }, {
  1936. Create("UICorner", {
  1937. CornerRadius = UDim.new(0, 8),
  1938. Archivable = true,
  1939. }),
  1940. })
  1941.  
  1942. local color_selection = Create("Frame", {
  1943. BackgroundColor3 = Color3.fromRGB(255, 0, 0),
  1944. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1945. BorderSizePixel = 0,
  1946. Size = UDim2.new(0, 12, 0, 12),
  1947. Visible = true,
  1948. Parent = color,
  1949. }, {
  1950. Create("UICorner", {
  1951. CornerRadius = UDim.new(1, 0),
  1952. Archivable = true,
  1953. }),
  1954. Create("UIStroke", {
  1955. ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual,
  1956. Color = Color3.fromRGB(255, 255, 255),
  1957. Enabled = true,
  1958. LineJoinMode = Enum.LineJoinMode.Round,
  1959. Thickness = 1.2000000476837158,
  1960. Archivable = true,
  1961. }),
  1962. })
  1963.  
  1964. local hue = Create("ImageLabel", {
  1965. AnchorPoint = Vector2.new(1, 0),
  1966. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  1967. Position = UDim2.new(1, 0, 0, 0),
  1968. Size = UDim2.new(0, 6, 0, 127),
  1969. Visible = true,
  1970. Parent = colorpicker_frame,
  1971. }, {
  1972. Create("UICorner", {
  1973. CornerRadius = UDim.new(0, 9),
  1974. Archivable = true,
  1975. }),
  1976. Create("UIGradient", {
  1977. Color = ColorSequence.new({
  1978. ColorSequenceKeypoint.new(0.00, Color3.fromRGB(255, 0, 0)),
  1979. ColorSequenceKeypoint.new(0.17, Color3.fromRGB(255, 0, 255)),
  1980. ColorSequenceKeypoint.new(0.33, Color3.fromRGB(0, 0, 255)),
  1981. ColorSequenceKeypoint.new(0.50, Color3.fromRGB(0, 255, 255)),
  1982. ColorSequenceKeypoint.new(0.67, Color3.fromRGB(0, 255, 0)),
  1983. ColorSequenceKeypoint.new(0.83, Color3.fromRGB(255, 255, 0)),
  1984. ColorSequenceKeypoint.new(1.00, Color3.fromRGB(255, 0, 0)),
  1985. }),
  1986. Enabled = true,
  1987. Offset = Vector2.new(0, 0),
  1988. Rotation = 270,
  1989. Archivable = true,
  1990. }),
  1991. })
  1992.  
  1993. local hue_selection = Create("Frame", {
  1994. AnchorPoint = Vector2.new(0.5, 0.5),
  1995. BackgroundColor3 = Color3.fromRGB(255, 0, 0),
  1996. BackgroundTransparency = 1,
  1997. BorderColor3 = Color3.fromRGB(0, 0, 0),
  1998. BorderSizePixel = 0,
  1999. Position = UDim2.new(0.5, 0, 0.1, 0),
  2000. Size = UDim2.new(0, 8, 0, 8),
  2001. Visible = true,
  2002. Parent = hue,
  2003. }, {
  2004. Create("UICorner", {
  2005. CornerRadius = UDim.new(1, 0),
  2006. Archivable = true,
  2007. }),
  2008. Create("UIStroke", {
  2009. ApplyStrokeMode = Enum.ApplyStrokeMode.Contextual,
  2010. Color = Color3.fromRGB(255, 255, 255),
  2011. Enabled = true,
  2012. LineJoinMode = Enum.LineJoinMode.Round,
  2013. Thickness = 1.2000000476837158,
  2014. Archivable = true,
  2015. }),
  2016. })
  2017.  
  2018. local rainbowtoggle = Create("TextButton", {
  2019. Font = Enum.Font.SourceSans,
  2020. Text = "",
  2021. TextColor3 = Color3.fromRGB(0, 0, 0),
  2022. TextSize = 14,
  2023. AnchorPoint = Vector2.new(0, 1),
  2024. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2025. BackgroundTransparency = 1,
  2026. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2027. BorderSizePixel = 0,
  2028. Position = UDim2.new(0, 0, 1, 0),
  2029. Size = UDim2.new(1, 0, 0, 16),
  2030. Visible = true,
  2031. Parent = colorpicker_frame,
  2032. })
  2033.  
  2034. local togglebox = Create("Frame", {
  2035. BackgroundColor3 = Color3.fromRGB(250, 250, 250),
  2036. BackgroundTransparency = 1,
  2037. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2038. BorderSizePixel = 0,
  2039. Size = UDim2.new(0, 16, 0, 16),
  2040. Visible = true,
  2041. Parent = rainbowtoggle,
  2042. }, {
  2043. Create("UICorner", {
  2044. CornerRadius = UDim.new(0, 5),
  2045. Archivable = true,
  2046. }),
  2047. Create("UIStroke", {
  2048. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2049. Color = Color3.fromRGB(250, 250, 250),
  2050. Enabled = true,
  2051. LineJoinMode = Enum.LineJoinMode.Round,
  2052. Thickness = 1,
  2053. Archivable = true,
  2054. }),
  2055.  
  2056. Create("ImageLabel", {
  2057. Image = "http://www.roblox.com/asset/?id=6031094667",
  2058. ImageColor3 = Color3.fromRGB(9, 9, 11),
  2059. AnchorPoint = Vector2.new(0.5, 0.5),
  2060. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2061. BackgroundTransparency = 1,
  2062. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2063. BorderSizePixel = 0,
  2064. Position = UDim2.new(0.5, 0, 0.5, 0),
  2065. Size = UDim2.new(0, 12, 0, 12),
  2066. Visible = true,
  2067. }),
  2068. Create("TextLabel", {
  2069. Font = Enum.Font.Gotham,
  2070. Text = "Rainbow",
  2071. TextColor3 = Color3.fromRGB(234, 234, 234),
  2072. TextSize = 14,
  2073. TextXAlignment = Enum.TextXAlignment.Left,
  2074. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2075. BackgroundTransparency = 1,
  2076. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2077. BorderSizePixel = 0,
  2078. Position = UDim2.new(0, 26, 0, 0),
  2079. Size = UDim2.new(1, 0, 0, 16),
  2080. Visible = true,
  2081. }),
  2082. })
  2083.  
  2084. local function UpdateColorPicker()
  2085. if not (Colorpicker.Hue and Colorpicker.Sat and Colorpicker.Vib) then
  2086. warn("Missing HSV values in UpdateColorPicker")
  2087. return
  2088. end
  2089.  
  2090. local newColor = Color3.fromHSV(Colorpicker.Hue, Colorpicker.Sat, Colorpicker.Vib)
  2091. colorBox.BackgroundColor3 = newColor
  2092. color.BackgroundColor3 = Color3.fromHSV(Colorpicker.Hue, 1, 1)
  2093. color_selection.BackgroundColor3 = newColor
  2094.  
  2095. -- Update hex input safely
  2096. if inputHex then
  2097. inputHex.Text = "#" .. newColor:ToHex()
  2098. end
  2099.  
  2100. -- Call callback safely
  2101. pcall(Colorpicker.Callback, newColor)
  2102. end
  2103.  
  2104. local function UpdateColorPickerPosition()
  2105. local ColorX = math.clamp(mouse.X - color.AbsolutePosition.X, 0, color.AbsoluteSize.X)
  2106. local ColorY = math.clamp(mouse.Y - color.AbsolutePosition.Y, 0, color.AbsoluteSize.Y)
  2107. color_selection.Position = UDim2.new(ColorX / color.AbsoluteSize.X, 0, ColorY / color.AbsoluteSize.Y, 0)
  2108. Colorpicker.Sat = ColorX / color.AbsoluteSize.X
  2109. Colorpicker.Vib = 1 - (ColorY / color.AbsoluteSize.Y)
  2110. UpdateColorPicker()
  2111. inputHex.Text = "#" .. Color3.fromHSV(Colorpicker.Hue, Colorpicker.Sat, Colorpicker.Vib):ToHex()
  2112. end
  2113.  
  2114. local function UpdateHuePickerPosition()
  2115. local HueY = math.clamp(mouse.Y - hue.AbsolutePosition.Y, 0, hue.AbsoluteSize.Y)
  2116. hue_selection.Position = UDim2.new(0.5, 0, HueY / hue.AbsoluteSize.Y, 0)
  2117. Colorpicker.Hue = HueY / hue.AbsoluteSize.Y
  2118. UpdateColorPicker()
  2119. inputHex.Text = "#" .. Color3.fromHSV(Colorpicker.Hue, Colorpicker.Sat, Colorpicker.Vib):ToHex()
  2120. end
  2121.  
  2122. local ColorInput, HueInput = nil, nil
  2123.  
  2124. AddConnection(color.InputBegan, function(input)
  2125. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2126. if RainbowColorPicker then
  2127. return
  2128. end
  2129. if ColorInput then
  2130. ColorInput:Disconnect()
  2131. end
  2132. ColorInput = AddConnection(mouse.Move, UpdateColorPickerPosition)
  2133. UpdateColorPickerPosition()
  2134. end
  2135. end)
  2136.  
  2137. AddConnection(color.InputEnded, function(input)
  2138. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2139. if ColorInput then
  2140. ColorInput:Disconnect()
  2141. ColorInput = nil
  2142. end
  2143. end
  2144. end)
  2145.  
  2146. AddConnection(hue.InputBegan, function(input)
  2147. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2148. if RainbowColorPicker then
  2149. return
  2150. end
  2151. if HueInput then
  2152. HueInput:Disconnect()
  2153. end
  2154. HueInput = AddConnection(mouse.Move, UpdateHuePickerPosition)
  2155. UpdateHuePickerPosition()
  2156. end
  2157. end)
  2158.  
  2159. AddConnection(hue.InputEnded, function(input)
  2160. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2161. if HueInput then
  2162. HueInput:Disconnect()
  2163. HueInput = nil
  2164. end
  2165. end
  2166. end)
  2167.  
  2168. AddConnection(ColorpickerFrame.Frame.MouseButton1Click, function()
  2169. Colorpicker.ColorpickerToggle = not Colorpicker.ColorpickerToggle
  2170. colorpicker_frame.Visible = Colorpicker.ColorpickerToggle
  2171. end)
  2172.  
  2173. AddConnection(rainbowtoggle.MouseButton1Click, function()
  2174. RainbowColorPicker = not RainbowColorPicker
  2175. Colorpicker.RainbowMode = RainbowColorPicker -- Update the Colorpicker table
  2176. TweenService:Create(
  2177. togglebox,
  2178. TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  2179. { BackgroundTransparency = RainbowColorPicker and 0 or 1 }
  2180. ):Play()
  2181. if RainbowColorPicker then
  2182. local function UpdateRainbowColor()
  2183. while RainbowColorPicker do
  2184. Colorpicker.Hue, Colorpicker.Sat, Colorpicker.Vib = RainbowColorValue, 1, 1
  2185. hue_selection.Position = UDim2.new(0.5, 0, 0, HueSelectionPosition)
  2186. hue_selection.Position = UDim2.new(1, -10, 0, 0)
  2187. UpdateColorPicker()
  2188. wait()
  2189. end
  2190. end
  2191. coroutine.wrap(UpdateRainbowColor)()
  2192. end
  2193. end)
  2194.  
  2195. function Colorpicker:Set(newColor)
  2196. if typeof(newColor) ~= "Color3" then
  2197. warn("Invalid color value provided to Set")
  2198. return
  2199. end
  2200.  
  2201. self:SetHSVFromRGB(newColor)
  2202.  
  2203. -- Update UI elements safely
  2204. if color_selection and colorBox and hue_selection then
  2205. color_selection.Position = UDim2.new(self.Sat, 0, 1 - self.Vib, 0)
  2206. colorBox.BackgroundColor3 = newColor
  2207. hue_selection.Position = UDim2.new(0.5, 0, self.Hue, 0)
  2208. UpdateColorPicker()
  2209. end
  2210. end
  2211.  
  2212. self.Library.Flags[Idx] = Colorpicker
  2213. return Colorpicker
  2214. end
  2215.  
  2216. return Element
  2217.  
  2218. end)() end,
  2219. [12] = function()local wax,script,require=ImportGlobals(12)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  2220. local Components = script.Parent.Parent.components
  2221. local TweenService = game:GetService("TweenService")
  2222.  
  2223. local Create = Tools.Create
  2224. local AddConnection = Tools.AddConnection
  2225. local CurrentThemeProps = Tools.GetPropsCurrentTheme()
  2226.  
  2227. local Element = {}
  2228. Element.__index = Element
  2229. Element.__type = "Dropdown"
  2230.  
  2231. function Element:New(Idx, Config)
  2232. assert(Config.Title, "Dropdown - Missing Title")
  2233. Config.Description = Config.Description or nil
  2234.  
  2235. Config.Options = Config.Options or {}
  2236. Config.Default = Config.Default or ""
  2237. Config.IgnoreFirst = Config.IgnoreFirst or false
  2238. Config.Multiple = Config.Multiple or false
  2239. Config.MaxOptions = Config.MaxOptions or math.huge
  2240. Config.PlaceHolder = Config.PlaceHolder or ""
  2241. Config.Callback = Config.Callback or function() end
  2242.  
  2243. local Dropdown = {
  2244. Value = Config.Default,
  2245. Options = Config.Options,
  2246. Buttons = {},
  2247. Toggled = false,
  2248. Type = "Dropdown",
  2249. Multiple = Config.Multiple, -- Add Multiple flag
  2250. Callback = Config.Callback -- Store callback
  2251. }
  2252. local MaxElements = 5
  2253.  
  2254. local DropdownFrame = require(Components.element)(Config.Title, Config.Description, self.Container)
  2255.  
  2256. local DropdownElement = Create("Frame", {
  2257. AutomaticSize = Enum.AutomaticSize.Y,
  2258. ThemeProps = {
  2259. BackgroundColor3 = "maincolor"
  2260. },
  2261. BackgroundTransparency = 1,
  2262. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2263. BorderSizePixel = 0,
  2264. Size = UDim2.new(1, 0, 0, 30),
  2265. Visible = true,
  2266. Parent = DropdownFrame.Frame,
  2267. }, {
  2268. Create("UIStroke", {
  2269. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2270. -- Color = Color3.fromRGB(24, 24, 26),
  2271. ThemeProps = { Color = "bordercolor" },
  2272. Enabled = true,
  2273. LineJoinMode = Enum.LineJoinMode.Round,
  2274. Thickness = 1,
  2275. Archivable = true,
  2276. }),
  2277. Create("UICorner", {
  2278. CornerRadius = UDim.new(0, 4),
  2279. Archivable = true,
  2280. }),
  2281. Create("UIListLayout", {
  2282. Wraps = true,
  2283. FillDirection = Enum.FillDirection.Horizontal,
  2284. SortOrder = Enum.SortOrder.LayoutOrder,
  2285. }, {}),
  2286. })
  2287.  
  2288. local holder = Create("Frame", {
  2289. AutomaticSize = Enum.AutomaticSize.XY,
  2290. ThemeProps = {
  2291. BackgroundColor3 = "maincolor"
  2292. },
  2293. BackgroundTransparency = 1,
  2294. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2295. BorderSizePixel = 0,
  2296. Size = UDim2.new(0, 0, 0, 30),
  2297. Visible = true,
  2298. Parent = DropdownElement,
  2299. }, {
  2300. Create("UIPadding", {
  2301. PaddingBottom = UDim.new(0, 4),
  2302. PaddingLeft = UDim.new(0, 6),
  2303. PaddingRight = UDim.new(0, 6),
  2304. PaddingTop = UDim.new(0, 4),
  2305. Archivable = true,
  2306. }),
  2307. Create("UIListLayout", {
  2308. Padding = UDim.new(0, 4),
  2309. Wraps = true,
  2310. FillDirection = Enum.FillDirection.Horizontal,
  2311. SortOrder = Enum.SortOrder.LayoutOrder,
  2312. }, {}),
  2313. Create("UIFlexItem", {
  2314. FlexMode = Enum.UIFlexMode.Shrink,
  2315. }, {}),
  2316. })
  2317.  
  2318. local search = Create("TextBox", {
  2319. CursorPosition = -1,
  2320. Font = Enum.Font.Gotham,
  2321. PlaceholderText = Config.PlaceHolder,
  2322. Text = "",
  2323. TextColor3 = Color3.fromRGB(255, 255, 255),
  2324. TextSize = 14,
  2325. TextXAlignment = Enum.TextXAlignment.Left,
  2326. ThemeProps = {
  2327. BackgroundColor3 = "maincolor"
  2328. },
  2329. BackgroundTransparency = 1,
  2330. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2331. BorderSizePixel = 0,
  2332. Size = UDim2.new(0, 120, 0, 30),
  2333. Visible = true,
  2334. Parent = DropdownElement,
  2335. }, {
  2336. Create("UIPadding", {
  2337. PaddingBottom = UDim.new(0, 0),
  2338. PaddingLeft = UDim.new(0, 12),
  2339. PaddingRight = UDim.new(0, 12),
  2340. PaddingTop = UDim.new(0, 0),
  2341. Archivable = true,
  2342. }),
  2343. Create("UIFlexItem", {
  2344. FlexMode = Enum.UIFlexMode.Fill,
  2345. }),
  2346. })
  2347.  
  2348. local dropcont = Create("Frame", {
  2349. -- Text = "",
  2350. -- AutoButtonColor = false,
  2351. AutomaticSize = Enum.AutomaticSize.Y,
  2352. -- BackgroundColor3 = Color3.fromRGB(28, 25, 23),
  2353. ThemeProps = { BackgroundColor3 = "containeritemsbg" },
  2354. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2355. BorderSizePixel = 0,
  2356. -- Position = UDim2.new(0, 0, 0, 80),
  2357. Size = UDim2.new(1, 0, 0, 0),
  2358. Visible = false,
  2359. Parent = DropdownFrame.Frame,
  2360. }, {
  2361. Create("UIStroke", {
  2362. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2363. -- Color = Color3.fromRGB(39, 39, 42),
  2364. ThemeProps = { Color = "bordercolor" },
  2365. Enabled = true,
  2366. LineJoinMode = Enum.LineJoinMode.Round,
  2367. Thickness = 1,
  2368. Archivable = true,
  2369. }),
  2370. Create("UICorner", {
  2371. CornerRadius = UDim.new(0, 6),
  2372. Archivable = true,
  2373. }),
  2374. Create("UIPadding", {
  2375. PaddingBottom = UDim.new(0, 10),
  2376. PaddingLeft = UDim.new(0, 10),
  2377. PaddingRight = UDim.new(0, 10),
  2378. PaddingTop = UDim.new(0, 10),
  2379. Archivable = true,
  2380. }),
  2381. Create("UIListLayout", {
  2382. Padding = UDim.new(0, 4),
  2383. SortOrder = Enum.SortOrder.LayoutOrder,
  2384. }),
  2385. })
  2386.  
  2387. AddConnection(search.Focused, function()
  2388. Dropdown.Toggled = true
  2389. dropcont.Visible = true
  2390. end)
  2391. AddConnection(DropdownFrame.Frame.MouseButton1Click, function()
  2392. Dropdown.Toggled = not Dropdown.Toggled
  2393. dropcont.Visible = Dropdown.Toggled
  2394. end)
  2395. function SearchOptions()
  2396. local searchText = string.lower(search.Text)
  2397. for _, v in ipairs(dropcont:GetChildren()) do
  2398. if v:IsA("TextButton") then
  2399. local buttonText = string.lower(v.TextLabel.Text)
  2400. if string.find(buttonText, searchText) then
  2401. v.Visible = true
  2402. else
  2403. v.Visible = false
  2404. end
  2405. end
  2406. end
  2407. end
  2408.  
  2409. AddConnection(search.Changed, SearchOptions)
  2410.  
  2411. local function AddOptions(Options)
  2412. for _, Option in pairs(Options) do
  2413. local check = Create("ImageLabel", {
  2414. Image = "rbxassetid://15269180838",
  2415. ThemeProps = { ImageColor3 = "itemcheckmarkcolor", },
  2416. ImageRectOffset = Vector2.new(514, 257),
  2417. ImageRectSize = Vector2.new(256, 256),
  2418. AnchorPoint = Vector2.new(1, 0.5),
  2419. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2420. BackgroundTransparency = 1,
  2421. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2422. BorderSizePixel = 0,
  2423. Position = UDim2.new(1, -9, 0.5, 0),
  2424. Size = UDim2.new(0, 14, 0, 14),
  2425. Visible = true,
  2426. })
  2427.  
  2428. local text_label_2 = Create("TextLabel", {
  2429. Font = Enum.Font.Gotham,
  2430. Text = Option,
  2431. LineHeight = 0,
  2432. TextColor3 = Color3.fromRGB(154, 154, 154),
  2433. TextSize = 14,
  2434. TextXAlignment = Enum.TextXAlignment.Left,
  2435. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2436. BackgroundTransparency = 1,
  2437. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2438. BorderSizePixel = 0,
  2439. Size = UDim2.new(1, 0, 1, 0),
  2440. Visible = true,
  2441. }, {
  2442. Create("UIPadding", {
  2443. PaddingBottom = UDim.new(0, 0),
  2444. PaddingLeft = UDim.new(0, 14),
  2445. PaddingRight = UDim.new(0, 0),
  2446. PaddingTop = UDim.new(0, 0),
  2447. Archivable = true,
  2448. }),
  2449. })
  2450.  
  2451. local dropbtn = Create("TextButton", {
  2452. Font = Enum.Font.SourceSans,
  2453. Text = "",
  2454. TextColor3 = Color3.fromRGB(0, 0, 0),
  2455. TextSize = 14,
  2456. ThemeProps = { BackgroundColor3 = "itembg" },
  2457. BackgroundTransparency = 1,
  2458. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2459. BorderSizePixel = 0,
  2460. Size = UDim2.new(1, 0, 0, 30),
  2461. Visible = true,
  2462. Parent = dropcont,
  2463. }, {
  2464. Create("UICorner", {
  2465. CornerRadius = UDim.new(0, 6),
  2466. Archivable = true,
  2467. }),
  2468. text_label_2,
  2469. check,
  2470. })
  2471.  
  2472. AddConnection(dropbtn.MouseButton1Click, function()
  2473. if Config.Multiple then
  2474. local index = table.find(Dropdown.Value, Option)
  2475. if index then
  2476. table.remove(Dropdown.Value, index)
  2477. Dropdown:Set(Dropdown.Value)
  2478. if #Dropdown.Value == 0 then
  2479. Config.Callback = {}
  2480. end
  2481. else
  2482. Dropdown:Set(Option)
  2483. end
  2484. else
  2485. if Dropdown.Value == Option then
  2486. Dropdown:Set("")
  2487. Config.Callback("")
  2488. else
  2489. Dropdown:Set(Option)
  2490. end
  2491. end
  2492.  
  2493. if not Config.Multiple then
  2494. Dropdown.Toggled = false
  2495. dropcont.Visible = false
  2496. end
  2497. end)
  2498.  
  2499. Dropdown.Buttons[Option] = dropbtn
  2500. end
  2501. end
  2502.  
  2503. function Dropdown:Refresh(Options, Delete)
  2504. if Delete then
  2505. for _, v in pairs(Dropdown.Buttons) do
  2506. v:Destroy()
  2507. end
  2508. Dropdown.Buttons = {}
  2509. end
  2510. Dropdown.Options = Options
  2511. AddOptions(Dropdown.Options)
  2512. end
  2513.  
  2514. function Dropdown:Set(Value, ignore)
  2515. local function updateButtonTransparency(button, isSelected)
  2516. local transparency = isSelected and 0 or 1
  2517. local textTransparency = isSelected and CurrentThemeProps.itemTextOff or CurrentThemeProps.itemTextOn
  2518. TweenService:Create(
  2519. button,
  2520. TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  2521. { BackgroundTransparency = transparency }
  2522. ):Play()
  2523. TweenService:Create(
  2524. button.ImageLabel,
  2525. TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  2526. { ImageTransparency = transparency }
  2527. ):Play()
  2528. TweenService:Create(
  2529. button.TextLabel,
  2530. TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
  2531. { TextColor3 = textTransparency }
  2532. ):Play()
  2533. end
  2534.  
  2535. local function clearValueText()
  2536. for _, label in pairs(holder:GetChildren()) do
  2537. if label:IsA("TextButton") then
  2538. label:Destroy()
  2539. end
  2540. end
  2541. end
  2542.  
  2543. local function addValueText(text)
  2544. local tagBtn = Create("TextButton", {
  2545. Font = Enum.Font.SourceSans,
  2546. Text = "",
  2547. TextColor3 = Color3.fromRGB(255, 255, 255),
  2548. TextSize = 14,
  2549. AutomaticSize = Enum.AutomaticSize.X,
  2550. -- BackgroundColor3 = Color3.fromRGB(39, 39, 42),
  2551. ThemeProps = { BackgroundColor3 = "valuebg" },
  2552. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2553. BorderSizePixel = 0,
  2554. Size = UDim2.new(0, 0, 0, 22),
  2555. Visible = true,
  2556. Parent = holder,
  2557. }, {
  2558. Create("UICorner", {
  2559. CornerRadius = UDim.new(1, 0),
  2560. Archivable = true,
  2561. }),
  2562. Create("UIPadding", {
  2563. PaddingBottom = UDim.new(0, 0),
  2564. PaddingLeft = UDim.new(0, 10),
  2565. PaddingRight = UDim.new(0, 10),
  2566. PaddingTop = UDim.new(0, 0),
  2567. Archivable = true,
  2568. }),
  2569. Create("UIListLayout", {
  2570. Padding = UDim.new(0, 4),
  2571. FillDirection = Enum.FillDirection.Horizontal,
  2572. SortOrder = Enum.SortOrder.LayoutOrder,
  2573. VerticalAlignment = Enum.VerticalAlignment.Center,
  2574. }, {}),
  2575. Create("TextLabel", {
  2576. Font = Enum.Font.Gotham,
  2577. ThemeProps = { TextColor3 = "valuetext" },
  2578. TextSize = 14,
  2579. Text = text,
  2580. AutomaticSize = Enum.AutomaticSize.X,
  2581. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2582. BackgroundTransparency = 1,
  2583. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2584. BorderSizePixel = 0,
  2585. Size = UDim2.new(0, 0, 1, 0),
  2586. }, {}),
  2587. })
  2588.  
  2589. local closebtn = Create("TextButton", {
  2590. Font = Enum.Font.SourceSans,
  2591. Text = "",
  2592. TextColor3 = Color3.fromRGB(0, 0, 0),
  2593. TextSize = 14,
  2594. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2595. BackgroundTransparency = 1,
  2596. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2597. BorderSizePixel = 0,
  2598. Size = UDim2.new(0, 16, 0, 16),
  2599. Visible = true,
  2600. Parent = tagBtn,
  2601. }, {
  2602. Create("ImageLabel", {
  2603. Image = "rbxassetid://15269329696",
  2604. ImageRectOffset = Vector2.new(0, 514),
  2605. ImageRectSize = Vector2.new(256, 256),
  2606. AnchorPoint = Vector2.new(0.5, 0.5),
  2607. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2608. BackgroundTransparency = 1,
  2609. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2610. BorderSizePixel = 0,
  2611. Position = UDim2.new(0.5, 0, 0.5, 0),
  2612. Size = UDim2.new(0, 16, 0, 16),
  2613. Visible = true,
  2614. }, {}),
  2615. })
  2616.  
  2617. -- AddConnection(closebtn.MouseButton1Click, function()
  2618. -- if Config.Multiple then
  2619. -- local index = table.find(Dropdown.Value, text)
  2620. -- if index then
  2621. -- tagBtn:Destroy()
  2622. -- table.remove(Dropdown.Value, index)
  2623. -- end
  2624. -- end
  2625. -- end)
  2626. AddConnection(tagBtn.MouseButton1Click, function()
  2627. if Config.Multiple then
  2628. local index = table.find(Dropdown.Value, text)
  2629. if index then
  2630. table.remove(Dropdown.Value, index)
  2631. Dropdown:Set(Dropdown.Value)
  2632. if #Dropdown.Value == 0 then
  2633. Config.Callback("")
  2634. end
  2635. end
  2636. else
  2637. Dropdown:Set("")
  2638. Config.Callback("")
  2639. end
  2640. end)
  2641.  
  2642. AddConnection(closebtn.MouseButton1Click, function()
  2643. if Config.Multiple then
  2644. local index = table.find(Dropdown.Value, text)
  2645. if index then
  2646. table.remove(Dropdown.Value, index)
  2647. Dropdown:Set(Dropdown.Value)
  2648. if #Dropdown.Value == 0 then
  2649. Config.Callback("")
  2650. end
  2651. end
  2652. else
  2653. Dropdown:Set("")
  2654. Config.Callback("")
  2655. end
  2656. end)
  2657. end
  2658.  
  2659. -- Handle the Value assignment properly for both single and multiple modes
  2660. if Config.Multiple then
  2661. if type(Value) == "table" then
  2662. Dropdown.Value = Value
  2663. elseif Value ~= "" then -- Only modify if not clearing
  2664. if type(Dropdown.Value) ~= "table" then
  2665. Dropdown.Value = {}
  2666. end
  2667. local index = table.find(Dropdown.Value, Value)
  2668. if index then
  2669. table.remove(Dropdown.Value, index)
  2670. else
  2671. if #Dropdown.Value < (Config.MaxOptions or math.huge) then
  2672. table.insert(Dropdown.Value, Value)
  2673. end
  2674. end
  2675. else
  2676. Dropdown.Value = {} -- Clear the selection
  2677. end
  2678. else
  2679. -- For single selection, just set the value directly
  2680. Dropdown.Value = Value
  2681. end
  2682.  
  2683. local found = Config.Multiple or table.find(Dropdown.Options, Value)
  2684. if Config.Multiple then
  2685. for i = #Dropdown.Value, 1, -1 do
  2686. if not table.find(Dropdown.Options, Dropdown.Value[i]) then
  2687. table.remove(Dropdown.Value, i)
  2688. end
  2689. end
  2690. found = #Dropdown.Value > 0
  2691. end
  2692.  
  2693. clearValueText()
  2694.  
  2695. if not found then
  2696. Dropdown.Value = Config.Multiple and {} or ""
  2697. for _, button in pairs(Dropdown.Buttons) do
  2698. updateButtonTransparency(button, false)
  2699. end
  2700. return
  2701. end
  2702.  
  2703. if Config.Multiple then
  2704. for _, val in ipairs(Dropdown.Value) do
  2705. addValueText(val)
  2706. end
  2707. else
  2708. addValueText(Dropdown.Value)
  2709. end
  2710.  
  2711. for i, button in pairs(Dropdown.Buttons) do
  2712. local isSelected = (Config.Multiple and table.find(Dropdown.Value, i))
  2713. or (not Config.Multiple and i == Value)
  2714. updateButtonTransparency(button, isSelected)
  2715. end
  2716.  
  2717. if not ignore then
  2718. Config.Callback(Dropdown.Value)
  2719. end
  2720. end
  2721.  
  2722. Dropdown:Refresh(Dropdown.Options, false)
  2723. Dropdown:Set(Dropdown.Value, Config.IgnoreFirst)
  2724.  
  2725. self.Library.Flags[Idx] = Dropdown
  2726. return Dropdown
  2727. end
  2728.  
  2729. return Element
  2730.  
  2731. end)() end,
  2732. [13] = function()local wax,script,require=ImportGlobals(13)local ImportGlobals return (function(...)local Components = script.Parent.Parent.components
  2733.  
  2734. local Element = {}
  2735. Element.__index = Element
  2736. Element.__type = "Paragraph"
  2737.  
  2738. function Element:New(Config)
  2739. assert(Config.Title, "Paragraph - Missing Title")
  2740. Config.Description = Config.Description or nil
  2741.  
  2742. local paragraph = require(Components.element)(Config.Title, Config.Description, self.Container)
  2743.  
  2744. return paragraph
  2745. end
  2746.  
  2747. return Element
  2748.  
  2749. end)() end,
  2750. [14] = function()local wax,script,require=ImportGlobals(14)local ImportGlobals return (function(...)local UserInputService = game:GetService("UserInputService")
  2751. local TweenService = game:GetService("TweenService")
  2752.  
  2753. local Tools = require(script.Parent.Parent.tools)
  2754. local Components = script.Parent.Parent.components
  2755.  
  2756. local Create = Tools.Create
  2757. local AddConnection = Tools.AddConnection
  2758. local function Round(Number, Factor)
  2759. local Result = math.floor(Number / Factor + (math.sign(Number) * 0.5)) * Factor
  2760. if Result < 0 then
  2761. Result = Result + Factor
  2762. end
  2763. return Result
  2764. end
  2765.  
  2766. local Element = {}
  2767. Element.__index = Element
  2768. Element.__type = "Slider"
  2769.  
  2770. function Element:New(Idx, Config)
  2771. local Library = self.Library
  2772. assert(Config.Title, "Slider - Missing Title")
  2773. Config.Description = Config.Description or nil
  2774.  
  2775. Config.Min = Config.Min or 10
  2776. Config.Max = Config.Max or 20
  2777. Config.Increment = Config.Increment or 1
  2778. Config.Default = Config.Default or 0
  2779. Config.IgnoreFirst = Config.IgnoreFirst or false
  2780.  
  2781. local Slider = {
  2782. Value = Config.Default,
  2783. Min = Config.Min,
  2784. Max = Config.Max,
  2785. Increment = Config.Increment,
  2786. IgnoreFirst = Config.IgnoreFirst,
  2787. Callback = Config.Callback or function(Value) end,
  2788. Type = "Slider",
  2789. }
  2790.  
  2791. local Dragging = false
  2792. local DraggingDot = false
  2793.  
  2794. local SliderFrame = require(Components.element)(Config.Title, Config.Description, self.Container)
  2795.  
  2796. local ValueText = Create("TextLabel", {
  2797. Font = Enum.Font.Gotham,
  2798. RichText = true,
  2799. Text = "fix it good pls",
  2800. ThemeProps = {
  2801. TextColor3 = "titlecolor",
  2802. },
  2803. TextSize = 16,
  2804. TextXAlignment = Enum.TextXAlignment.Right,
  2805. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2806. BackgroundTransparency = 1,
  2807. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2808. BorderSizePixel = 0,
  2809. Position = UDim2.new(0.754537523, 8, 0, 0),
  2810. Size = UDim2.new(0, 90, 0, 16),
  2811. Visible = true,
  2812. Parent = SliderFrame.topbox,
  2813. })
  2814.  
  2815. local SliderBar = Create("Frame", {
  2816. AnchorPoint = Vector2.new(0.5, 0),
  2817. ThemeProps = { BackgroundColor3 = "sliderbar" },
  2818. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2819. BorderSizePixel = 0,
  2820. Position = UDim2.new(0.5, 0, 0, 26),
  2821. Size = UDim2.new(1, -6, 0, 2),
  2822. Visible = true,
  2823. Parent = SliderFrame.Frame,
  2824. }, {
  2825. Create("UICorner", {
  2826. CornerRadius = UDim.new(0, 2),
  2827. Archivable = true,
  2828. }),
  2829. Create("UIStroke", {
  2830. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2831. ThemeProps = { Color = "sliderbarstroke" },
  2832. Enabled = true,
  2833. LineJoinMode = Enum.LineJoinMode.Round,
  2834. Thickness = 1,
  2835. Archivable = true,
  2836. }),
  2837. })
  2838.  
  2839. local SliderProgress = Create("Frame", {
  2840. AnchorPoint = Vector2.new(0, 0.5),
  2841. ThemeProps = { BackgroundColor3 = "sliderprogressbg" },
  2842. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2843. BorderSizePixel = 0,
  2844. Position = UDim2.new(0, 0, 0.5, 0),
  2845. Size = UDim2.new(0, 100, 1, 0),
  2846. Visible = true,
  2847. Parent = SliderBar,
  2848. }, {
  2849. Create("UICorner", {
  2850. CornerRadius = UDim.new(0, 2),
  2851. Archivable = true,
  2852. }),
  2853. Create("UIStroke", {
  2854. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2855. ThemeProps = { Color = "sliderprogressborder" },
  2856. Enabled = true,
  2857. LineJoinMode = Enum.LineJoinMode.Round,
  2858. Thickness = 1,
  2859. Archivable = true,
  2860. }),
  2861. })
  2862.  
  2863. -- Adjusted dot size to 14x14 (smaller than 20x20 but larger than original 10x10)
  2864. local SliderDot = Create("Frame", {
  2865. AnchorPoint = Vector2.new(0.5, 0.5),
  2866. ThemeProps = { BackgroundColor3 = "sliderdotbg" },
  2867. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2868. BorderSizePixel = 0,
  2869. Position = UDim2.new(1, 0, 0.5, 0),
  2870. Size = UDim2.new(0, 10, 0, 10), -- Adjusted size
  2871. Visible = true,
  2872. Parent = SliderBar,
  2873. }, {
  2874. Create("UIStroke", {
  2875. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  2876. ThemeProps = { Color = "sliderdotstroke" },
  2877. Enabled = true,
  2878. LineJoinMode = Enum.LineJoinMode.Round,
  2879. Thickness = 1,
  2880. Archivable = true,
  2881. }),
  2882. Create("UICorner", {
  2883. CornerRadius = UDim.new(1, 0),
  2884. Archivable = true,
  2885. }),
  2886. })
  2887.  
  2888. function Slider:Set(Value, ignore)
  2889. self.Value = math.clamp(Round(Value, Config.Increment), Config.Min, Config.Max)
  2890. ValueText.Text = string.format("%s<font transparency='0.5'>/%s </font>", tostring(self.Value), Config.Max)
  2891.  
  2892. local newPosition = (self.Value - Config.Min) / (Config.Max - Config.Min)
  2893.  
  2894. if DraggingDot then
  2895. -- Instant update when dragging dot
  2896. SliderDot.Position = UDim2.new(newPosition, 0, 0.5, 0)
  2897. SliderProgress.Size = UDim2.fromScale(newPosition, 1)
  2898. else
  2899. -- Smooth tween when not dragging
  2900. TweenService:Create(SliderDot, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
  2901. Position = UDim2.new(newPosition, 0, 0.5, 0)
  2902. }):Play()
  2903.  
  2904. TweenService:Create(SliderProgress, TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
  2905. Size = UDim2.fromScale(newPosition, 1)
  2906. }):Play()
  2907. end
  2908.  
  2909. if not ignore then
  2910. return Config.Callback(self.Value)
  2911. end
  2912. end
  2913.  
  2914. local function updateSliderFromInput(inputPosition)
  2915. if Dragging then
  2916. local barPosition = SliderBar.AbsolutePosition
  2917. local barSize = SliderBar.AbsoluteSize
  2918. local relativeX = (inputPosition.X - barPosition.X) / barSize.X
  2919. local clampedPosition = math.clamp(relativeX, 0, 1)
  2920. local newValue = Config.Min + (Config.Max - Config.Min) * clampedPosition
  2921. Slider:Set(newValue)
  2922. end
  2923. end
  2924.  
  2925. AddConnection(SliderBar.InputBegan, function(input)
  2926. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2927. Dragging = true
  2928. updateSliderFromInput(input.Position)
  2929. end
  2930. end)
  2931.  
  2932. AddConnection(SliderDot.InputBegan, function(input)
  2933. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2934. Dragging = true
  2935. DraggingDot = true
  2936. updateSliderFromInput(input.Position)
  2937. end
  2938. end)
  2939.  
  2940. AddConnection(UserInputService.InputEnded, function(input)
  2941. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2942. Dragging = false
  2943. DraggingDot = false
  2944. end
  2945. end)
  2946.  
  2947. AddConnection(UserInputService.InputChanged, function(input)
  2948. if Dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  2949. updateSliderFromInput(input.Position)
  2950. end
  2951. end)
  2952.  
  2953. Slider:Set(Config.Default, Config.IgnoreFirst)
  2954.  
  2955. Library.Flags[Idx] = Slider
  2956. return Slider
  2957. end
  2958.  
  2959. return Element
  2960. end)() end,
  2961. [15] = function()local wax,script,require=ImportGlobals(15)local ImportGlobals return (function(...)local Tools = require(script.Parent.Parent.tools)
  2962. local Components = script.Parent.Parent.components
  2963.  
  2964. local Create = Tools.Create
  2965. local AddConnection = Tools.AddConnection
  2966. local Element = {}
  2967. Element.__index = Element
  2968. Element.__type = "Textbox"
  2969.  
  2970. function Element:New(Config)
  2971. assert(Config, "Textbox - Missing Config table")
  2972. assert(Config.Title, "Textbox - Missing Title")
  2973. Config.Description = Config.Description or nil
  2974. Config.PlaceHolder = Config.PlaceHolder or ""
  2975. Config.Default = Config.Default or ""
  2976. Config.TextDisappear = Config.TextDisappear or false
  2977. Config.Callback = Config.Callback or function() end
  2978.  
  2979. local Textbox = {
  2980. Value = Config.Default or "",
  2981. Callback = Config.Callback,
  2982. Type = "Textbox",
  2983. }
  2984.  
  2985. local TextboxFrame = require(Components.element)(Config.Title, Config.Description, self.Container)
  2986.  
  2987. local textbox = Create("TextBox", {
  2988. CursorPosition = -1,
  2989. Font = Enum.Font.Gotham,
  2990. PlaceholderText = Config.PlaceHolder,
  2991. Text = Textbox.Value,
  2992. TextColor3 = Color3.fromRGB(255, 255, 255),
  2993. TextSize = 14,
  2994. TextXAlignment = Enum.TextXAlignment.Left,
  2995. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  2996. BackgroundTransparency = 1,
  2997. BorderColor3 = Color3.fromRGB(0, 0, 0),
  2998. BorderSizePixel = 0,
  2999. Size = UDim2.new(1, 0, 0, 30),
  3000. Visible = true,
  3001. Parent = TextboxFrame.Frame,
  3002. }, {
  3003. Create("UIPadding", {
  3004. PaddingBottom = UDim.new(0, 0),
  3005. PaddingLeft = UDim.new(0, 12),
  3006. PaddingRight = UDim.new(0, 12),
  3007. PaddingTop = UDim.new(0, 0),
  3008. Archivable = true,
  3009. }),
  3010. Create("UIStroke", {
  3011. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  3012. ThemeProps = { Color = "bordercolor" },
  3013. Enabled = true,
  3014. LineJoinMode = Enum.LineJoinMode.Round,
  3015. Thickness = 1,
  3016. Archivable = true,
  3017. }),
  3018. Create("UICorner", {
  3019. CornerRadius = UDim.new(0, 4),
  3020. Archivable = true,
  3021. }),
  3022. })
  3023.  
  3024. function Textbox:Set(value)
  3025. textbox.Text = value
  3026. Textbox.Value = value
  3027. Config.Callback(value)
  3028. end
  3029.  
  3030. AddConnection(textbox.FocusLost, function()
  3031. Textbox.Value = textbox.Text
  3032. Config.Callback(Textbox.Value)
  3033. if Config.TextDisappear then
  3034. textbox.Text = ""
  3035. end
  3036. end)
  3037.  
  3038. return Textbox
  3039. end
  3040.  
  3041. return Element
  3042.  
  3043. end)() end,
  3044. [16] = function()local wax,script,require=ImportGlobals(16)local ImportGlobals return (function(...)local TweenService = game:GetService("TweenService")
  3045. local Tools = require(script.Parent.Parent.tools)
  3046. local Components = script.Parent.Parent.components
  3047.  
  3048. local Create = Tools.Create
  3049. local AddConnection = Tools.AddConnection
  3050.  
  3051. local Element = {}
  3052. Element.__index = Element
  3053. Element.__type = "Toggle"
  3054.  
  3055. function Element:New(Idx, Config)
  3056. local Library = self.Library
  3057. assert(Config.Title, "Toggle - Missing Title")
  3058. Config.Description = Config.Description or nil
  3059. Config.Default = Config.Default or false
  3060. Config.IgnoreFirst = Config.IgnoreFirst or false
  3061.  
  3062. local Toggle = {
  3063. Value = Config.Default,
  3064. Callback = Config.Callback or function(Value) end,
  3065. IgnoreFirst = Config.IgnoreFirst,
  3066. Type = "Toggle",
  3067. }
  3068.  
  3069. local ToggleFrame = require(Components.element)(" " .. Config.Title, Config.Description, self.Container)
  3070.  
  3071. local box_frame = Create("Frame", {
  3072. ThemeProps = {
  3073. BackgroundColor3 = "togglebg",
  3074. },
  3075. BorderColor3 = Color3.fromRGB(0, 0, 0),
  3076. BorderSizePixel = 0,
  3077. Size = UDim2.new(0, 16, 0, 16),
  3078. Visible = true,
  3079. Parent = ToggleFrame.topbox,
  3080. }, {
  3081. Create("UICorner", {
  3082. CornerRadius = UDim.new(0, 5),
  3083. Archivable = true,
  3084. }),
  3085. Create("UIStroke", {
  3086. ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
  3087. ThemeProps = {
  3088. Color = "toggleborder",
  3089. },
  3090. Enabled = true,
  3091. LineJoinMode = Enum.LineJoinMode.Round,
  3092. Thickness = 1,
  3093. Archivable = true,
  3094. }),
  3095. Create("ImageLabel", {
  3096. Image = "http://www.roblox.com/asset/?id=6031094667",
  3097. -- ImageColor3 = Color3.fromRGB(9, 9, 9),
  3098. ThemeProps = {
  3099. ImageColor3 = "maincolor"
  3100. },
  3101. AnchorPoint = Vector2.new(0.5, 0.5),
  3102. BackgroundColor3 = Color3.fromRGB(255, 255, 255),
  3103. BackgroundTransparency = 1,
  3104. BorderColor3 = Color3.fromRGB(0, 0, 0),
  3105. BorderSizePixel = 0,
  3106. Position = UDim2.new(0.5, 0, 0.5, 0),
  3107. Size = UDim2.new(0, 12, 0, 12),
  3108. Visible = true,
  3109. })
  3110. })
  3111.  
  3112. function Toggle:Set(Value, ignore)
  3113. self.Value = Value
  3114. TweenService:Create(box_frame, TweenInfo.new(0.25, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {BackgroundTransparency = self.Value and 0 or 1}):Play()
  3115. if not ignore and (not self.IgnoreFirst or not self.FirstUpdate) then
  3116. Library:Callback(Toggle.Callback, self.Value)
  3117. end
  3118. self.FirstUpdate = false
  3119. end
  3120.  
  3121. AddConnection(ToggleFrame.Frame.MouseButton1Click, function()
  3122. Toggle:Set(not Toggle.Value)
  3123. end)
  3124.  
  3125. Toggle:Set(Toggle.Value, Config.IgnoreFirst)
  3126.  
  3127. Library.Flags[Idx] = Toggle
  3128. return Toggle
  3129. end
  3130.  
  3131. return Element
  3132.  
  3133. end)() end,
  3134. [17] = function()local wax,script,require=ImportGlobals(17)local ImportGlobals return (function(...)local TweenService = game:GetService("TweenService")
  3135. local UserInputService = game:GetService("UserInputService")
  3136. local RunService = game:GetService("RunService")
  3137.  
  3138. local tools = { Signals = {} }
  3139.  
  3140. local themes = loadstring(game:HttpGet("https://raw.githubusercontent.com/Just3itx/3itx-UI-LIB/refs/heads/main/themes"))()
  3141.  
  3142. local currentTheme = themes.default
  3143. local themedObjects = {}
  3144.  
  3145. function tools.SetTheme(themeName)
  3146. if themes[themeName] then
  3147. currentTheme = themes[themeName]
  3148. for _, item in pairs(themedObjects) do
  3149. local obj = item.object
  3150. local props = item.props
  3151. for propName, themeKey in next, props do
  3152. if currentTheme[themeKey] then
  3153. obj[propName] = currentTheme[themeKey]
  3154. end
  3155. end
  3156. end
  3157. else
  3158. warn("Theme not found: " .. themeName)
  3159. end
  3160. end
  3161.  
  3162. function tools.GetPropsCurrentTheme()
  3163. return currentTheme
  3164. end
  3165.  
  3166. function tools.AddTheme(themeName, themeProps)
  3167. themes[themeName] = themeProps
  3168. end
  3169.  
  3170. function tools.isMobile()
  3171. return UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled and not UserInputService.MouseEnabled
  3172. -- return true
  3173. end
  3174.  
  3175. function tools.AddConnection(Signal, Function)
  3176. -- if not Library:IsRunning() then return end
  3177. local connection = Signal:Connect(Function)
  3178. table.insert(tools.Signals, connection)
  3179. return connection -- Return the connection so it can be disconnected later
  3180. end
  3181.  
  3182. function tools.Disconnect()
  3183. for key = #tools.Signals, 1, -1 do
  3184. local Connection = table.remove(tools.Signals, key)
  3185. Connection:Disconnect()
  3186. end
  3187. end
  3188.  
  3189. function tools.Create(Name, Properties, Children)
  3190. local Object = Instance.new(Name)
  3191.  
  3192. if Properties.ThemeProps then
  3193. for propName, themeKey in next, Properties.ThemeProps do
  3194. if currentTheme[themeKey] then
  3195. Object[propName] = currentTheme[themeKey]
  3196. end
  3197. end
  3198. table.insert(themedObjects, { object = Object, props = Properties.ThemeProps })
  3199. Properties.ThemeProps = nil
  3200. end
  3201.  
  3202. for i, v in next, Properties or {} do
  3203. Object[i] = v
  3204. end
  3205. for i, v in next, Children or {} do
  3206. v.Parent = Object
  3207. end
  3208. return Object
  3209. end
  3210.  
  3211. function tools.AddScrollAnim(scrollbar)
  3212. local visibleTween = TweenService:Create(scrollbar, TweenInfo.new(0.25), { ScrollBarImageTransparency = 0 })
  3213. local invisibleTween = TweenService:Create(scrollbar, TweenInfo.new(0.25), { ScrollBarImageTransparency = 1 })
  3214. local lastInteraction = tick()
  3215. local delayTime = 0.6
  3216.  
  3217. local function showScrollbar()
  3218. visibleTween:Play()
  3219. end
  3220.  
  3221. local function hideScrollbar()
  3222. if tick() - lastInteraction >= delayTime then
  3223. invisibleTween:Play()
  3224. end
  3225. end
  3226.  
  3227. tools.AddConnection(scrollbar.MouseEnter, function()
  3228. lastInteraction = tick()
  3229. showScrollbar()
  3230. end)
  3231.  
  3232. tools.AddConnection(scrollbar.MouseLeave, function()
  3233. wait(delayTime)
  3234. hideScrollbar()
  3235. end)
  3236.  
  3237. tools.AddConnection(scrollbar.InputChanged, function(input)
  3238. if
  3239. input.UserInputType == Enum.UserInputType.MouseMovement
  3240. or input.UserInputType == Enum.UserInputType.Touch
  3241. then
  3242. lastInteraction = tick()
  3243. showScrollbar()
  3244. end
  3245. end)
  3246.  
  3247. tools.AddConnection(scrollbar:GetPropertyChangedSignal("CanvasPosition"), function()
  3248. lastInteraction = tick()
  3249. showScrollbar()
  3250. end)
  3251.  
  3252. tools.AddConnection(UserInputService.InputChanged, function(input)
  3253. if input.UserInputType == Enum.UserInputType.MouseWheel then
  3254. lastInteraction = tick()
  3255. showScrollbar()
  3256. end
  3257. end)
  3258.  
  3259. tools.AddConnection(RunService.RenderStepped, function()
  3260. if tick() - lastInteraction >= delayTime then
  3261. hideScrollbar()
  3262. end
  3263. end)
  3264. end
  3265.  
  3266. return tools
  3267.  
  3268. end)() end
  3269. } -- [RefId] = Closure
  3270.  
  3271. -- Holds the actual DOM data
  3272. local ObjectTree = {
  3273. {
  3274. 1,
  3275. 2,
  3276. {
  3277. "MainModule"
  3278. },
  3279. {
  3280. {
  3281. 2,
  3282. 1,
  3283. {
  3284. "components"
  3285. },
  3286. {
  3287. {
  3288. 6,
  3289. 2,
  3290. {
  3291. "section"
  3292. }
  3293. },
  3294. {
  3295. 3,
  3296. 2,
  3297. {
  3298. "dialog"
  3299. }
  3300. },
  3301. {
  3302. 5,
  3303. 2,
  3304. {
  3305. "notif"
  3306. }
  3307. },
  3308. {
  3309. 4,
  3310. 2,
  3311. {
  3312. "element"
  3313. }
  3314. },
  3315. {
  3316. 7,
  3317. 2,
  3318. {
  3319. "tab"
  3320. }
  3321. }
  3322. }
  3323. },
  3324. {
  3325. 8,
  3326. 2,
  3327. {
  3328. "elements"
  3329. },
  3330. {
  3331. {
  3332. 12,
  3333. 2,
  3334. {
  3335. "dropdown"
  3336. }
  3337. },
  3338. {
  3339. 10,
  3340. 2,
  3341. {
  3342. "buttons"
  3343. }
  3344. },
  3345. {
  3346. 16,
  3347. 2,
  3348. {
  3349. "toggle"
  3350. }
  3351. },
  3352. {
  3353. 11,
  3354. 2,
  3355. {
  3356. "colorpicker"
  3357. }
  3358. },
  3359. {
  3360. 9,
  3361. 2,
  3362. {
  3363. "bind"
  3364. }
  3365. },
  3366. {
  3367. 14,
  3368. 2,
  3369. {
  3370. "slider"
  3371. }
  3372. },
  3373. {
  3374. 13,
  3375. 2,
  3376. {
  3377. "paragraph"
  3378. }
  3379. },
  3380. {
  3381. 15,
  3382. 2,
  3383. {
  3384. "textbox"
  3385. }
  3386. }
  3387. }
  3388. },
  3389. {
  3390. 17,
  3391. 2,
  3392. {
  3393. "tools"
  3394. }
  3395. }
  3396. }
  3397. }
  3398. }
  3399.  
  3400. -- Line offsets for debugging (only included when minifyTables is false)
  3401. local LineOffsets = {
  3402. 8,
  3403. [3] = 454,
  3404. [4] = 607,
  3405. [5] = 733,
  3406. [6] = 919,
  3407. [7] = 1131,
  3408. [8] = 1460,
  3409. [9] = 1468,
  3410. [10] = 1597,
  3411. [11] = 1777,
  3412. [12] = 2219,
  3413. [13] = 2732,
  3414. [14] = 2750,
  3415. [15] = 2961,
  3416. [16] = 3048,
  3417. [17] = 3138
  3418. }
  3419.  
  3420. -- Misc AOT variable imports
  3421. local WaxVersion = "0.4.1"
  3422. local EnvName = "WaxRuntime"
  3423.  
  3424. -- ++++++++ RUNTIME IMPL BELOW ++++++++ --
  3425.  
  3426. -- Localizing certain libraries and built-ins for runtime efficiency
  3427. local string, task, setmetatable, error, next, table, unpack, coroutine, script, type, require, pcall, tostring, tonumber, _VERSION =
  3428. string, task, setmetatable, error, next, table, unpack, coroutine, script, type, require, pcall, tostring, tonumber, _VERSION
  3429.  
  3430. local table_insert = table.insert
  3431. local table_remove = table.remove
  3432. local table_freeze = table.freeze or function(t) return t end -- lol
  3433.  
  3434. local coroutine_wrap = coroutine.wrap
  3435.  
  3436. local string_sub = string.sub
  3437. local string_match = string.match
  3438. local string_gmatch = string.gmatch
  3439.  
  3440. -- The Lune runtime has its own `task` impl, but it must be imported by its builtin
  3441. -- module path, "@lune/task"
  3442. if _VERSION and string_sub(_VERSION, 1, 4) == "Lune" then
  3443. local RequireSuccess, LuneTaskLib = pcall(require, "@lune/task")
  3444. if RequireSuccess and LuneTaskLib then
  3445. task = LuneTaskLib
  3446. end
  3447. end
  3448.  
  3449. local task_defer = task and task.defer
  3450.  
  3451. -- If we're not running on the Roblox engine, we won't have a `task` global
  3452. local Defer = task_defer or function(f, ...)
  3453. coroutine_wrap(f)(...)
  3454. end
  3455.  
  3456. -- ClassName "IDs"
  3457. local ClassNameIdBindings = {
  3458. [1] = "Folder",
  3459. [2] = "ModuleScript",
  3460. [3] = "Script",
  3461. [4] = "LocalScript",
  3462. [5] = "StringValue",
  3463. }
  3464.  
  3465. local RefBindings = {} -- [RefId] = RealObject
  3466.  
  3467. local ScriptClosures = {}
  3468. local ScriptClosureRefIds = {} -- [ScriptClosure] = RefId
  3469. local StoredModuleValues = {}
  3470. local ScriptsToRun = {}
  3471.  
  3472. -- wax.shared __index/__newindex
  3473. local SharedEnvironment = {}
  3474.  
  3475. -- We're creating 'fake' instance refs soley for traversal of the DOM for require() compatibility
  3476. -- It's meant to be as lazy as possible
  3477. local RefChildren = {} -- [Ref] = {ChildrenRef, ...}
  3478.  
  3479. -- Implemented instance methods
  3480. local InstanceMethods = {
  3481. GetFullName = { {}, function(self)
  3482. local Path = self.Name
  3483. local ObjectPointer = self.Parent
  3484.  
  3485. while ObjectPointer do
  3486. Path = ObjectPointer.Name .. "." .. Path
  3487.  
  3488. -- Move up the DOM (parent will be nil at the end, and this while loop will stop)
  3489. ObjectPointer = ObjectPointer.Parent
  3490. end
  3491.  
  3492. return Path
  3493. end},
  3494.  
  3495. GetChildren = { {}, function(self)
  3496. local ReturnArray = {}
  3497.  
  3498. for Child in next, RefChildren[self] do
  3499. table_insert(ReturnArray, Child)
  3500. end
  3501.  
  3502. return ReturnArray
  3503. end},
  3504.  
  3505. GetDescendants = { {}, function(self)
  3506. local ReturnArray = {}
  3507.  
  3508. for Child in next, RefChildren[self] do
  3509. table_insert(ReturnArray, Child)
  3510.  
  3511. for _, Descendant in next, Child:GetDescendants() do
  3512. table_insert(ReturnArray, Descendant)
  3513. end
  3514. end
  3515.  
  3516. return ReturnArray
  3517. end},
  3518.  
  3519. FindFirstChild = { {"string", "boolean?"}, function(self, name, recursive)
  3520. local Children = RefChildren[self]
  3521.  
  3522. for Child in next, Children do
  3523. if Child.Name == name then
  3524. return Child
  3525. end
  3526. end
  3527.  
  3528. if recursive then
  3529. for Child in next, Children do
  3530. -- Yeah, Roblox follows this behavior- instead of searching the entire base of a
  3531. -- ref first, the engine uses a direct recursive call
  3532. return Child:FindFirstChild(name, true)
  3533. end
  3534. end
  3535. end},
  3536.  
  3537. FindFirstAncestor = { {"string"}, function(self, name)
  3538. local RefPointer = self.Parent
  3539. while RefPointer do
  3540. if RefPointer.Name == name then
  3541. return RefPointer
  3542. end
  3543.  
  3544. RefPointer = RefPointer.Parent
  3545. end
  3546. end},
  3547.  
  3548. -- Just to implement for traversal usage
  3549. WaitForChild = { {"string", "number?"}, function(self, name)
  3550. return self:FindFirstChild(name)
  3551. end},
  3552. }
  3553.  
  3554. -- "Proxies" to instance methods, with err checks etc
  3555. local InstanceMethodProxies = {}
  3556. for MethodName, MethodObject in next, InstanceMethods do
  3557. local Types = MethodObject[1]
  3558. local Method = MethodObject[2]
  3559.  
  3560. local EvaluatedTypeInfo = {}
  3561. for ArgIndex, TypeInfo in next, Types do
  3562. local ExpectedType, IsOptional = string_match(TypeInfo, "^([^%?]+)(%??)")
  3563. EvaluatedTypeInfo[ArgIndex] = {ExpectedType, IsOptional}
  3564. end
  3565.  
  3566. InstanceMethodProxies[MethodName] = function(self, ...)
  3567. if not RefChildren[self] then
  3568. error("Expected ':' not '.' calling member function " .. MethodName, 2)
  3569. end
  3570.  
  3571. local Args = {...}
  3572. for ArgIndex, TypeInfo in next, EvaluatedTypeInfo do
  3573. local RealArg = Args[ArgIndex]
  3574. local RealArgType = type(RealArg)
  3575. local ExpectedType, IsOptional = TypeInfo[1], TypeInfo[2]
  3576.  
  3577. if RealArg == nil and not IsOptional then
  3578. error("Argument " .. RealArg .. " missing or nil", 3)
  3579. end
  3580.  
  3581. if ExpectedType ~= "any" and RealArgType ~= ExpectedType and not (RealArgType == "nil" and IsOptional) then
  3582. error("Argument " .. ArgIndex .. " expects type \"" .. ExpectedType .. "\", got \"" .. RealArgType .. "\"", 2)
  3583. end
  3584. end
  3585.  
  3586. return Method(self, ...)
  3587. end
  3588. end
  3589.  
  3590. local function CreateRef(className, name, parent)
  3591. -- `name` and `parent` can also be set later by the init script if they're absent
  3592.  
  3593. -- Extras
  3594. local StringValue_Value
  3595.  
  3596. -- Will be set to RefChildren later aswell
  3597. local Children = setmetatable({}, {__mode = "k"})
  3598.  
  3599. -- Err funcs
  3600. local function InvalidMember(member)
  3601. error(member .. " is not a valid (virtual) member of " .. className .. " \"" .. name .. "\"", 3)
  3602. end
  3603. local function ReadOnlyProperty(property)
  3604. error("Unable to assign (virtual) property " .. property .. ". Property is read only", 3)
  3605. end
  3606.  
  3607. local Ref = {}
  3608. local RefMetatable = {}
  3609.  
  3610. RefMetatable.__metatable = false
  3611.  
  3612. RefMetatable.__index = function(_, index)
  3613. if index == "ClassName" then -- First check "properties"
  3614. return className
  3615. elseif index == "Name" then
  3616. return name
  3617. elseif index == "Parent" then
  3618. return parent
  3619. elseif className == "StringValue" and index == "Value" then
  3620. -- Supporting StringValue.Value for Rojo .txt file conv
  3621. return StringValue_Value
  3622. else -- Lastly, check "methods"
  3623. local InstanceMethod = InstanceMethodProxies[index]
  3624.  
  3625. if InstanceMethod then
  3626. return InstanceMethod
  3627. end
  3628. end
  3629.  
  3630. -- Next we'll look thru child refs
  3631. for Child in next, Children do
  3632. if Child.Name == index then
  3633. return Child
  3634. end
  3635. end
  3636.  
  3637. -- At this point, no member was found; this is the same err format as Roblox
  3638. InvalidMember(index)
  3639. end
  3640.  
  3641. RefMetatable.__newindex = function(_, index, value)
  3642. -- __newindex is only for props fyi
  3643. if index == "ClassName" then
  3644. ReadOnlyProperty(index)
  3645. elseif index == "Name" then
  3646. name = value
  3647. elseif index == "Parent" then
  3648. -- We'll just ignore the process if it's trying to set itself
  3649. if value == Ref then
  3650. return
  3651. end
  3652.  
  3653. if parent ~= nil then
  3654. -- Remove this ref from the CURRENT parent
  3655. RefChildren[parent][Ref] = nil
  3656. end
  3657.  
  3658. parent = value
  3659.  
  3660. if value ~= nil then
  3661. -- And NOW we're setting the new parent
  3662. RefChildren[value][Ref] = true
  3663. end
  3664. elseif className == "StringValue" and index == "Value" then
  3665. -- Supporting StringValue.Value for Rojo .txt file conv
  3666. StringValue_Value = value
  3667. else
  3668. -- Same err as __index when no member is found
  3669. InvalidMember(index)
  3670. end
  3671. end
  3672.  
  3673. RefMetatable.__tostring = function()
  3674. return name
  3675. end
  3676.  
  3677. setmetatable(Ref, RefMetatable)
  3678.  
  3679. RefChildren[Ref] = Children
  3680.  
  3681. if parent ~= nil then
  3682. RefChildren[parent][Ref] = true
  3683. end
  3684.  
  3685. return Ref
  3686. end
  3687.  
  3688. -- Create real ref DOM from object tree
  3689. local function CreateRefFromObject(object, parent)
  3690. local RefId = object[1]
  3691. local ClassNameId = object[2]
  3692. local Properties = object[3] -- Optional
  3693. local Children = object[4] -- Optional
  3694.  
  3695. local ClassName = ClassNameIdBindings[ClassNameId]
  3696.  
  3697. local Name = Properties and table_remove(Properties, 1) or ClassName
  3698.  
  3699. local Ref = CreateRef(ClassName, Name, parent) -- 3rd arg may be nil if this is from root
  3700. RefBindings[RefId] = Ref
  3701.  
  3702. if Properties then
  3703. for PropertyName, PropertyValue in next, Properties do
  3704. Ref[PropertyName] = PropertyValue
  3705. end
  3706. end
  3707.  
  3708. if Children then
  3709. for _, ChildObject in next, Children do
  3710. CreateRefFromObject(ChildObject, Ref)
  3711. end
  3712. end
  3713.  
  3714. return Ref
  3715. end
  3716.  
  3717. local RealObjectRoot = CreateRef("Folder", "[" .. EnvName .. "]")
  3718. for _, Object in next, ObjectTree do
  3719. CreateRefFromObject(Object, RealObjectRoot)
  3720. end
  3721.  
  3722. -- Now we'll set script closure refs and check if they should be ran as a BaseScript
  3723. for RefId, Closure in next, ClosureBindings do
  3724. local Ref = RefBindings[RefId]
  3725.  
  3726. ScriptClosures[Ref] = Closure
  3727. ScriptClosureRefIds[Ref] = RefId
  3728.  
  3729. local ClassName = Ref.ClassName
  3730. if ClassName == "LocalScript" or ClassName == "Script" then
  3731. table_insert(ScriptsToRun, Ref)
  3732. end
  3733. end
  3734.  
  3735. local function LoadScript(scriptRef)
  3736. local ScriptClassName = scriptRef.ClassName
  3737.  
  3738. -- First we'll check for a cached module value (packed into a tbl)
  3739. local StoredModuleValue = StoredModuleValues[scriptRef]
  3740. if StoredModuleValue and ScriptClassName == "ModuleScript" then
  3741. return unpack(StoredModuleValue)
  3742. end
  3743.  
  3744. local Closure = ScriptClosures[scriptRef]
  3745.  
  3746. local function FormatError(originalErrorMessage)
  3747. originalErrorMessage = tostring(originalErrorMessage)
  3748.  
  3749. local VirtualFullName = scriptRef:GetFullName()
  3750.  
  3751. -- Check for vanilla/Roblox format
  3752. local OriginalErrorLine, BaseErrorMessage = string_match(originalErrorMessage, "[^:]+:(%d+): (.+)")
  3753.  
  3754. if not OriginalErrorLine or not LineOffsets then
  3755. return VirtualFullName .. ":*: " .. (BaseErrorMessage or originalErrorMessage)
  3756. end
  3757.  
  3758. OriginalErrorLine = tonumber(OriginalErrorLine)
  3759.  
  3760. local RefId = ScriptClosureRefIds[scriptRef]
  3761. local LineOffset = LineOffsets[RefId]
  3762.  
  3763. local RealErrorLine = OriginalErrorLine - LineOffset + 1
  3764. if RealErrorLine < 0 then
  3765. RealErrorLine = "?"
  3766. end
  3767.  
  3768. return VirtualFullName .. ":" .. RealErrorLine .. ": " .. BaseErrorMessage
  3769. end
  3770.  
  3771. -- If it's a BaseScript, we'll just run it directly!
  3772. if ScriptClassName == "LocalScript" or ScriptClassName == "Script" then
  3773. local RunSuccess, ErrorMessage = pcall(Closure)
  3774. if not RunSuccess then
  3775. error(FormatError(ErrorMessage), 0)
  3776. end
  3777. else
  3778. local PCallReturn = {pcall(Closure)}
  3779.  
  3780. local RunSuccess = table_remove(PCallReturn, 1)
  3781. if not RunSuccess then
  3782. local ErrorMessage = table_remove(PCallReturn, 1)
  3783. error(FormatError(ErrorMessage), 0)
  3784. end
  3785.  
  3786. StoredModuleValues[scriptRef] = PCallReturn
  3787. return unpack(PCallReturn)
  3788. end
  3789. end
  3790.  
  3791. -- We'll assign the actual func from the top of this output for flattening user globals at runtime
  3792. -- Returns (in a tuple order): wax, script, require
  3793. function ImportGlobals(refId)
  3794. local ScriptRef = RefBindings[refId]
  3795.  
  3796. local function RealCall(f, ...)
  3797. local PCallReturn = {pcall(f, ...)}
  3798.  
  3799. local CallSuccess = table_remove(PCallReturn, 1)
  3800. if not CallSuccess then
  3801. error(PCallReturn[1], 3)
  3802. end
  3803.  
  3804. return unpack(PCallReturn)
  3805. end
  3806.  
  3807. -- `wax.shared` index
  3808. local WaxShared = table_freeze(setmetatable({}, {
  3809. __index = SharedEnvironment,
  3810. __newindex = function(_, index, value)
  3811. SharedEnvironment[index] = value
  3812. end,
  3813. __len = function()
  3814. return #SharedEnvironment
  3815. end,
  3816. __iter = function()
  3817. return next, SharedEnvironment
  3818. end,
  3819. }))
  3820.  
  3821. local Global_wax = table_freeze({
  3822. -- From AOT variable imports
  3823. version = WaxVersion,
  3824. envname = EnvName,
  3825.  
  3826. shared = WaxShared,
  3827.  
  3828. -- "Real" globals instead of the env set ones
  3829. script = script,
  3830. require = require,
  3831. })
  3832.  
  3833. local Global_script = ScriptRef
  3834.  
  3835. local function Global_require(module, ...)
  3836. local ModuleArgType = type(module)
  3837.  
  3838. local ErrorNonModuleScript = "Attempted to call require with a non-ModuleScript"
  3839. local ErrorSelfRequire = "Attempted to call require with self"
  3840.  
  3841. if ModuleArgType == "table" and RefChildren[module] then
  3842. if module.ClassName ~= "ModuleScript" then
  3843. error(ErrorNonModuleScript, 2)
  3844. elseif module == ScriptRef then
  3845. error(ErrorSelfRequire, 2)
  3846. end
  3847.  
  3848. return LoadScript(module)
  3849. elseif ModuleArgType == "string" and string_sub(module, 1, 1) ~= "@" then
  3850. -- The control flow on this SUCKS
  3851.  
  3852. if #module == 0 then
  3853. error("Attempted to call require with empty string", 2)
  3854. end
  3855.  
  3856. local CurrentRefPointer = ScriptRef
  3857.  
  3858. if string_sub(module, 1, 1) == "/" then
  3859. CurrentRefPointer = RealObjectRoot
  3860. elseif string_sub(module, 1, 2) == "./" then
  3861. module = string_sub(module, 3)
  3862. end
  3863.  
  3864. local PreviousPathMatch
  3865. for PathMatch in string_gmatch(module, "([^/]*)/?") do
  3866. local RealIndex = PathMatch
  3867. if PathMatch == ".." then
  3868. RealIndex = "Parent"
  3869. end
  3870.  
  3871. -- Don't advance dir if it's just another "/" either
  3872. if RealIndex ~= "" then
  3873. local ResultRef = CurrentRefPointer:FindFirstChild(RealIndex)
  3874. if not ResultRef then
  3875. local CurrentRefParent = CurrentRefPointer.Parent
  3876. if CurrentRefParent then
  3877. ResultRef = CurrentRefParent:FindFirstChild(RealIndex)
  3878. end
  3879. end
  3880.  
  3881. if ResultRef then
  3882. CurrentRefPointer = ResultRef
  3883. elseif PathMatch ~= PreviousPathMatch and PathMatch ~= "init" and PathMatch ~= "init.server" and PathMatch ~= "init.client" then
  3884. error("Virtual script path \"" .. module .. "\" not found", 2)
  3885. end
  3886. end
  3887.  
  3888. -- For possible checks next cycle
  3889. PreviousPathMatch = PathMatch
  3890. end
  3891.  
  3892. if CurrentRefPointer.ClassName ~= "ModuleScript" then
  3893. error(ErrorNonModuleScript, 2)
  3894. elseif CurrentRefPointer == ScriptRef then
  3895. error(ErrorSelfRequire, 2)
  3896. end
  3897.  
  3898. return LoadScript(CurrentRefPointer)
  3899. end
  3900.  
  3901. return RealCall(require, module, ...)
  3902. end
  3903.  
  3904. -- Now, return flattened globals ready for direct runtime exec
  3905. return Global_wax, Global_script, Global_require
  3906. end
  3907.  
  3908. for _, ScriptRef in next, ScriptsToRun do
  3909. Defer(LoadScript, ScriptRef)
  3910. end
  3911.  
  3912. -- AoT adjustment: Load init module (MainModule behavior)
  3913. return LoadScript(RealObjectRoot:GetChildren()[1])
  3914.  
Add Comment
Please, Sign In to add comment