--[[ Matcha UI Library v1.3.0 Pixel-perfect Roblox Luau port of the Matcha UI (Dear ImGui & DirectX 11) Original C++ by matcha-ui authors. Luau port for Roblox. Features: - Authentic DirectX 11 / Windows DWM Acrylic Frosted Glass System - Pixel-perfect Tab Bar (exact 6px/3px/6px capsule spacing matching crop_tabs.png) - Smooth Antialiased Card Corners (indented dividers, zero clipping or stepped fringe) - Interactive Card Hover Animations & Smooth Page Glide Transitions - Top-Level Z-Indexed Dropdown Popup Engine (Zero clipping, zero overlap bleed) - Verified Lucide Icon suite matching original C++ matcha-ui glyphs - 1:1 Color system matching col:: namespace in src/widgets.h Usage: local Matcha = loadstring(game:HttpGet("https://unagitatedly.site/Matcha.lua"))() local Window = Matcha:CreateWindow({ Title = "Example", SubTitle = "Interface", Badge = "Pro", User = "user", Size = UDim2.fromOffset(606, 760), Key = Enum.KeyCode.Insert, }) local CombatTab = Window:CreateTab({ Name = "Combat", Icon = "combat" }) local LeftCol = CombatTab:CreateColumn("Left") local RightCol = CombatTab:CreateColumn("Right") local AimbotPanel = LeftCol:CreatePanel({ Title = "Aimbot", SubTabs = { "Aimbot", "Prediction", "Smoothness", "FOV" }, DefaultSubTab = "Aimbot" }) ]] local Matcha = { Version = "1.3.0", Flags = {}, Options = {}, Folder = "Matcha", ToggleKey = Enum.KeyCode.Insert, IsOpen = true, Windows = {} } -- Services local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local TextService = game:GetService("TextService") local HttpService = game:GetService("HttpService") local Lighting = game:GetService("Lighting") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer -- Clean up any lingering full-screen Lighting blurs so the game is crystal clear pcall(function() for _, child in ipairs(Lighting:GetChildren()) do if child:IsA("BlurEffect") and (child.Name == "Matcha_GlassBlur" or child.Name:find("Matcha")) then child:Destroy() end end end) -- GUI Container Selection local function getContainer() if gethui then return gethui() elseif CoreGui and pcall(function() return CoreGui.Name end) then return CoreGui elseif LocalPlayer and LocalPlayer:FindFirstChild("PlayerGui") then return LocalPlayer.PlayerGui end return CoreGui end -- ============================================================================= -- COLOR PALETTE & FROSTED GLASS ACRYLIC SYSTEM -- Based directly on matcha-ui src/widgets.h col:: namespace: -- col::white(alpha) -> Color3.fromRGB(255, 255, 255) with 1 - (alpha/255) -- Tuned for optimal contrast, smooth antialiasing, and genuine acrylic glass depth. -- ============================================================================= local C = { -- Translucent Acrylic Glass Window Frame: #1B1C26 with 20% transparency (80% opacity) WindowBg = Color3.fromRGB(27, 28, 38), WindowBgTr = 0.20, -- Outer Window Outline Border: Windows 11 DWM border RGB(57, 57, 63) Border = Color3.fromRGB(57, 57, 65), BorderTr = 0, -- Frosted Glass Acrylic Panel Cards: #21222E with 18% transparency Panel = Color3.fromRGB(33, 34, 46), PanelTr = 0.18, PanelHover = Color3.fromRGB(39, 41, 56), PanelHoverTr = 0.12, -- Panel Outline Stroke: Solid smooth dark outline (zero jagged fringe or steps) Outline = Color3.fromRGB(52, 54, 68), OutlineTr = 0, OutlineHover = Color3.fromRGB(74, 77, 98), -- Header Divider Line: col::divider = white(8) indented inside card Divider = Color3.fromRGB(255, 255, 255), DividerTr = 0.965, -- Control Grooves / Input Boxes: col::control = white(15) Control = Color3.fromRGB(255, 255, 255), ControlTr = 0.935, ControlHoverTr = 0.880, -- Buttons: col::button = white(17) Button = Color3.fromRGB(255, 255, 255), ButtonTr = 0.925, ButtonHoverTr = 0.860, -- Checkbox: col::check = white(46) Check = Color3.fromRGB(255, 255, 255), CheckTr = 0.820, CheckHoverTr = 0.740, -- Checked Box: col::checked = IM_COL32(165, 93, 94, 255) (Solid matcha coral red) Checked = Color3.fromRGB(165, 93, 94), -- Slider Progress: col::fill = IM_COL32(142, 75, 75, 255) Fill = Color3.fromRGB(142, 75, 75), -- Dropdown Popup: 100% Solid Dark Slate #24242C (Zero bleed-through) Popup = Color3.fromRGB(36, 36, 46), PopupBorder = Color3.fromRGB(60, 62, 78), -- Text Colors Text = Color3.fromRGB(140, 140, 150), -- #8C8C96 Bright = Color3.fromRGB(175, 175, 185), -- #AFAFB9 Dim = Color3.fromRGB(80, 80, 90), -- #50505A Faint = Color3.fromRGB(89, 89, 97), -- #595961 -- Signature Coral Accent: col::accent = IM_COL32(181, 96, 96, 255) Accent = Color3.fromRGB(181, 96, 96), -- #B56060 AccentDim = Color3.fromRGB(120, 67, 68), -- #784344 -- Active SubTab Pill Wash: col::tint = IM_COL32(181, 96, 96, 18) Tint = Color3.fromRGB(181, 96, 96), TintTr = 0.92, -- Status accents Yellow = Color3.fromRGB(181, 150, 57), Red = Color3.fromRGB(195, 75, 75), Green = Color3.fromRGB(83, 153, 98), White = Color3.fromRGB(255, 255, 255), Black = Color3.fromRGB(0, 0, 0), } Matcha.Colors = C -- Typography local okInter, InterMedium = pcall(Font.new, "rbxasset://fonts/families/Inter.json", Enum.FontWeight.Medium) local okInterB, InterSemi = pcall(Font.new, "rbxasset://fonts/families/Inter.json", Enum.FontWeight.SemiBold) if not okInter then InterMedium = Font.fromEnum(Enum.Font.GothamMedium) end if not okInterB then InterSemi = Font.fromEnum(Enum.Font.GothamBold) end -- Animation constants local DUR = 0.18 local SMOOTH = Enum.EasingStyle.Quart -- ============================================================================= -- VERIFIED LUCIDE ICONS (Exact TTF glyphs matching matcha-ui/src/widgets.h) -- ============================================================================= local ICONS = { -- Combat: Lucide 'swords' (U+E2B4) combat = "rbxassetid://10734975692", swords = "rbxassetid://10734975692", sword = "rbxassetid://10734975486", -- Visuals: Lucide 'eye' (U+E0BE) visuals = "rbxassetid://10723346959", eye = "rbxassetid://10723346959", -- World: Lucide 'globe' (U+E0EB) world = "rbxassetid://10723404337", globe = "rbxassetid://10723404337", -- Character: Lucide 'user' (U+E19F) character = "rbxassetid://10747373176", user = "rbxassetid://10747373176", -- Options: Lucide 'sliders-horizontal' (U+E29A) options = "rbxassetid://10734963191", sliders = "rbxassetid://10734963400", ["sliders-horizontal"] = "rbxassetid://10734963191", settings = "rbxassetid://10734963191", -- Configs: Lucide 'file-text' (U+E0D0) configs = "rbxassetid://10723367380", ["file-text"] = "rbxassetid://10723367380", file = "rbxassetid://10723374641", folder = "rbxassetid://10723374641", -- NPC: Lucide 'bot' (U+E1BB) npc = "rbxassetid://10709782230", bot = "rbxassetid://10709782230", -- Teams: Lucide 'flag' (U+E0D6) teams = "rbxassetid://10723375890", flag = "rbxassetid://10723375890", -- Footer Online Users: Lucide 'users' (U+E1A4) users = "rbxassetid://10747373426", -- Dropdown Chevron: Lucide 'chevron-down' (U+E071) chevron = "rbxassetid://10709790948", ["chevron-down"] = "rbxassetid://10709790948", -- Tooltip Question: Lucide 'help-circle' help = "rbxassetid://10723406988", ["help-circle"] = "rbxassetid://10723406988", -- Misc check = "rbxassetid://10709790644", cross = "rbxassetid://10747384394", } local function resolveIcon(icon) if not icon then return "" end if string.find(tostring(icon), "^rbxassetid://") or string.find(tostring(icon), "^http") then return tostring(icon) end local key = string.lower(tostring(icon)) if ICONS[key] then return ICONS[key] end return ICONS.chevron end -- Helper Utilities local function create(className, props, children) local instance = Instance.new(className) local parent for k, v in pairs(props or {}) do if k == "Parent" then parent = v else instance[k] = v end end for _, child in ipairs(children or {}) do child.Parent = instance end if parent then instance.Parent = parent end return instance end local function corner(radius) return create("UICorner", { CornerRadius = UDim.new(0, radius) }) end local function stroke(color, thickness, transparency) return create("UIStroke", { Color = color or C.Border, Thickness = thickness or 1, Transparency = transparency or 0, ApplyStrokeMode = Enum.ApplyStrokeMode.Border, }) end local function tween(object, props, dur, style, dir) dur = dur or DUR style = style or SMOOTH dir = dir or Enum.EasingDirection.Out local tw = TweenService:Create(object, TweenInfo.new(dur, style, dir), props) tw:Play() return tw end local function safe(fn, ...) if type(fn) == "function" then local ok, err = pcall(fn, ...) if not ok then warn("[Matcha Callback Error]:", err) end end end -- Formats KeyCodes / UserInputTypes into C++ ImGui lowercase abbreviations local function formatKeyName(input) if not input then return "none" end if input == Enum.KeyCode.Unknown then return "none" end if input == Enum.UserInputType.MouseButton1 then return "lmb" end if input == Enum.UserInputType.MouseButton2 then return "rmb" end if input == Enum.UserInputType.MouseButton3 then return "mmb" end if input == Enum.KeyCode.Insert then return "ins" end if input == Enum.KeyCode.LeftControl or input == Enum.KeyCode.RightControl then return "control" end if input == Enum.KeyCode.LeftShift or input == Enum.KeyCode.RightShift then return "shift" end if input == Enum.KeyCode.LeftAlt or input == Enum.KeyCode.RightAlt then return "alt" end local s = input.Name return string.lower(s) end -- ========================================================================= -- MAIN WINDOW CLASS -- ========================================================================= function Matcha:CreateWindow(cfg) cfg = cfg or {} local title = cfg.Title or "Example" local subTitle = cfg.SubTitle or "Interface" local badgeText = cfg.Badge or "Pro" local username = cfg.User or (LocalPlayer and LocalPlayer.Name or "user") local winSize = cfg.Size or UDim2.fromOffset(606, 760) local toggleKey = cfg.Key or Enum.KeyCode.Insert Matcha.ToggleKey = toggleKey local container = getContainer() -- Clean up previous instance with same name if container:FindFirstChild("Matcha_ScreenGui") then container.Matcha_ScreenGui:Destroy() end local ScreenGui = create("ScreenGui", { Name = "Matcha_ScreenGui", Parent = container, ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, IgnoreGuiInset = true, }) -- Ensure game viewport remains crystal clear (clean up any lingering lighting blur) pcall(function() for _, child in ipairs(Lighting:GetChildren()) do if child:IsA("BlurEffect") and (child.Name == "Matcha_GlassBlur" or child.Name:find("Matcha")) then child:Destroy() end end end) -- Ambient Soft Drop Shadow for realistic depth against the 3D world local Shadow = create("ImageLabel", { Name = "Shadow", Parent = ScreenGui, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), Size = UDim2.new(winSize.X.Scale, winSize.X.Offset + 44, winSize.Y.Scale, winSize.Y.Offset + 44), BackgroundTransparency = 1, Image = "rbxassetid://6015897843", ImageColor3 = Color3.fromRGB(0, 0, 0), ImageTransparency = 0.35, ScaleType = Enum.ScaleType.Slice, SliceCenter = Rect.new(49, 49, 450, 450), ZIndex = 1, }) -- Translucent Acrylic Glass Window Frame (#1B1C26 with 80% opacity) local Main = create("Frame", { Name = "MainWindow", Parent = ScreenGui, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), Size = winSize, BackgroundColor3 = C.WindowBg, BackgroundTransparency = C.WindowBgTr, ClipsDescendants = false, ZIndex = 2, }, { corner(8), -- Windows 11 DWM rounded corners stroke(C.Border, 1) -- Crisp solid DWM border (RGB 57, 57, 63) }) -- Specular Diagonal Glass Reflection Sheen (Authentic Acrylic Reflection) local GlassSheen = create("Frame", { Name = "GlassSheen", Parent = Main, Size = UDim2.new(1, 0, 1, 0), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.96, ZIndex = 2, }, { corner(8), create("UIGradient", { Rotation = 45, Color = ColorSequence.new(Color3.fromRGB(255, 255, 255)), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0.0, 0.93), NumberSequenceKeypoint.new(0.35, 0.96), NumberSequenceKeypoint.new(0.70, 0.99), NumberSequenceKeypoint.new(1.0, 1.00), }) }) }) -- Subtle Acrylic Micro-Grain Texture Overlay local GlassNoise = create("ImageLabel", { Name = "GlassNoise", Parent = Main, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Image = "rbxassetid://8992230677", ImageColor3 = Color3.fromRGB(255, 255, 255), ImageTransparency = 0.94, ScaleType = Enum.ScaleType.Slice, SliceCenter = Rect.new(99, 99, 99, 99), ZIndex = 2, }, { corner(8) }) -- Title Bar (44px) with top glass light reflection sheen local TitleBar = create("Frame", { Name = "TitleBar", Parent = Main, Position = UDim2.new(0, 1, 0, 1), Size = UDim2.new(1, -2, 0, 44), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.941, ZIndex = 3, }, { corner(8), create("UIGradient", { Rotation = 90, Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.935), -- col::white(15) top NumberSequenceKeypoint.new(1, 0.965), -- col::white(9) bottom }) }) }) -- Left Title Content: Title ยท SubTitle [Badge] local TitleContent = create("Frame", { Name = "LeftTitle", Parent = TitleBar, Position = UDim2.new(0, 18, 0, 0), Size = UDim2.new(0, 350, 1, 0), BackgroundTransparency = 1, ZIndex = 4, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 7), }) }) local TitleLabel = create("TextLabel", { Name = "Title", Parent = TitleContent, LayoutOrder = 1, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterSemi, TextSize = 13, TextColor3 = C.Accent, -- Signature coral Text = title, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 4, }) -- Dot separator: 3px anti-aliased circle dot (dl->AddCircleFilled({x+6, 22}, 1.5f, col::white(18))) local Dot = create("Frame", { Name = "Dot", Parent = TitleContent, LayoutOrder = 2, Size = UDim2.fromOffset(3, 3), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.85, ZIndex = 4, }, { corner(2) }) local SubTitleLabel = create("TextLabel", { Name = "SubTitle", Parent = TitleContent, LayoutOrder = 3, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 13, TextColor3 = C.Text, Text = subTitle, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 4, }) -- Pro / Tier Badge (ui::draw_badge) local BadgeFrame = create("Frame", { Name = "Badge", Parent = TitleContent, LayoutOrder = 4, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 16), BackgroundColor3 = C.Tint, BackgroundTransparency = C.TintTr, ZIndex = 4, }, { corner(4), stroke(Color3.fromRGB(181, 96, 96), 1, 0.85), create("UIPadding", { PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6), }) }) local BadgeLabel = create("TextLabel", { Parent = BadgeFrame, Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterSemi, TextSize = 10, TextColor3 = C.Accent, Text = badgeText, ZIndex = 5, }) -- Username on Right local UserLabel = create("TextLabel", { Name = "User", Parent = TitleBar, Position = UDim2.new(1, -17, 0, 0), AnchorPoint = Vector2.new(1, 0), Size = UDim2.new(0, 150, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 13, TextColor3 = C.Text, Text = username, TextXAlignment = Enum.TextXAlignment.Right, ZIndex = 4, }) -- Tab Navigation Row (Y: 52, Height: 24, starting at X: 18) local TabBar = create("Frame", { Name = "TabBar", Parent = Main, Position = UDim2.new(0, 18, 0, 52), Size = UDim2.new(1, -36, 0, 24), BackgroundTransparency = 1, ZIndex = 4, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 9), -- Exactly 9px gap between tabs matching crop_tabs.png }) }) -- Pages Container (Tabs host) local PagesFolder = create("Folder", { Name = "Pages", Parent = Main, }) -- Footer Bar (Height: 26, matching footer() in gui.cpp) local Footer = create("Frame", { Name = "Footer", Parent = Main, Position = UDim2.new(0, 1, 1, -26), Size = UDim2.new(1, -2, 0, 25), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.965, -- col::white(9) ZIndex = 3, }, { corner(8), create("Frame", { Name = "TopLine", Size = UDim2.new(1, 0, 0, 1), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 0.960, -- col::white(8) BorderSizePixel = 0, }) }) local FooterLeft = create("Frame", { Name = "Left", Parent = Footer, Position = UDim2.new(0, 18, 0, 0), Size = UDim2.new(0, 120, 1, 0), BackgroundTransparency = 1, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 5), }), create("ImageLabel", { Size = UDim2.fromOffset(13, 13), BackgroundTransparency = 1, Image = ICONS.users, ImageColor3 = C.Accent, }), create("TextLabel", { AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.Dim, Text = tostring(#Players:GetPlayers()) .. " online", }) }) local FooterCenter = create("TextLabel", { Name = "Center", Parent = Footer, Position = UDim2.new(0.5, 0, 0.5, 0), AnchorPoint = Vector2.new(0.5, 0.5), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.Dim, Text = cfg.Footer or "menu-ui", }) local FooterRight = create("Frame", { Name = "Right", Parent = Footer, Position = UDim2.new(1, -20, 0, 0), AnchorPoint = Vector2.new(1, 0), Size = UDim2.new(0, 160, 1, 0), BackgroundTransparency = 1, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 3), }), create("TextLabel", { AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.Dim, Text = "Build: ", }), create("TextLabel", { AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.AccentDim, Text = cfg.BuildDate or os.date("%b %d %Y"), }) }) -- ========================================================================= -- TOP-LEVEL POPUPS LAYER (Guarantees dropdowns never clip or get overlapped) -- ========================================================================= local PopupsLayer = create("Frame", { Name = "PopupsLayer", Parent = ScreenGui, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, ZIndex = 10000, ClipsDescendants = false, }) local ClickAway = create("TextButton", { Name = "ClickAway", Parent = PopupsLayer, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", Visible = false, ZIndex = 10001, }) local activeCloseFunc = nil local function closeActivePopup() if activeCloseFunc then activeCloseFunc() activeCloseFunc = nil end ClickAway.Visible = false end ClickAway.MouseButton1Click:Connect(function() closeActivePopup() end) -- Window Dragging Functionality (Moving Main + Shadow together) local dragging, dragInput, dragStart, startPos TitleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = Main.Position closeActivePopup() input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) TitleBar.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then dragInput = input end end) UserInputService.InputChanged:Connect(function(input) if input == dragInput and dragging then local delta = input.Position - dragStart local newPos = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y) Main.Position = newPos Shadow.Position = newPos end end) local Window = { ScreenGui = ScreenGui, Main = Main, Shadow = Shadow, TabBar = TabBar, PagesFolder = PagesFolder, PopupsLayer = PopupsLayer, ClickAway = ClickAway, Tabs = {}, ActiveTab = nil, ToggleKey = toggleKey, CloseActivePopup = closeActivePopup, } function Window:Toggle(state) if state == nil then state = not Main.Visible end Main.Visible = state Shadow.Visible = state Matcha.IsOpen = state if not state then closeActivePopup() end end table.insert(Matcha.Windows, Window) -- ========================================================================= -- TAB CREATION (Capsule pills with Lucide icons) -- ========================================================================= function Window:CreateTab(tabCfg) tabCfg = tabCfg or {} local tabName = tabCfg.Name or "Tab" local tabIcon = resolveIcon(tabCfg.Icon or tabName) -- Capsule Pill Button in TabBar (24px height, corner radius 12, exact 6px/3px/6px spacing) local TabButton = create("TextButton", { Name = tabName .. "_Btn", Parent = TabBar, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 24), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = 1, -- Active = 0.898 (col::white(26)), Inactive = 1 AutoButtonColor = false, Text = "", ZIndex = 4, }, { corner(12), -- Exact 12px rounding for 24px capsule pill create("UIPadding", { PaddingLeft = UDim.new(0, 6), -- EXACTLY 6px start space matching crop_tabs.png! PaddingRight = UDim.new(0, 6), -- EXACTLY 6px end space matching crop_tabs.png! PaddingTop = UDim.new(0, 0), PaddingBottom = UDim.new(0, 0), }), create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 3), -- EXACTLY 3px gap between icon and text! }) }) local IconImg = create("ImageLabel", { Name = "Icon", Parent = TabButton, LayoutOrder = 1, Size = UDim2.fromOffset(13, 13), BackgroundTransparency = 1, Image = tabIcon, ImageColor3 = C.Text, ScaleType = Enum.ScaleType.Fit, ZIndex = 5, }) pcall(function() IconImg.ResampleMode = Enum.ResamplerMode.Linear end) local TabText = create("TextLabel", { Name = "Label", Parent = TabButton, LayoutOrder = 2, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 13, TextColor3 = C.Text, Text = tabName, TextYAlignment = Enum.TextYAlignment.Center, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 5, }) -- Page Content Container (Two Columns starting at Y = 88) local Page = create("Frame", { Name = tabName .. "_Page", Parent = PagesFolder, Position = UDim2.new(0, 14, 0, 88), Size = UDim2.new(1, -28, 1, -120), BackgroundTransparency = 1, Visible = false, ZIndex = 3, }) local LeftColumn = create("ScrollingFrame", { Name = "LeftColumn", Parent = Page, Position = UDim2.new(0, 0, 0, 0), Size = UDim2.new(0.5, -6, 1, 0), BackgroundTransparency = 1, ScrollBarThickness = 2, ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255), ScrollBarImageTransparency = 0.82, CanvasSize = UDim2.new(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ClipsDescendants = true, ZIndex = 3, }, { create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 9), -- 9px gap between panel cards }), create("UIPadding", { PaddingBottom = UDim.new(0, 10) }) }) local RightColumn = create("ScrollingFrame", { Name = "RightColumn", Parent = Page, Position = UDim2.new(0.5, 6, 0, 0), Size = UDim2.new(0.5, -6, 1, 0), BackgroundTransparency = 1, ScrollBarThickness = 2, ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255), ScrollBarImageTransparency = 0.82, CanvasSize = UDim2.new(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, ClipsDescendants = true, ZIndex = 3, }, { create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 9), }), create("UIPadding", { PaddingBottom = UDim.new(0, 10) }) }) -- Auto close popups when column scrolls LeftColumn:GetPropertyChangedSignal("CanvasPosition"):Connect(function() closeActivePopup() end) RightColumn:GetPropertyChangedSignal("CanvasPosition"):Connect(function() closeActivePopup() end) local TabObj = { Name = tabName, Button = TabButton, Icon = IconImg, Label = TabText, Page = Page, LeftColumn = LeftColumn, RightColumn = RightColumn, } function TabObj:Activate() closeActivePopup() for _, t in ipairs(Window.Tabs) do if t ~= TabObj then t.Page.Visible = false tween(t.Button, { BackgroundTransparency = 1 }, 0.15) tween(t.Icon, { ImageColor3 = C.Text }, 0.15) tween(t.Label, { TextColor3 = C.Text }, 0.15) end end -- Smooth Page Glide Transition Page.Visible = true Page.Position = UDim2.new(0, 14, 0, 93) -- start 5px lower tween(Page, { Position = UDim2.new(0, 14, 0, 88) }, 0.20, Enum.EasingStyle.Quart, Enum.EasingDirection.Out) -- Active Capsule Pill TabButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255) tween(TabButton, { BackgroundTransparency = 0.898 }, 0.15) -- col::white(26) tween(IconImg, { ImageColor3 = C.Accent }, 0.15) tween(TabText, { TextColor3 = C.Accent }, 0.15) Window.ActiveTab = TabObj end TabButton.MouseButton1Click:Connect(function() TabObj:Activate() end) TabButton.MouseEnter:Connect(function() if Window.ActiveTab ~= TabObj then TabButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255) tween(TabButton, { BackgroundTransparency = 0.945 }, 0.12) tween(IconImg, { ImageColor3 = C.Bright }, 0.12) tween(TabText, { TextColor3 = C.Bright }, 0.12) end end) TabButton.MouseLeave:Connect(function() if Window.ActiveTab ~= TabObj then tween(TabButton, { BackgroundTransparency = 1 }, 0.12) tween(IconImg, { ImageColor3 = C.Text }, 0.12) tween(TabText, { TextColor3 = C.Text }, 0.12) end end) table.insert(Window.Tabs, TabObj) if #Window.Tabs == 1 then TabObj:Activate() end -- Column accessor function TabObj:CreateColumn(side) side = string.lower(side or "left") local targetCol = (side == "right" or side == "1") and RightColumn or LeftColumn local ColObj = { Container = targetCol } -- ============================================================= -- PANEL (GROUPBOX) BUILDER (Frosted Glass Acrylic Card) -- ============================================================= function ColObj:CreatePanel(panelCfg) panelCfg = panelCfg or {} local panelTitle = panelCfg.Title or "Panel" local subTabs = panelCfg.SubTabs local defaultSub = panelCfg.DefaultSubTab or (subTabs and subTabs[1]) local fixedHeight = panelCfg.Height -- Frosted Acrylic Card (corner 6, solid smooth outline, no jagged artifacts) local PanelFrame = create("Frame", { Name = panelTitle .. "_Panel", Parent = targetCol, Size = UDim2.new(1, 0, 0, fixedHeight or 0), AutomaticSize = fixedHeight and Enum.AutomaticSize.None or Enum.AutomaticSize.Y, BackgroundColor3 = C.Panel, BackgroundTransparency = C.PanelTr, ClipsDescendants = false, ZIndex = 4, }, { corner(6), stroke(C.Outline, 1) -- Solid smooth outline, zero corner fringe! }) local panelStroke = PanelFrame:FindFirstChildOfClass("UIStroke") -- Card Hover Animation: smoothly lifts card brightness & outline PanelFrame.MouseEnter:Connect(function() tween(PanelFrame, { BackgroundColor3 = C.PanelHover, BackgroundTransparency = C.PanelHoverTr, }, 0.2) if panelStroke then tween(panelStroke, { Color = C.OutlineHover }, 0.2) end end) PanelFrame.MouseLeave:Connect(function() tween(PanelFrame, { BackgroundColor3 = C.Panel, BackgroundTransparency = C.PanelTr, }, 0.2) if panelStroke then tween(panelStroke, { Color = C.Outline }, 0.2) end end) local HeaderFrame = create("Frame", { Name = "Header", Parent = PanelFrame, Size = UDim2.new(1, 0, 0, 30), BackgroundTransparency = 1, ZIndex = 4, }) -- Header divider line: INDENTED by 14px on both left and right (never touches card corners!) local Divider = create("Frame", { Name = "Divider", Parent = PanelFrame, Position = UDim2.new(0, 14, 0, 30), Size = UDim2.new(1, -28, 0, 1), BackgroundColor3 = C.Divider, BackgroundTransparency = C.DividerTr, BorderSizePixel = 0, ZIndex = 4, }) local SubTabButtons = {} local SubTabPages = {} local ActiveSub = nil if subTabs and #subTabs > 0 then local SubTabRow = create("Frame", { Name = "SubTabs", Parent = HeaderFrame, Position = UDim2.new(0, 14, 0, 5), Size = UDim2.new(1, -28, 0, 20), BackgroundTransparency = 1, ZIndex = 5, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 6), }) }) for _, stName in ipairs(subTabs) do local Chip = create("TextButton", { Name = stName .. "_Chip", Parent = SubTabRow, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 20), BackgroundColor3 = C.Tint, BackgroundTransparency = 1, AutoButtonColor = false, Text = "", ZIndex = 5, }, { corner(4), create("UIPadding", { PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), }) }) local ChipLabel = create("TextLabel", { Name = "Label", Parent = Chip, Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Dim, Text = stName, ZIndex = 6, }) local SubContent = create("Frame", { Name = stName .. "_Content", Parent = PanelFrame, Position = UDim2.new(0, 0, 0, 31), Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Visible = false, ZIndex = 4, }, { create("UIPadding", { PaddingLeft = UDim.new(0, 14), PaddingRight = UDim.new(0, 14), PaddingTop = UDim.new(0, 8), PaddingBottom = UDim.new(0, 12), }), create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 8), }) }) SubTabButtons[stName] = Chip SubTabPages[stName] = SubContent Chip.MouseButton1Click:Connect(function() closeActivePopup() for name, page in pairs(SubTabPages) do page.Visible = (name == stName) local btn = SubTabButtons[name] if name == stName then btn.BackgroundColor3 = C.Tint tween(btn, { BackgroundTransparency = C.TintTr }, 0.15) tween(btn.Label, { TextColor3 = C.Accent }, 0.15) else tween(btn, { BackgroundTransparency = 1 }, 0.15) tween(btn.Label, { TextColor3 = C.Dim }, 0.15) end end ActiveSub = stName end) Chip.MouseEnter:Connect(function() if ActiveSub ~= stName then tween(ChipLabel, { TextColor3 = C.Text }, 0.12) end end) Chip.MouseLeave:Connect(function() if ActiveSub ~= stName then tween(ChipLabel, { TextColor3 = C.Dim }, 0.12) end end) end else -- Single Title Header (30px high, left aligned at x = 14) create("TextLabel", { Name = "Title", Parent = HeaderFrame, Position = UDim2.new(0, 14, 0, 0), Size = UDim2.new(1, -28, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 13, TextColor3 = C.Text, Text = panelTitle, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 5, }) end -- Main content container for single panels local SingleContent = create("Frame", { Name = "Content", Parent = PanelFrame, Position = UDim2.new(0, 0, 0, 31), Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, Visible = (not subTabs), ZIndex = 4, }, { create("UIPadding", { PaddingLeft = UDim.new(0, 14), PaddingRight = UDim.new(0, 14), PaddingTop = UDim.new(0, 8), PaddingBottom = UDim.new(0, 12), }), create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 8), }) }) -- Sub-page activation if subTabs and defaultSub and SubTabButtons[defaultSub] then SubTabButtons[defaultSub].BackgroundColor3 = C.Tint SubTabButtons[defaultSub].BackgroundTransparency = C.TintTr SubTabButtons[defaultSub].Label.TextColor3 = C.Accent SubTabPages[defaultSub].Visible = true ActiveSub = defaultSub end local PanelObj = { Frame = PanelFrame, SubTabPages = SubTabPages, } -- Widget Generator for a specific content frame local function bindWidgetMethods(hostFrame) local Methods = {} -- ------------------------------------------------------------- -- 1. TOGGLE / CHECKBOX (18x18 tile, unchecked luminous glass) -- ------------------------------------------------------------- function Methods:AddToggle(toggleCfg) toggleCfg = toggleCfg or {} local name = toggleCfg.Name or "Toggle" local state = toggleCfg.Default or false local callback = toggleCfg.Callback local flag = toggleCfg.Flag or name local textColor = toggleCfg.Color or C.Text local Row = create("Frame", { Name = name .. "_Row", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 20), BackgroundTransparency = 1, }) -- Checkbox Tile: exact 16x16 with 4px corner and 1px border matching widgets.cpp! local CheckBox = create("TextButton", { Name = "Box", Parent = Row, Position = UDim2.new(0, 0, 0.5, -8), Size = UDim2.fromOffset(16, 16), BackgroundColor3 = state and C.Checked or C.Check, BackgroundTransparency = state and 0 or C.CheckTr, AutoButtonColor = false, Text = "", ZIndex = 5, }, { corner(4), stroke(Color3.fromRGB(62, 65, 80), 1) }) -- Label Button (Clicking text also toggles) local LabelBtn = create("TextButton", { Name = "Label", Parent = Row, Position = UDim2.new(0, 24, 0, 0), Size = UDim2.new(1, -24, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 13, TextColor3 = textColor, Text = name, TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 5, }) -- Trailing items container (for keybind, colors, help) local Trailing = create("Frame", { Name = "Trailing", Parent = Row, Position = UDim2.new(1, 0, 0.5, 0), AnchorPoint = Vector2.new(1, 0.5), Size = UDim2.new(0, 160, 1, 0), BackgroundTransparency = 1, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), }) }) local function updateState(newState) state = newState Matcha.Flags[flag] = state tween(CheckBox, { BackgroundColor3 = state and C.Checked or C.Check, BackgroundTransparency = state and 0 or C.CheckTr }, 0.15) safe(callback, state) end CheckBox.MouseButton1Click:Connect(function() updateState(not state) end) LabelBtn.MouseButton1Click:Connect(function() updateState(not state) end) CheckBox.MouseEnter:Connect(function() if not state then tween(CheckBox, { BackgroundTransparency = C.CheckHoverTr }, 0.1) end end) CheckBox.MouseLeave:Connect(function() if not state then tween(CheckBox, { BackgroundTransparency = C.CheckTr }, 0.1) end end) local ToggleControl = { Row = Row, Trailing = Trailing, Set = updateState, Get = function() return state end, } -- Chaining: AddKeybind to Toggle (20px pill, lowercase) function ToggleControl:AddKeybind(kbCfg) kbCfg = kbCfg or {} local currentKey = kbCfg.Default or Enum.KeyCode.Unknown local kbCallback = kbCfg.Callback local isWaiting = false local KeyBtn = create("TextButton", { Name = "Keybind", Parent = Trailing, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(36, 20), BackgroundColor3 = C.Control, BackgroundTransparency = C.ControlTr, AutoButtonColor = false, Text = "", }, { corner(10), stroke(Color3.fromRGB(60, 62, 78), 1), create("UIPadding", { PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), }) }) local KeyLabel = create("TextLabel", { Parent = KeyBtn, Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 10, TextColor3 = C.Text, Text = formatKeyName(currentKey), }) KeyBtn.MouseButton1Click:Connect(function() isWaiting = true KeyLabel.Text = "..." KeyLabel.TextColor3 = C.Accent end) UserInputService.InputBegan:Connect(function(input, gpe) if isWaiting then if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == Enum.KeyCode.Escape then currentKey = Enum.KeyCode.Unknown else currentKey = input.KeyCode end isWaiting = false KeyLabel.Text = formatKeyName(currentKey) KeyLabel.TextColor3 = C.Text safe(kbCallback, currentKey) elseif input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.MouseButton2 or input.UserInputType == Enum.UserInputType.MouseButton3 then currentKey = input.UserInputType isWaiting = false KeyLabel.Text = formatKeyName(currentKey) KeyLabel.TextColor3 = C.Text safe(kbCallback, currentKey) end end end) KeyBtn.MouseEnter:Connect(function() tween(KeyBtn, { BackgroundTransparency = C.ControlHoverTr }, 0.1) end) KeyBtn.MouseLeave:Connect(function() tween(KeyBtn, { BackgroundTransparency = C.ControlTr }, 0.1) end) return ToggleControl end -- Chaining: AddColorPicker to Toggle (18x18 swatch) function ToggleControl:AddColorPicker(cpCfg) cpCfg = cpCfg or {} local curColor = cpCfg.Default or C.White local cpCallback = cpCfg.Callback local Swatch = create("TextButton", { Name = "ColorSwatch", Parent = Trailing, Size = UDim2.fromOffset(18, 18), BackgroundColor3 = curColor, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(255, 255, 255), 1, C.OutlineTr) }) Swatch.MouseButton1Click:Connect(function() if curColor == C.White then curColor = C.Accent elseif curColor == C.Accent then curColor = C.Green elseif curColor == C.Green then curColor = Color3.fromRGB(160, 200, 255) elseif curColor == Color3.fromRGB(160, 200, 255) then curColor = C.Yellow else curColor = C.White end Swatch.BackgroundColor3 = curColor safe(cpCallback, curColor) end) return ToggleControl end -- Chaining: AddHelp (Tooltip ? in col::faint) function ToggleControl:AddHelp(tipText) local HelpLabel = create("TextLabel", { Name = "Help", Parent = Trailing, Size = UDim2.fromOffset(14, 18), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.Faint, Text = "?", }) return ToggleControl end return ToggleControl end -- ------------------------------------------------------------- -- 2. SLIDER (Translucent groove with coral progress) -- ------------------------------------------------------------- function Methods:AddSlider(sliderCfg) sliderCfg = sliderCfg or {} local name = sliderCfg.Name or "Slider" local min = sliderCfg.Min or 0 local max = sliderCfg.Max or 100 local curVal = math.clamp(sliderCfg.Default or min, min, max) local precision = sliderCfg.Precision or (min % 1 ~= 0 and 2 or 0) local suffix = sliderCfg.Suffix or "" local callback = sliderCfg.Callback local flag = sliderCfg.Flag or name local Box = create("Frame", { Name = name .. "_Slider", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 32), BackgroundTransparency = 1, }) local TopRow = create("Frame", { Name = "TopRow", Parent = Box, Size = UDim2.new(1, 0, 0, 16), BackgroundTransparency = 1, }) local NameLabel = create("TextLabel", { Parent = TopRow, Size = UDim2.new(0.7, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = name, TextXAlignment = Enum.TextXAlignment.Left, }) local formatPattern = precision > 0 and ("%." .. precision .. "f") or "%.0f" local ValLabel = create("TextLabel", { Parent = TopRow, Size = UDim2.new(0.3, 0, 1, 0), Position = UDim2.new(1, 0, 0, 0), AnchorPoint = Vector2.new(1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = string.format(formatPattern, curVal) .. suffix, TextXAlignment = Enum.TextXAlignment.Right, }) -- Track: 8px height, rounded corners, col::control = white(15) -- Track: 4px height, rounding 2, matching C++ widgets.cpp local Track = create("TextButton", { Name = "Track", Parent = Box, Position = UDim2.new(0, 0, 0, 20), Size = UDim2.new(1, 0, 0, 4), BackgroundColor3 = Color3.fromRGB(42, 44, 56), BackgroundTransparency = 0.4, AutoButtonColor = false, Text = "", ZIndex = 5, }, { corner(2), stroke(Color3.fromRGB(56, 58, 72), 1) }) local pct = math.clamp((curVal - min) / (max - min), 0, 1) local Fill = create("Frame", { Name = "Fill", Parent = Track, Size = UDim2.new(pct, 0, 1, 0), BackgroundColor3 = C.Fill, ZIndex = 5, }, { corner(2) }) local isDragging = false local function updateValue(inputX) local relX = math.clamp((inputX - Track.AbsolutePosition.X) / Track.AbsoluteSize.X, 0, 1) local raw = min + (max - min) * relX if precision == 0 then curVal = math.floor(raw + 0.5) else local mult = 10 ^ precision curVal = math.floor(raw * mult + 0.5) / mult end curVal = math.clamp(curVal, min, max) Matcha.Flags[flag] = curVal Fill.Size = UDim2.new(relX, 0, 1, 0) ValLabel.Text = string.format(formatPattern, curVal) .. suffix safe(callback, curVal) end Track.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then isDragging = true Track.BackgroundTransparency = C.ControlHoverTr updateValue(input.Position.X) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then isDragging = false Track.BackgroundTransparency = C.ControlTr end end) UserInputService.InputChanged:Connect(function(input) if isDragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then updateValue(input.Position.X) end end) local SliderControl = { Set = function(v) curVal = math.clamp(v, min, max) local rel = math.clamp((curVal - min) / (max - min), 0, 1) Fill.Size = UDim2.new(rel, 0, 1, 0) ValLabel.Text = string.format(formatPattern, curVal) .. suffix safe(callback, curVal) end, Get = function() return curVal end, } return SliderControl end -- ------------------------------------------------------------------------- -- 3. DROPDOWN / COMBO (Top-Level PopupsLayer: 100% Solid & Zero Clipping) -- ------------------------------------------------------------------------- function Methods:AddDropdown(comboCfg) comboCfg = comboCfg or {} local name = comboCfg.Name or "Combo" local options = comboCfg.Options or {} local selected = comboCfg.Default or (options[1] or "") local callback = comboCfg.Callback local flag = comboCfg.Flag or name local Box = create("Frame", { Name = name .. "_Combo", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 48), BackgroundTransparency = 1, }) local NameLabel = create("TextLabel", { Parent = Box, Size = UDim2.new(1, 0, 0, 16), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = name, TextXAlignment = Enum.TextXAlignment.Left, }) local SelectBox = create("TextButton", { Name = "SelectBox", Parent = Box, Position = UDim2.new(0, 0, 0, 20), Size = UDim2.new(1, 0, 0, 28), BackgroundColor3 = C.Control, BackgroundTransparency = C.ControlTr, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(255, 255, 255), 1, 0.945), create("UIPadding", { PaddingLeft = UDim.new(0, 12), PaddingRight = UDim.new(0, 12), }) }) local SelectedLabel = create("TextLabel", { Name = "Selected", Parent = SelectBox, Size = UDim2.new(1, -24, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = tostring(selected), TextXAlignment = Enum.TextXAlignment.Left, }) local Chevron = create("ImageLabel", { Name = "Chevron", Parent = SelectBox, Position = UDim2.new(1, 0, 0.5, 0), AnchorPoint = Vector2.new(1, 0.5), Size = UDim2.fromOffset(12, 12), BackgroundTransparency = 1, Image = ICONS.chevron, ImageColor3 = C.Dim, }) -- Dedicated floating popup menu in PopupsLayer (ZIndex = 10005) local DropList = create("ScrollingFrame", { Name = name .. "_Popup", Parent = PopupsLayer, BackgroundColor3 = C.Popup, BackgroundTransparency = 0, -- 100% Solid Dark Slate ScrollBarThickness = 3, ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255), ScrollBarImageTransparency = 0.8, CanvasSize = UDim2.new(0, 0, 0, 0), AutomaticCanvasSize = Enum.AutomaticSize.Y, Visible = false, ZIndex = 10005, ClipsDescendants = true, }, { corner(4), stroke(C.PopupBorder, 1), create("UIPadding", { PaddingTop = UDim.new(0, 4), PaddingBottom = UDim.new(0, 4), PaddingLeft = UDim.new(0, 4), PaddingRight = UDim.new(0, 4), }), create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 2), }) }) local isOpen = false local function closeDropdown() if not isOpen then return end isOpen = false DropList.Visible = false ClickAway.Visible = false SelectBox.BackgroundTransparency = C.ControlTr tween(Chevron, { Rotation = 0 }, 0.15) if activeCloseFunc == closeDropdown then activeCloseFunc = nil end end local function populate() for _, c in ipairs(DropList:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end for idx, opt in ipairs(options) do local isCur = (opt == selected) local Entry = create("TextButton", { Name = opt, Parent = DropList, Size = UDim2.new(1, 0, 0, 24), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = isCur and 0.90 or 1, AutoButtonColor = false, Text = "", ZIndex = 10006, }, { corner(4), create("UIPadding", { PaddingLeft = UDim.new(0, 8) }) }) local EntryLabel = create("TextLabel", { Parent = Entry, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = isCur and C.Accent or C.Text, Text = tostring(opt), TextXAlignment = Enum.TextXAlignment.Left, ZIndex = 10007, }) Entry.MouseButton1Click:Connect(function() selected = opt SelectedLabel.Text = tostring(opt) Matcha.Flags[flag] = opt closeDropdown() safe(callback, opt, idx) end) Entry.MouseEnter:Connect(function() Entry.BackgroundTransparency = 0.93 EntryLabel.TextColor3 = C.Bright end) Entry.MouseLeave:Connect(function() Entry.BackgroundTransparency = (opt == selected) and 0.90 or 1 EntryLabel.TextColor3 = (opt == selected) and C.Accent or C.Text end) end end local function openDropdown() closeActivePopup() isOpen = true populate() local absPos = SelectBox.AbsolutePosition local absSize = SelectBox.AbsoluteSize local listH = math.min(#options * 26 + 8, 200) local screenH = ScreenGui.AbsoluteSize.Y local yPos = absPos.Y + absSize.Y + 4 if yPos + listH > screenH - 12 then yPos = math.max(10, absPos.Y - listH - 4) end DropList.Position = UDim2.fromOffset(absPos.X, yPos) DropList.Size = UDim2.fromOffset(absSize.X, listH) DropList.Visible = true ClickAway.Visible = true SelectBox.BackgroundTransparency = C.ControlHoverTr tween(Chevron, { Rotation = 180 }, 0.15) activeCloseFunc = closeDropdown end SelectBox.MouseButton1Click:Connect(function() if isOpen then closeDropdown() else openDropdown() end end) SelectBox.MouseEnter:Connect(function() if not isOpen then SelectBox.BackgroundTransparency = C.ControlHoverTr end end) SelectBox.MouseLeave:Connect(function() if not isOpen then SelectBox.BackgroundTransparency = C.ControlTr end end) return { Set = function(v) selected = v SelectedLabel.Text = tostring(v) Matcha.Flags[flag] = v safe(callback, v) end, Get = function() return selected end, Refresh = function(newOpts) options = newOpts or options if isOpen then populate() end end } end -- ------------------------------------------------------------- -- 4. BUTTON (col::button = white(17) with white(10) border) -- ------------------------------------------------------------- function Methods:AddButton(btnCfg) if typeof(btnCfg) == "string" then btnCfg = { Name = btnCfg } end btnCfg = btnCfg or {} local name = btnCfg.Name or "Button" local callback = btnCfg.Callback local h = btnCfg.Height or 26 local Btn = create("TextButton", { Name = name .. "_Btn", Parent = hostFrame, Size = UDim2.new(1, 0, 0, h), BackgroundColor3 = C.Button, BackgroundTransparency = C.ButtonTr, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(58, 60, 75), 1) }) local Label = create("TextLabel", { Parent = Btn, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = name, }) Btn.MouseButton1Click:Connect(function() safe(callback) end) Btn.MouseEnter:Connect(function() tween(Btn, { BackgroundTransparency = C.ButtonHoverTr }, 0.15) Label.TextColor3 = C.Bright end) Btn.MouseLeave:Connect(function() tween(Btn, { BackgroundTransparency = C.ButtonTr }, 0.15) Label.TextColor3 = C.Text end) return Btn end -- ------------------------------------------------------------- -- 5. BUTTON GROUP (Equal width horizontal buttons) -- ------------------------------------------------------------- function Methods:AddButtons(btnsCfg) btnsCfg = btnsCfg or {} local labels = btnsCfg.Labels or (btnsCfg[1] and btnsCfg) or { "Button 1", "Button 2" } local callback = btnsCfg.Callback local Row = create("Frame", { Name = "ButtonsRow", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 26), BackgroundTransparency = 1, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), }) }) local count = #labels for _, lbl in ipairs(labels) do local Btn = create("TextButton", { Name = lbl, Parent = Row, Size = UDim2.new(1 / count, -((count - 1) * 6 / count), 1, 0), BackgroundColor3 = C.Button, BackgroundTransparency = C.ButtonTr, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(58, 60, 75), 1) }) local LText = create("TextLabel", { Parent = Btn, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, Text = lbl, }) Btn.MouseButton1Click:Connect(function() safe(callback, lbl) end) Btn.MouseEnter:Connect(function() tween(Btn, { BackgroundTransparency = C.ButtonHoverTr }, 0.15) LText.TextColor3 = C.Bright end) Btn.MouseLeave:Connect(function() tween(Btn, { BackgroundTransparency = C.ButtonTr }, 0.15) LText.TextColor3 = C.Text end) end return Row end -- ------------------------------------------------------------- -- 6. TEXT INPUT (28px height, col::control = white(15)) -- ------------------------------------------------------------- function Methods:AddInput(inputCfg) if typeof(inputCfg) == "string" then inputCfg = { Placeholder = inputCfg } end inputCfg = inputCfg or {} local name = inputCfg.Name or "Input" local placeholder = inputCfg.Placeholder or "Type here..." local default = inputCfg.Default or "" local callback = inputCfg.Callback local flag = inputCfg.Flag or name local Box = create("Frame", { Name = name .. "_InputBox", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 28), BackgroundColor3 = C.Control, BackgroundTransparency = C.ControlTr, }, { corner(4), stroke(Color3.fromRGB(58, 60, 75), 1), create("UIPadding", { PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10), }) }) local TextBox = create("TextBox", { Parent = Box, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = C.Text, PlaceholderColor3 = C.Dim, PlaceholderText = placeholder, Text = default, TextXAlignment = Enum.TextXAlignment.Left, ClearTextOnFocus = false, }) TextBox.FocusLost:Connect(function(enterPressed) Matcha.Flags[flag] = TextBox.Text safe(callback, TextBox.Text, enterPressed) end) return { Set = function(t) TextBox.Text = tostring(t) end, Get = function() return TextBox.Text end, } end -- ------------------------------------------------------------- -- 7. SELECTABLE LIST (Rounded container box) -- ------------------------------------------------------------- function Methods:AddList(listCfg) listCfg = listCfg or {} local name = listCfg.Name or "List" local items = listCfg.Items or {} local height = listCfg.Height or 120 local selected = listCfg.Default or (items[1] or "") local callback = listCfg.Callback local ListFrame = create("ScrollingFrame", { Name = name .. "_ListFrame", Parent = hostFrame, Size = UDim2.new(1, 0, 0, height), BackgroundColor3 = Color3.fromRGB(20, 20, 28), BackgroundTransparency = 0.50, ScrollBarThickness = 3, ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255), ScrollBarImageTransparency = 0.82, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(0, 0, 0, 0), }, { corner(6), stroke(Color3.fromRGB(255, 255, 255), 1, 0.92), create("UIPadding", { PaddingTop = UDim.new(0, 4), PaddingBottom = UDim.new(0, 4), PaddingLeft = UDim.new(0, 4), PaddingRight = UDim.new(0, 4), }), create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 2), }) }) local function renderList() for _, c in ipairs(ListFrame:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end for idx, item in ipairs(items) do local isCur = (item == selected) local Entry = create("TextButton", { Name = item, Parent = ListFrame, Size = UDim2.new(1, 0, 0, 26), BackgroundColor3 = Color3.fromRGB(255, 255, 255), BackgroundTransparency = isCur and 0.90 or 1, AutoButtonColor = false, Text = "", }, { corner(4), create("UIPadding", { PaddingLeft = UDim.new(0, 8) }) }) local EntryLabel = create("TextLabel", { Parent = Entry, Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = isCur and C.Accent or C.Text, Text = tostring(item), TextXAlignment = Enum.TextXAlignment.Left, }) Entry.MouseButton1Click:Connect(function() selected = item renderList() safe(callback, selected, idx) end) Entry.MouseEnter:Connect(function() Entry.BackgroundTransparency = 0.94 EntryLabel.TextColor3 = C.Bright end) Entry.MouseLeave:Connect(function() Entry.BackgroundTransparency = (item == selected) and 0.90 or 1 EntryLabel.TextColor3 = (item == selected) and C.Accent or C.Text end) end end renderList() return { Refresh = function(newItems) items = newItems or items renderList() end, Get = function() return selected end, } end -- ------------------------------------------------------------- -- 8. ROW (WITH VALUE & OPTIONAL CHIP BUTTON OR KEYBIND/COLOR) -- ------------------------------------------------------------- function Methods:AddRow(rowCfg) rowCfg = rowCfg or {} local text = rowCfg.Text or "Row" local val = rowCfg.Value or "" local chipText = rowCfg.Chip local chipCb = rowCfg.ChipCallback local color = rowCfg.Color or C.Text local valColor = rowCfg.ValueColor or C.Text local Row = create("Frame", { Name = text .. "_Row", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 20), BackgroundTransparency = 1, }) local Label = create("TextLabel", { Parent = Row, Size = UDim2.new(0.5, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = color, Text = text, TextXAlignment = Enum.TextXAlignment.Left, }) local Trailing = create("Frame", { Parent = Row, Position = UDim2.new(1, 0, 0, 0), AnchorPoint = Vector2.new(1, 0), Size = UDim2.new(0.5, 0, 1, 0), BackgroundTransparency = 1, }, { create("UIListLayout", { FillDirection = Enum.FillDirection.Horizontal, HorizontalAlignment = Enum.HorizontalAlignment.Right, VerticalAlignment = Enum.VerticalAlignment.Center, Padding = UDim.new(0, 6), }) }) if chipText then local Chip = create("TextButton", { Parent = Trailing, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 16), BackgroundColor3 = C.Control, BackgroundTransparency = C.ControlTr, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(255, 255, 255), 1, 0.94), create("UIPadding", { PaddingLeft = UDim.new(0, 6), PaddingRight = UDim.new(0, 6), }) }) local ChipLabel = create("TextLabel", { Parent = Chip, Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 10, TextColor3 = C.Dim, Text = chipText, }) Chip.MouseButton1Click:Connect(function() safe(chipCb) end) Chip.MouseEnter:Connect(function() Chip.BackgroundTransparency = C.ControlHoverTr ChipLabel.TextColor3 = C.Text end) Chip.MouseLeave:Connect(function() Chip.BackgroundTransparency = C.ControlTr ChipLabel.TextColor3 = C.Dim end) end if rowCfg.Keybind then local currentKey = rowCfg.Keybind local kbCallback = rowCfg.Callback local isWaiting = false local KeyBtn = create("TextButton", { Name = "Keybind", Parent = Trailing, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(36, 20), BackgroundColor3 = C.Control, BackgroundTransparency = C.ControlTr, AutoButtonColor = false, Text = "", }, { corner(10), stroke(Color3.fromRGB(60, 62, 78), 1), create("UIPadding", { PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), }) }) local KeyLabel = create("TextLabel", { Parent = KeyBtn, Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 10, TextColor3 = C.Text, Text = formatKeyName(currentKey), }) KeyBtn.MouseButton1Click:Connect(function() isWaiting = true KeyLabel.Text = "..." KeyLabel.TextColor3 = C.Accent end) UserInputService.InputBegan:Connect(function(input) if isWaiting then if input.UserInputType == Enum.UserInputType.Keyboard then currentKey = (input.KeyCode == Enum.KeyCode.Escape) and Enum.KeyCode.Unknown or input.KeyCode isWaiting = false KeyLabel.Text = formatKeyName(currentKey) KeyLabel.TextColor3 = C.Text safe(kbCallback, currentKey) elseif input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.MouseButton2 or input.UserInputType == Enum.UserInputType.MouseButton3 then currentKey = input.UserInputType isWaiting = false KeyLabel.Text = formatKeyName(currentKey) KeyLabel.TextColor3 = C.Text safe(kbCallback, currentKey) end end end) end if rowCfg.ColorPicker then local curColor = rowCfg.ColorPicker local cpCallback = rowCfg.Callback local Swatch = create("TextButton", { Name = "ColorSwatch", Parent = Trailing, Size = UDim2.fromOffset(18, 18), BackgroundColor3 = curColor, AutoButtonColor = false, Text = "", }, { corner(4), stroke(Color3.fromRGB(255, 255, 255), 1, C.OutlineTr) }) Swatch.MouseButton1Click:Connect(function() if curColor == C.White then curColor = C.Accent elseif curColor == C.Accent then curColor = C.Green elseif curColor == C.Green then curColor = Color3.fromRGB(160, 200, 255) elseif curColor == Color3.fromRGB(160, 200, 255) then curColor = C.Yellow else curColor = C.White end Swatch.BackgroundColor3 = curColor safe(cpCallback, curColor) end) end if val and val ~= "" then local ValLabel = create("TextLabel", { Parent = Trailing, AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.new(0, 0, 1, 0), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = valColor, Text = tostring(val), TextXAlignment = Enum.TextXAlignment.Right, }) end return Row end function Methods:AddKeybind(kbCfg) kbCfg = kbCfg or {} return Methods:AddRow({ Text = kbCfg.Name or "Keybind", Keybind = kbCfg.Default or Enum.KeyCode.Unknown, Callback = kbCfg.Callback }) end function Methods:AddColorPicker(cpCfg) cpCfg = cpCfg or {} return Methods:AddRow({ Text = cpCfg.Name or "Color", ColorPicker = cpCfg.Default or C.White, Callback = cpCfg.Callback }) end function Methods:AddBox(boxCfg) boxCfg = boxCfg or {} local h = boxCfg.Height or 180 local SubBox = create("ScrollingFrame", { Name = "SubBox", Parent = hostFrame, Size = UDim2.new(1, 0, 0, h), BackgroundColor3 = Color3.fromRGB(20, 20, 28), BackgroundTransparency = 0.50, ScrollBarThickness = 3, ScrollBarImageColor3 = Color3.fromRGB(255, 255, 255), ScrollBarImageTransparency = 0.82, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(0, 0, 0, 0), }, { corner(6), stroke(Color3.fromRGB(255, 255, 255), 1, 0.92), create("UIPadding", { PaddingTop = UDim.new(0, 10), PaddingBottom = UDim.new(0, 10), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10), }), create("UIListLayout", { SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 6), }) }) return bindWidgetMethods(SubBox) end -- ------------------------------------------------------------- -- 9. MISC UTILITIES (LABEL, BADGE, SEPARATOR, SPACING) -- ------------------------------------------------------------- function Methods:AddLabel(lblCfg) if typeof(lblCfg) == "string" then lblCfg = { Text = lblCfg } end lblCfg = lblCfg or {} local text = lblCfg.Text or "Label" local color = lblCfg.Color or C.Text local center = lblCfg.Center or false local Label = create("TextLabel", { Name = "Label", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 16), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 12, TextColor3 = color, Text = text, TextXAlignment = center and Enum.TextXAlignment.Center or Enum.TextXAlignment.Left, }) return Label end function Methods:AddBadge(badgeStr) local Frame = create("Frame", { Name = "BadgeRow", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 18), BackgroundTransparency = 1, }) local Badge = create("Frame", { Parent = Frame, AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), AutomaticSize = Enum.AutomaticSize.X, Size = UDim2.fromOffset(0, 16), BackgroundColor3 = C.Tint, BackgroundTransparency = C.TintTr, }, { corner(4), stroke(Color3.fromRGB(181, 96, 96), 1, 0.85), create("UIPadding", { PaddingLeft = UDim.new(0, 8), PaddingRight = UDim.new(0, 8), }), create("TextLabel", { Size = UDim2.new(1, 0, 1, 0), AutomaticSize = Enum.AutomaticSize.X, BackgroundTransparency = 1, FontFace = InterSemi, TextSize = 10, TextColor3 = C.Accent, Text = badgeStr, }) }) return Frame end function Methods:AddSeparator() local Sep = create("Frame", { Name = "Separator", Parent = hostFrame, Size = UDim2.new(1, 0, 0, 1), BackgroundColor3 = C.Divider, BackgroundTransparency = C.DividerTr, BorderSizePixel = 0, }) return Sep end function Methods:AddSpacing(h) local Space = create("Frame", { Name = "Spacing", Parent = hostFrame, Size = UDim2.new(1, 0, 0, h or 8), BackgroundTransparency = 1, }) return Space end return Methods end -- Expose widget builder on PanelObj if subTabs and #subTabs > 0 then function PanelObj:GetSubTab(subName) local pageFrame = SubTabPages[subName] if not pageFrame then warn("[Matcha]: SubTab '" .. tostring(subName) .. "' not found!") return nil end return bindWidgetMethods(pageFrame) end else local methods = bindWidgetMethods(SingleContent) for k, v in pairs(methods) do PanelObj[k] = v end end return PanelObj end return ColObj end return TabObj end return Window end -- ============================================================================= -- TOAST NOTIFICATIONS (Translucent acrylic alert) -- ============================================================================= function Matcha:Notify(cfg) if typeof(cfg) == "string" then cfg = { Text = cfg } end cfg = cfg or {} local title = cfg.Title or "Matcha" local text = cfg.Text or "Notification" local dur = cfg.Duration or 3.5 local container = getContainer() local notifyGui = container:FindFirstChild("Matcha_Notifications") if not notifyGui then notifyGui = create("ScreenGui", { Name = "Matcha_Notifications", Parent = container, ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, }) end local Holder = notifyGui:FindFirstChild("Holder") if not Holder then Holder = create("Frame", { Name = "Holder", Parent = notifyGui, Position = UDim2.new(1, -20, 1, -20), AnchorPoint = Vector2.new(1, 1), Size = UDim2.new(0, 280, 1, -40), BackgroundTransparency = 1, }, { create("UIListLayout", { VerticalAlignment = Enum.VerticalAlignment.Bottom, SortOrder = Enum.SortOrder.LayoutOrder, Padding = UDim.new(0, 8), }) }) end local Toast = create("Frame", { Name = "Toast", Parent = Holder, Size = UDim2.new(1, 0, 0, 56), BackgroundColor3 = C.WindowBg, BackgroundTransparency = 0.08, ClipsDescendants = false, }, { corner(6), stroke(C.Border, 1, C.BorderTr), create("UIPadding", { PaddingLeft = UDim.new(0, 14), PaddingRight = UDim.new(0, 14), PaddingTop = UDim.new(0, 8), PaddingBottom = UDim.new(0, 8), }) }) local TitleL = create("TextLabel", { Name = "Title", Parent = Toast, Size = UDim2.new(1, 0, 0, 18), BackgroundTransparency = 1, FontFace = InterSemi, TextSize = 12, TextColor3 = C.Accent, Text = title, TextXAlignment = Enum.TextXAlignment.Left, }) local TextL = create("TextLabel", { Name = "Text", Parent = Toast, Position = UDim2.new(0, 0, 0, 20), Size = UDim2.new(1, 0, 0, 18), BackgroundTransparency = 1, FontFace = InterMedium, TextSize = 11, TextColor3 = C.Text, Text = text, TextXAlignment = Enum.TextXAlignment.Left, }) local ProgressBar = create("Frame", { Name = "Progress", Parent = Toast, Position = UDim2.new(0, -14, 1, 7), Size = UDim2.new(1, 28, 0, 2), BackgroundColor3 = C.Accent, BorderSizePixel = 0, }) tween(ProgressBar, { Size = UDim2.new(0, 0, 0, 2) }, dur, Enum.EasingStyle.Linear) task.delay(dur, function() local tw = tween(Toast, { BackgroundTransparency = 1 }, 0.25) tween(TitleL, { TextTransparency = 1 }, 0.25) tween(TextL, { TextTransparency = 1 }, 0.25) tw.Completed:Connect(function() Toast:Destroy() end) end) end -- ========================================================================= -- GLOBAL HOTKEY LISTENER (VK_INSERT -> Enum.KeyCode.Insert) -- ========================================================================= UserInputService.InputBegan:Connect(function(input, gpe) if gpe then return end if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Matcha.ToggleKey then for _, win in ipairs(Matcha.Windows) do win:Toggle() end end end) return Matcha