local Players = game:GetService("Players") local HttpService = game:GetService("HttpService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local pgui = player:WaitForChild("PlayerGui") local themes = { Midnight = { bg = Color3.fromRGB(8, 8, 14), panel = Color3.fromRGB(18, 18, 26), panelSoft = Color3.fromRGB(24, 24, 34), accent = Color3.fromRGB(255, 220, 90), text = Color3.fromRGB(235, 235, 240), muted = Color3.fromRGB(150, 150, 160), stroke = Color3.fromRGB(60, 60, 80), danger = Color3.fromRGB(255, 120, 120), success = Color3.fromRGB(140, 255, 160) }, Nord = { bg = Color3.fromRGB(25, 28, 35), panel = Color3.fromRGB(36, 40, 52), panelSoft = Color3.fromRGB(46, 52, 64), accent = Color3.fromRGB(143, 188, 187), text = Color3.fromRGB(236, 239, 244), muted = Color3.fromRGB(136, 146, 176), stroke = Color3.fromRGB(67, 76, 94), danger = Color3.fromRGB(191, 97, 106), success = Color3.fromRGB(163, 190, 140) }, Monokai = { bg = Color3.fromRGB(30, 30, 30), panel = Color3.fromRGB(40, 40, 40), panelSoft = Color3.fromRGB(50, 50, 50), accent = Color3.fromRGB(249, 38, 114), text = Color3.fromRGB(248, 248, 242), muted = Color3.fromRGB(117, 113, 94), stroke = Color3.fromRGB(80, 80, 80), danger = Color3.fromRGB(255, 85, 85), success = Color3.fromRGB(166, 226, 46) }, Solarized = { bg = Color3.fromRGB(0, 43, 54), panel = Color3.fromRGB(7, 54, 66), panelSoft = Color3.fromRGB(0, 43, 54), accent = Color3.fromRGB(181, 137, 0), text = Color3.fromRGB(253, 246, 227), muted = Color3.fromRGB(147, 161, 161), stroke = Color3.fromRGB(88, 110, 117), danger = Color3.fromRGB(220, 50, 47), success = Color3.fromRGB(133, 153, 0) }, HighContrast = { bg = Color3.fromRGB(0, 0, 0), panel = Color3.fromRGB(10, 10, 10), panelSoft = Color3.fromRGB(20, 20, 20), accent = Color3.fromRGB(255, 255, 0), text = Color3.fromRGB(255, 255, 255), muted = Color3.fromRGB(180, 180, 180), stroke = Color3.fromRGB(255, 255, 255), danger = Color3.fromRGB(255, 0, 0), success = Color3.fromRGB(0, 255, 0) } } local currentTheme = themes.Midnight local settings = { editorFontSize = 15, editorFont = Enum.Font.Code, editorWordWrap = false, editorAutoIndent = true, editorLineNumbers = false, autoInject = false, autoExecuteLast = false, queueOnTeleport = true, sandboxMode = false, clearOnExecute = false, scriptbloxAutoOpenTab = true, scriptbloxSafeMode = false, windowTopMost = false, windowAnimations = true, uiScale = 1, transparency = 0, confirmExecute = false, showInternalLogs = false, showExecTime = false } local function roundify(obj, radius) local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, radius) c.Parent = obj return c end local function stroke(obj, color, thickness) local s = Instance.new("UIStroke") s.Color = color or currentTheme.stroke s.Thickness = thickness or 1 s.ApplyStrokeMode = Enum.ApplyStrokeMode.Border s.Parent = obj return s end local function pad(obj, l, t, r, b) local p = Instance.new("UIPadding") p.PaddingLeft = UDim.new(0, l or 0) p.PaddingTop = UDim.new(0, t or 0) p.PaddingRight = UDim.new(0, r or 0) p.PaddingBottom = UDim.new(0, b or 0) p.Parent = obj return p end local function makeText(parent, text, size, bold, color, align) local lbl = Instance.new("TextLabel") lbl.BackgroundTransparency = 1 lbl.Text = text lbl.Font = bold and Enum.Font.GothamBold or Enum.Font.Gotham lbl.TextSize = size lbl.TextColor3 = color or currentTheme.text lbl.TextXAlignment = align or Enum.TextXAlignment.Left lbl.TextYAlignment = Enum.TextYAlignment.Center lbl.Parent = parent return lbl end local function makeButton(parent, text) local btn = Instance.new("TextButton") btn.BackgroundColor3 = currentTheme.panelSoft btn.BorderSizePixel = 0 btn.AutoButtonColor = false btn.Font = Enum.Font.Gotham btn.TextSize = 15 btn.TextColor3 = currentTheme.text btn.Text = text roundify(btn, 6) stroke(btn, Color3.fromRGB(40, 40, 60), 1) btn.Parent = parent btn.MouseEnter:Connect(function() if not settings.windowAnimations then return end TweenService:Create(btn, TweenInfo.new(0.15, Enum.EasingStyle.Sine), { BackgroundColor3 = currentTheme.panel }):Play() end) btn.MouseLeave:Connect(function() if not settings.windowAnimations then return end TweenService:Create(btn, TweenInfo.new(0.15, Enum.EasingStyle.Sine), { BackgroundColor3 = currentTheme.panelSoft }):Play() end) return btn end local function makeToggle(parent, labelText, default, callback) local holder = Instance.new("Frame") holder.Size = UDim2.new(1, 0, 0, 26) holder.BackgroundTransparency = 1 holder.Parent = parent local lbl = makeText(holder, labelText, 13, false, currentTheme.text) lbl.Size = UDim2.new(1, -60, 1, 0) lbl.Position = UDim2.new(0, 0, 0, 0) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 46, 0, 22) btn.Position = UDim2.new(1, -50, 0.5, -11) btn.BackgroundColor3 = default and currentTheme.accent or currentTheme.panelSoft btn.BorderSizePixel = 0 btn.AutoButtonColor = false btn.Text = "" roundify(btn, 11) stroke(btn, currentTheme.stroke, 1) btn.Parent = holder local knob = Instance.new("Frame") knob.Size = UDim2.new(0, 18, 0, 18) knob.Position = default and UDim2.new(1, -20, 0.5, -9) or UDim2.new(0, 2, 0.5, -9) knob.BackgroundColor3 = Color3.fromRGB(240, 240, 240) knob.BorderSizePixel = 0 roundify(knob, 9) knob.Parent = btn local state = default btn.MouseButton1Click:Connect(function() state = not state if settings.windowAnimations then TweenService:Create(btn, TweenInfo.new(0.15, Enum.EasingStyle.Sine), { BackgroundColor3 = state and currentTheme.accent or currentTheme.panelSoft }):Play() TweenService:Create(knob, TweenInfo.new(0.15, Enum.EasingStyle.Sine), { Position = state and UDim2.new(1, -20, 0.5, -9) or UDim2.new(0, 2, 0.5, -9) }):Play() else btn.BackgroundColor3 = state and currentTheme.accent or currentTheme.panelSoft knob.Position = state and UDim2.new(1, -20, 0.5, -9) or UDim2.new(0, 2, 0.5, -9) end if callback then callback(state) end end) return holder end local function makeSlider(parent, labelText, min, max, default, callback) local holder = Instance.new("Frame") holder.Size = UDim2.new(1, 0, 0, 32) holder.BackgroundTransparency = 1 holder.Parent = parent local lbl = makeText(holder, labelText .. " (" .. tostring(default) .. ")", 13, false, currentTheme.text) lbl.Size = UDim2.new(1, 0, 0, 16) lbl.Position = UDim2.new(0, 0, 0, 0) local bar = Instance.new("Frame") bar.Size = UDim2.new(1, -80, 0, 6) bar.Position = UDim2.new(0, 0, 0, 20) bar.BackgroundColor3 = currentTheme.panelSoft bar.BorderSizePixel = 0 roundify(bar, 3) bar.Parent = holder local fill = Instance.new("Frame") fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0) fill.BackgroundColor3 = currentTheme.accent fill.BorderSizePixel = 0 roundify(fill, 3) fill.Parent = bar local dragging = false local function setValueFromX(x) local rel = math.clamp((x - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1) local value = math.floor(min + (max - min) * rel + 0.5) fill.Size = UDim2.new(rel, 0, 1, 0) lbl.Text = labelText .. " (" .. tostring(value) .. ")" if callback then callback(value) end end bar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true setValueFromX(input.Position.X) end end) bar.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) bar.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then setValueFromX(input.Position.X) end end) return holder end local function getExecutorLoad() if syn and syn.loadstring then return syn.loadstring end if fluxus and fluxus.loadstring then return fluxus.loadstring end return loadstring end local function detectQueue() return queue_on_teleport or (syn and syn.queue_on_teleport) or (fluxus and fluxus.queue_on_teleport) or (KRNL_LOADED and queue_on_teleport) or nil end local ScriptBlox = {} function ScriptBlox.GetDetails(scriptId) local url = "https://scriptblox.com/api/script/" .. scriptId local ok, res = pcall(function() return HttpService:GetAsync(url) end) if not ok then return nil end local data local ok2 = pcall(function() data = HttpService:JSONDecode(res) end) if not ok2 or not data or not data.script then return nil end return data.script end function ScriptBlox.GetRaw(scriptId) local url = "https://scriptblox.com/api/script/raw/" .. scriptId local ok, res = pcall(function() return HttpService:GetAsync(url) end) if not ok then return nil end return res end local injected = false local attaching = false local lastScript = "--Welcome to Madium\nprint('Hello, World!')" local function executeScript(code) if not injected then warn("[Madium] Tried to execute without injecting") return false end if not code or code == "" then warn("[Madium] Tried to execute empty script") return false end lastScript = code local loader = getExecutorLoad() local fn, err = loader(code) if not fn then warn("[Madium] loadstring error: " .. tostring(err)) return false end local startTime = tick() local ok, runtimeErr = pcall(fn) local elapsed = tick() - startTime if settings.showExecTime then print(string.format("[Madium] Execution time: %.3fs", elapsed)) end if not ok then warn("[Madium] runtime error: " .. tostring(runtimeErr)) end local q = detectQueue() if q and settings.queueOnTeleport then q(code) end return true end local function clearScript(textbox) if textbox and textbox:IsA("TextBox") then textbox.Text = "" end end local gui = Instance.new("ScreenGui") gui.Name = "MadiumDesktopReplica" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.Parent = pgui local main = Instance.new("Frame") main.Size = UDim2.new(0, 860, 0, 520) main.Position = UDim2.new(0.5, -430, 0.5, -260) main.BackgroundColor3 = currentTheme.bg main.BorderSizePixel = 0 roundify(main, 18) stroke(main, Color3.fromRGB(50, 50, 80), 1) main.BackgroundTransparency = settings.transparency main.Parent = gui local uiScale = Instance.new("UIScale") uiScale.Scale = settings.uiScale uiScale.Parent = main local dockButton = Instance.new("TextButton") dockButton.Name = "MadiumDock" dockButton.Size = UDim2.new(0, 140, 0, 32) dockButton.Position = UDim2.new(0, 20, 1, -52) dockButton.BackgroundColor3 = currentTheme.panel dockButton.BorderSizePixel = 0 dockButton.Font = Enum.Font.GothamBold dockButton.TextSize = 14 dockButton.TextColor3 = currentTheme.accent dockButton.Text = "Madium" roundify(dockButton, 10) stroke(dockButton, currentTheme.stroke, 1) dockButton.Visible = false dockButton.Parent = gui dockButton.MouseButton1Click:Connect(function() main.Visible = true dockButton.Visible = false end) local top = Instance.new("Frame") top.Size = UDim2.new(1, -24, 0, 52) top.Position = UDim2.new(0, 12, 0, 12) top.BackgroundColor3 = currentTheme.panel top.BorderSizePixel = 0 roundify(top, 12) stroke(top, currentTheme.stroke, 1) pad(top, 12, 0, 12, 0) top.Parent = main local topLayout = Instance.new("UIListLayout") topLayout.FillDirection = Enum.FillDirection.Horizontal topLayout.HorizontalAlignment = Enum.HorizontalAlignment.Left topLayout.VerticalAlignment = Enum.VerticalAlignment.Center topLayout.Padding = UDim.new(0, 10) topLayout.Parent = top local leftGroup = Instance.new("Frame") leftGroup.BackgroundTransparency = 1 leftGroup.Size = UDim2.new(0, 260, 1, 0) leftGroup.Parent = top local leftLayout = Instance.new("UIListLayout") leftLayout.FillDirection = Enum.FillDirection.Horizontal leftLayout.VerticalAlignment = Enum.VerticalAlignment.Center leftLayout.Padding = UDim.new(0, 8) leftLayout.Parent = leftGroup local avatarCircle = Instance.new("Frame") avatarCircle.Size = UDim2.new(0, 32, 0, 32) avatarCircle.BackgroundColor3 = currentTheme.panelSoft roundify(avatarCircle, 16) stroke(avatarCircle, currentTheme.stroke, 1) avatarCircle.Parent = leftGroup local avatarInner = Instance.new("Frame") avatarInner.Size = UDim2.new(1, -6, 1, -6) avatarInner.Position = UDim2.new(0, 3, 0, 3) avatarInner.BackgroundColor3 = currentTheme.accent roundify(avatarInner, 14) avatarInner.Parent = avatarCircle local titleGroup = Instance.new("Frame") titleGroup.BackgroundTransparency = 1 titleGroup.Size = UDim2.new(1, -40, 1, 0) titleGroup.Parent = leftGroup local titleLayout = Instance.new("UIListLayout") titleLayout.FillDirection = Enum.FillDirection.Vertical titleLayout.VerticalAlignment = Enum.VerticalAlignment.Center titleLayout.Padding = UDim.new(0, -4) titleLayout.Parent = titleGroup local title = makeText(titleGroup, "Madium", 20, true, currentTheme.accent) title.TextXAlignment = Enum.TextXAlignment.Left local subtitle = makeText(titleGroup, "Lua Executor for Roblox", 13, false, currentTheme.muted) subtitle.TextXAlignment = Enum.TextXAlignment.Left local navGroup = Instance.new("Frame") navGroup.BackgroundTransparency = 1 navGroup.Size = UDim2.new(0, 260, 1, 0) navGroup.Parent = top local navLayout = Instance.new("UIListLayout") navLayout.FillDirection = Enum.FillDirection.Horizontal navLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center navLayout.VerticalAlignment = Enum.VerticalAlignment.Center navLayout.Padding = UDim.new(0, 8) navLayout.Parent = navGroup local tabs = {} local function makeIconTab(name) local btn = Instance.new("TextButton") btn.Size = UDim2.new(0, 70, 0, 28) btn.BackgroundColor3 = currentTheme.panelSoft btn.BorderSizePixel = 0 btn.AutoButtonColor = false btn.Font = Enum.Font.GothamBold btn.TextSize = 14 btn.TextColor3 = currentTheme.muted btn.Text = name roundify(btn, 8) stroke(btn, currentTheme.stroke, 1) btn.Parent = navGroup tabs[name] = btn return btn end local homeTab = makeIconTab("Home") local codeTab = makeIconTab("Code") local searchTab = makeIconTab("Search") local settingsTab = makeIconTab("Settings") local rightGroup = Instance.new("Frame") rightGroup.BackgroundTransparency = 1 rightGroup.Size = UDim2.new(1, -520, 1, 0) rightGroup.Parent = top local rightLayout = Instance.new("UIListLayout") rightLayout.FillDirection = Enum.FillDirection.Horizontal rightLayout.HorizontalAlignment = Enum.HorizontalAlignment.Right rightLayout.VerticalAlignment = Enum.VerticalAlignment.Center rightLayout.Padding = UDim.new(0, 8) rightLayout.Parent = rightGroup local attachedPill = Instance.new("Frame") attachedPill.Size = UDim2.new(0, 130, 0, 26) attachedPill.BackgroundColor3 = currentTheme.panelSoft roundify(attachedPill, 13) stroke(attachedPill, currentTheme.stroke, 1) attachedPill.Parent = rightGroup local attachedDot = Instance.new("Frame") attachedDot.Size = UDim2.new(0, 10, 0, 10) attachedDot.Position = UDim2.new(0, 8, 0.5, -5) attachedDot.BackgroundColor3 = Color3.fromRGB(200, 200, 200) roundify(attachedDot, 5) attachedDot.Parent = attachedPill local attachedLabel = makeText(attachedPill, "Idle", 13, true, currentTheme.text) attachedLabel.Size = UDim2.new(1, -24, 1, 0) attachedLabel.Position = UDim2.new(0, 22, 0, 0) attachedLabel.TextXAlignment = Enum.TextXAlignment.Left local minBtn = Instance.new("TextButton") minBtn.Size = UDim2.new(0, 26, 0, 26) minBtn.BackgroundColor3 = currentTheme.panelSoft minBtn.BorderSizePixel = 0 minBtn.Font = Enum.Font.GothamBold minBtn.TextSize = 14 minBtn.TextColor3 = currentTheme.muted minBtn.Text = "_" roundify(minBtn, 8) stroke(minBtn, currentTheme.stroke, 1) minBtn.Parent = rightGroup local closeBtn = Instance.new("TextButton") closeBtn.Size = UDim2.new(0, 26, 0, 26) closeBtn.BackgroundColor3 = Color3.fromRGB(32, 18, 20) closeBtn.BorderSizePixel = 0 closeBtn.Font = Enum.Font.GothamBold closeBtn.TextSize = 14 closeBtn.TextColor3 = currentTheme.danger closeBtn.Text = "X" roundify(closeBtn, 8) stroke(closeBtn, currentTheme.stroke, 1) closeBtn.Parent = rightGroup minBtn.MouseButton1Click:Connect(function() main.Visible = false dockButton.Visible = true end) closeBtn.MouseButton1Click:Connect(function() main.Visible = false dockButton.Visible = false end) local content = Instance.new("Frame") content.Size = UDim2.new(1, -24, 1, -90) content.Position = UDim2.new(0, 12, 0, 70) content.BackgroundTransparency = 1 content.Parent = main local pages = {} local currentPage local function makePage(name) local f = Instance.new("Frame") f.Name = name .. "Page" f.Size = UDim2.new(1, 0, 1, 0) f.BackgroundTransparency = 1 f.Visible = false f.Parent = content pages[name] = f return f end local function highlightTab(name) for n, btn in pairs(tabs) do local active = (n == name) if settings.windowAnimations then TweenService:Create(btn, TweenInfo.new(0.15, Enum.EasingStyle.Sine), { BackgroundColor3 = active and currentTheme.panel or currentTheme.panelSoft, TextColor3 = active and currentTheme.accent or currentTheme.muted }):Play() else btn.BackgroundColor3 = active and currentTheme.panel or currentTheme.panelSoft btn.TextColor3 = active and currentTheme.accent or currentTheme.muted end end end local function showPage(name) for n, p in pairs(pages) do p.Visible = (n == name) end currentPage = name highlightTab(name) end local homePage = makePage("Home") local homeLeft = Instance.new("Frame") homeLeft.Size = UDim2.new(0.35, 0, 1, 0) homeLeft.BackgroundTransparency = 1 homeLeft.Parent = homePage local homeRight = Instance.new("Frame") homeRight.Size = UDim2.new(0.65, 0, 1, 0) homeRight.Position = UDim2.new(0.35, 0, 0, 0) homeRight.BackgroundTransparency = 1 homeRight.Parent = homePage local infoCard = Instance.new("Frame") infoCard.Size = UDim2.new(0, 280, 0, 230) infoCard.Position = UDim2.new(0, 10, 0, 10) infoCard.BackgroundColor3 = currentTheme.panel roundify(infoCard, 12) stroke(infoCard, currentTheme.stroke, 1) pad(infoCard, 10, 10, 10, 10) infoCard.Parent = homeLeft local infoTitle = makeText(infoCard, "Madium", 16, true, currentTheme.text) infoTitle.Size = UDim2.new(1, 0, 0, 20) infoTitle.Position = UDim2.new(0, 0, 0, 0) local infoSubtitle = makeText(infoCard, "Lua Executor for Roblox", 13, false, currentTheme.muted) infoSubtitle.Size = UDim2.new(1, 0, 0, 18) infoSubtitle.Position = UDim2.new(0, 0, 0, 22) local tag = Instance.new("TextLabel") tag.Size = UDim2.new(0, 70, 0, 18) tag.Position = UDim2.new(0, 0, 0, 44) tag.BackgroundColor3 = currentTheme.accent tag.BorderSizePixel = 0 tag.Font = Enum.Font.GothamBold tag.TextSize = 11 tag.TextColor3 = Color3.fromRGB(40, 30, 10) tag.Text = "Developer" roundify(tag, 9) tag.Parent = infoCard local viewport = Instance.new("ViewportFrame") viewport.Size = UDim2.new(1, -10, 1, -80) viewport.Position = UDim2.new(0, 5, 0, 70) viewport.BackgroundColor3 = currentTheme.panelSoft roundify(viewport, 10) stroke(viewport, currentTheme.stroke, 1) viewport.Parent = infoCard local cam = Instance.new("Camera") cam.Parent = viewport viewport.CurrentCamera = cam task.spawn(function() local ok, asset = pcall(function() return game:GetObjects("rbxassetid://89959844461057")[1] end) if ok and asset then asset.Parent = viewport cam.CFrame = CFrame.new(Vector3.new(0, 2, 6), Vector3.new(0, 2, 0)) end end) local quickCard = Instance.new("Frame") quickCard.Size = UDim2.new(1, -20, 0, 230) quickCard.Position = UDim2.new(0, 10, 0, 10) quickCard.BackgroundColor3 = currentTheme.panel roundify(quickCard, 12) stroke(quickCard, currentTheme.stroke, 1) pad(quickCard, 12, 12, 12, 12) quickCard.Parent = homeRight local quickTitle = makeText(quickCard, "quick actions", 15, true, currentTheme.accent) quickTitle.Size = UDim2.new(1, 0, 0, 20) quickTitle.Position = UDim2.new(0, 0, 0, 0) local quickList = Instance.new("Frame") quickList.Size = UDim2.new(1, 0, 1, -40) quickList.Position = UDim2.new(0, 0, 0, 30) quickList.BackgroundTransparency = 1 quickList.Parent = quickCard local quickLayout = Instance.new("UIListLayout") quickLayout.FillDirection = Enum.FillDirection.Vertical quickLayout.VerticalAlignment = Enum.VerticalAlignment.Top quickLayout.Padding = UDim.new(0, 8) quickLayout.Parent = quickList local function makeQuickAction(text) local btn = makeButton(quickList, text) btn.Size = UDim2.new(1, 0, 0, 34) return btn end local actEditor = makeQuickAction("Head to Script Editor") local actInject = makeQuickAction("Inject") local actLast = makeQuickAction("Execute Last Script") local actSearch = makeQuickAction("Open ScriptBlox Search") actEditor.MouseButton1Click:Connect(function() showPage("Code") end) actSearch.MouseButton1Click:Connect(function() showPage("Search") end) local socialCard = Instance.new("Frame") socialCard.Size = UDim2.new(1, -20, 0, 80) socialCard.Position = UDim2.new(0, 10, 0, 250) socialCard.BackgroundColor3 = currentTheme.panel roundify(socialCard, 12) stroke(socialCard, currentTheme.stroke, 1) pad(socialCard, 12, 10, 12, 10) socialCard.Parent = homeRight local yt = makeText(socialCard, "youtube.com/@olemad", 13, false, currentTheme.danger) yt.Size = UDim2.new(1, 0, 0, 20) yt.Position = UDim2.new(0, 0, 0, 0) local dc = makeText(socialCard, ".gg/olemad", 13, false, Color3.fromRGB(140, 180, 255)) dc.Size = UDim2.new(1, 0, 0, 20) dc.Position = UDim2.new(0, 0, 0, 22) local footer = makeText(homePage, "FPS: 4,159 – Time: --:-- – Welcome to Madium, @" .. player.Name .. "!", 12, false, currentTheme.muted) footer.Size = UDim2.new(1, -20, 0, 20) footer.Position = UDim2.new(0, 10, 1, -24) footer.TextXAlignment = Enum.TextXAlignment.Left task.spawn(function() while footer.Parent do local t = os.date("*t") local hour = ((t.hour - 1) % 12) + 1 local ampm = t.hour >= 12 and "PM" or "AM" local timeStr = string.format("%02d:%02d %s", hour, t.min, ampm) footer.Text = string.format("FPS: 4,159 – Time: %s – Welcome to Madium, @%s!", timeStr, player.Name) task.wait(1) end end) local codePage = makePage("Code") local codeLeft = Instance.new("Frame") codeLeft.Size = UDim2.new(0.28, 0, 1, 0) codeLeft.BackgroundTransparency = 1 codeLeft.Parent = codePage local codeRight = Instance.new("Frame") codeRight.Size = UDim2.new(0.72, 0, 1, 0) codeRight.Position = UDim2.new(0.28, 0, 0, 0) codeRight.BackgroundTransparency = 1 codeRight.Parent = codePage local scriptsCard = Instance.new("Frame") scriptsCard.Size = UDim2.new(1, -10, 1, -10) scriptsCard.Position = UDim2.new(0, 10, 0, 10) scriptsCard.BackgroundColor3 = currentTheme.panel roundify(scriptsCard, 12) stroke(scriptsCard, currentTheme.stroke, 1) pad(scriptsCard, 10, 10, 10, 10) scriptsCard.Parent = codeLeft local scriptsTitle = makeText(scriptsCard, "Scripts", 15, true, currentTheme.text) scriptsTitle.Size = UDim2.new(1, 0, 0, 20) scriptsTitle.Position = UDim2.new(0, 0, 0, 0) local searchScripts = Instance.new("TextBox") searchScripts.Size = UDim2.new(1, 0, 0, 26) searchScripts.Position = UDim2.new(0, 0, 0, 26) searchScripts.BackgroundColor3 = currentTheme.panelSoft searchScripts.BorderSizePixel = 0 searchScripts.Font = Enum.Font.Gotham searchScripts.TextSize = 13 searchScripts.TextColor3 = currentTheme.text searchScripts.PlaceholderText = "Search open script tabs..." roundify(searchScripts, 6) stroke(searchScripts, currentTheme.stroke, 1) searchScripts.Parent = scriptsCard local openScripts = makeButton(scriptsCard, "Open Scripts...") openScripts.Size = UDim2.new(1, 0, 0, 26) openScripts.Position = UDim2.new(0, 0, 0, 60) local scriptsList = Instance.new("Frame") scriptsList.Size = UDim2.new(1, 0, 1, -96) scriptsList.Position = UDim2.new(0, 0, 0, 96) scriptsList.BackgroundTransparency = 1 scriptsList.Parent = scriptsCard local scriptsLayout = Instance.new("UIListLayout") scriptsLayout.FillDirection = Enum.FillDirection.Vertical scriptsLayout.Padding = UDim.new(0, 6) scriptsLayout.Parent = scriptsList local function addScriptEntry(name) local f = Instance.new("Frame") f.Size = UDim2.new(1, 0, 0, 26) f.BackgroundColor3 = currentTheme.panelSoft roundify(f, 6) stroke(f, currentTheme.stroke, 1) f.Parent = scriptsList local lbl = makeText(f, name, 13, false, currentTheme.text) lbl.Size = UDim2.new(1, -10, 1, 0) lbl.Position = UDim2.new(0, 8, 0, 0) end local editorCard = Instance.new("Frame") editorCard.Size = UDim2.new(1, -10, 1, -10) editorCard.Position = UDim2.new(0, 10, 0, 10) editorCard.BackgroundColor3 = currentTheme.panel roundify(editorCard, 12) stroke(editorCard, currentTheme.stroke, 1) pad(editorCard, 10, 10, 10, 10) editorCard.Parent = codeRight local topRow = Instance.new("Frame") topRow.Size = UDim2.new(1, 0, 0, 24) topRow.BackgroundTransparency = 1 topRow.Parent = editorCard local devLabel = makeText(topRow, player.Name .. " Developer", 13, true, currentTheme.accent) devLabel.Size = UDim2.new(0.5, 0, 1, 0) devLabel.Position = UDim2.new(0, 0, 0, 0) local devMode = makeText(topRow, "Developer Mode is enabled! You have access to more features.", 12, false, currentTheme.muted) devMode.Size = UDim2.new(0.5, 0, 1, 0) devMode.Position = UDim2.new(0.5, 0, 0, 0) devMode.TextXAlignment = Enum.TextXAlignment.Right local tabsBar = Instance.new("Frame") tabsBar.Size = UDim2.new(1, 0, 0, 26) tabsBar.Position = UDim2.new(0, 0, 0, 26) tabsBar.BackgroundColor3 = currentTheme.panelSoft roundify(tabsBar, 8) stroke(tabsBar, currentTheme.stroke, 1) pad(tabsBar, 6, 2, 6, 2) tabsBar.Parent = editorCard local tabLayout = Instance.new("UIListLayout") tabLayout.FillDirection = Enum.FillDirection.Horizontal tabLayout.VerticalAlignment = Enum.VerticalAlignment.Center tabLayout.Padding = UDim.new(0, 4) tabLayout.Parent = tabsBar local openTabs = {} local activeTab = nil local scriptBox = Instance.new("TextBox") scriptBox.Size = UDim2.new(1, 0, 1, -90) scriptBox.Position = UDim2.new(0, 0, 0, 56) scriptBox.BackgroundColor3 = currentTheme.bg scriptBox.BorderSizePixel = 0 scriptBox.Font = settings.editorFont scriptBox.TextSize = settings.editorFontSize scriptBox.TextColor3 = currentTheme.text scriptBox.TextXAlignment = Enum.TextXAlignment.Left scriptBox.TextYAlignment = Enum.TextYAlignment.Top scriptBox.MultiLine = true scriptBox.ClearTextOnFocus = false scriptBox.TextWrapped = settings.editorWordWrap scriptBox.Text = lastScript pad(scriptBox, 8, 8, 8, 8) roundify(scriptBox, 8) stroke(scriptBox, currentTheme.stroke, 1) scriptBox.Parent = editorCard local function makeEditorTab(name, content) local tab = Instance.new("Frame") tab.Size = UDim2.new(0, 120, 1, -4) tab.BackgroundColor3 = currentTheme.panel roundify(tab, 6) stroke(tab, currentTheme.stroke, 1) tab.Parent = tabsBar local lbl = makeText(tab, name, 13, false, currentTheme.text) lbl.Size = UDim2.new(1, -20, 1, 0) lbl.Position = UDim2.new(0, 8, 0, 0) local close = makeText(tab, "x", 13, true, currentTheme.muted) close.Size = UDim2.new(0, 16, 1, 0) close.Position = UDim2.new(1, -18, 0, 0) close.TextXAlignment = Enum.TextXAlignment.Center openTabs[name] = { frame = tab, label = lbl, content = content or "" } tab.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then activeTab = name scriptBox.Text = openTabs[name].content end end) close.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then tab:Destroy() openTabs[name] = nil if activeTab == name then local first = next(openTabs) if first then activeTab = first scriptBox.Text = openTabs[first].content else activeTab = nil scriptBox.Text = "" end end end end) return tab end local newTabBtn = makeButton(tabsBar, "+") newTabBtn.Size = UDim2.new(0, 30, 1, -4) newTabBtn.TextSize = 18 newTabBtn.TextColor3 = currentTheme.accent newTabBtn.MouseButton1Click:Connect(function() local idx = 1 while openTabs["Tab" .. idx] do idx += 1 end local name = "Tab" .. tostring(idx) makeEditorTab(name, "") activeTab = name scriptBox.Text = "" end) makeEditorTab("Welcome.txt", lastScript) activeTab = "Welcome.txt" addScriptEntry("Welcome.txt") scriptBox:GetPropertyChangedSignal("Text"):Connect(function() if activeTab and openTabs[activeTab] then openTabs[activeTab].content = scriptBox.Text end end) local bottomRow = Instance.new("Frame") bottomRow.Size = UDim2.new(1, 0, 0, 30) bottomRow.Position = UDim2.new(0, 0, 1, -30) bottomRow.BackgroundTransparency = 1 bottomRow.Parent = editorCard local execBtn = makeButton(bottomRow, "Execute") execBtn.Size = UDim2.new(0, 120, 1, 0) execBtn.Position = UDim2.new(1, -130, 0, 0) local clearBtn = makeButton(bottomRow, "Clear") clearBtn.Size = UDim2.new(0, 120, 1, 0) clearBtn.Position = UDim2.new(1, -260, 0, 0) local function setExecEnabled(enabled) execBtn.Active = enabled execBtn.Selectable = enabled execBtn.AutoButtonColor = enabled if enabled then execBtn.TextColor3 = Color3.fromRGB(20, 20, 20) execBtn.BackgroundColor3 = currentTheme.accent else execBtn.TextColor3 = Color3.fromRGB(120, 120, 120) execBtn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) end end setExecEnabled(false) local function startAttachAnimation() if attaching or injected then return end attaching = true injected = false setExecEnabled(false) attachedDot.BackgroundColor3 = currentTheme.accent local states = { "Attaching.", "Attaching..", "Attaching..." } local i = 1 local start = tick() while attaching and tick() - start < 4.31 do attachedLabel.Text = states[i] i = i % #states + 1 task.wait(0.25) end if not attaching then return end attaching = false injected = true attachedLabel.Text = "Attached – x" attachedDot.BackgroundColor3 = currentTheme.success setExecEnabled(true) end actInject.MouseButton1Click:Connect(function() if injected or attaching then return end startAttachAnimation() end) actLast.MouseButton1Click:Connect(function() if not injected then scriptBox.Text = "-- You must inject Madium before executing.\n" .. lastScript showPage("Code") return end scriptBox.Text = lastScript executeScript(lastScript) showPage("Code") end) execBtn.MouseButton1Click:Connect(function() if not injected then scriptBox.Text = "-- You must inject Madium before executing.\n" .. scriptBox.Text return end if settings.confirmExecute then print("[Madium] Confirming execute (stub).") end if settings.clearOnExecute then clearScript(scriptBox) end executeScript(scriptBox.Text) end) clearBtn.MouseButton1Click:Connect(function() clearScript(scriptBox) end) local searchPage = makePage("Search") local searchCard = Instance.new("Frame") searchCard.Size = UDim2.new(1, -10, 1, -10) searchCard.Position = UDim2.new(0, 10, 0, 10) searchCard.BackgroundColor3 = currentTheme.panel roundify(searchCard, 12) stroke(searchCard, currentTheme.stroke, 1) pad(searchCard, 10, 10, 10, 10) searchCard.Parent = searchPage local searchTitle = makeText(searchCard, "Fetch a ScriptBlox script", 15, true, currentTheme.accent) searchTitle.Size = UDim2.new(1, 0, 0, 20) searchTitle.Position = UDim2.new(0, 0, 0, 0) local searchBox = Instance.new("TextBox") searchBox.Size = UDim2.new(0, 320, 0, 28) searchBox.Position = UDim2.new(0, 0, 0, 28) searchBox.BackgroundColor3 = currentTheme.panelSoft searchBox.BorderSizePixel = 0 searchBox.Font = Enum.Font.Gotham searchBox.TextSize = 13 searchBox.TextColor3 = currentTheme.text searchBox.PlaceholderText = "Enter ScriptBlox script ID or slug..." roundify(searchBox, 6) stroke(searchBox, currentTheme.stroke, 1) searchBox.Parent = searchCard local searchBtn = makeButton(searchCard, "Fetch") searchBtn.Size = UDim2.new(0, 90, 0, 28) searchBtn.Position = UDim2.new(0, 330, 0, 28) local powered = makeText(searchCard, "Powered by ScriptBlox.com", 12, false, currentTheme.muted) powered.Size = UDim2.new(0, 220, 0, 20) powered.Position = UDim2.new(1, -230, 0, 32) powered.TextXAlignment = Enum.TextXAlignment.Right local resultHolder = Instance.new("Frame") resultHolder.Size = UDim2.new(1, 0, 1, -70) resultHolder.Position = UDim2.new(0, 0, 0, 60) resultHolder.BackgroundTransparency = 1 resultHolder.Parent = searchCard local currentResultCard local function clearResultCard() if currentResultCard then currentResultCard:Destroy() currentResultCard = nil end end local function createResultCard(data, scriptId) clearResultCard() local card = Instance.new("Frame") card.Size = UDim2.new(1, -10, 0, 120) card.Position = UDim2.new(0, 5, 0, 0) card.BackgroundColor3 = currentTheme.panelSoft roundify(card, 10) stroke(card, currentTheme.stroke, 1) pad(card, 10, 8, 10, 8) card.Parent = resultHolder currentResultCard = card local titleLbl = makeText(card, data.title or "Unknown Script", 15, true, currentTheme.text) titleLbl.Size = UDim2.new(1, 0, 0, 20) titleLbl.Position = UDim2.new(0, 0, 0, 0) local metaText = string.format("Views: %s | By: %s", tostring(data.views or "?"), tostring(data.owner and data.owner.username or "?")) local meta = makeText(card, metaText, 12, false, currentTheme.muted) meta.Size = UDim2.new(1, 0, 0, 18) meta.Position = UDim2.new(0, 0, 0, 22) local features = makeText(card, data.features or "", 12, false, currentTheme.muted) features.Size = UDim2.new(1, 0, 0, 18) features.Position = UDim2.new(0, 0, 0, 42) local openBtn = makeButton(card, "Open in new tab") openBtn.Size = UDim2.new(0, 130, 0, 26) openBtn.Position = UDim2.new(1, -140, 1, -30) local execDirectBtn = makeButton(card, "Execute") execDirectBtn.Size = UDim2.new(0, 100, 0, 26) execDirectBtn.Position = UDim2.new(1, -250, 1, -30) openBtn.MouseButton1Click:Connect(function() local raw = ScriptBlox.GetRaw(scriptId) if not raw then scriptBox.Text = "-- Failed to fetch script from ScriptBlox.\n-- Check HTTP settings." showPage("Code") return end local name = data.title or scriptId if openTabs[name] then activeTab = name scriptBox.Text = openTabs[name].content else makeEditorTab(name, raw) addScriptEntry(name) activeTab = name scriptBox.Text = raw end showPage("Code") end) execDirectBtn.MouseButton1Click:Connect(function() local raw = ScriptBlox.GetRaw(scriptId) if not raw then scriptBox.Text = "-- Failed to fetch script from ScriptBlox.\n-- Check HTTP settings." showPage("Code") return end if not injected then scriptBox.Text = "-- You must inject Madium before executing.\n\n" .. raw showPage("Code") return end scriptBox.Text = raw executeScript(raw) showPage("Code") end) end searchBtn.MouseButton1Click:Connect(function() local id = searchBox.Text if id == "" then return end clearResultCard() local details = ScriptBlox.GetDetails(id) if not details then scriptBox.Text = "-- ScriptBlox fetch failed.\n-- Check HTTP settings or script identifier." showPage("Code") return end createResultCard(details, id) end) local settingsPage = makePage("Settings") local settingsCard = Instance.new("Frame") settingsCard.Size = UDim2.new(1, -10, 1, -10) settingsCard.Position = UDim2.new(0, 10, 0, 10) settingsCard.BackgroundColor3 = currentTheme.panel roundify(settingsCard, 12) stroke(settingsCard, currentTheme.stroke, 1) pad(settingsCard, 10, 10, 10, 10) settingsCard.Parent = settingsPage local settingsTitle = makeText(settingsCard, "Settings - Madium Preferences", 15, true, currentTheme.accent) settingsTitle.Size = UDim2.new(1, 0, 0, 20) settingsTitle.Position = UDim2.new(0, 0, 0, 0) local settingsNav = Instance.new("Frame") settingsNav.Size = UDim2.new(0, 160, 1, -30) settingsNav.Position = UDim2.new(0, 0, 0, 30) settingsNav.BackgroundColor3 = currentTheme.panelSoft roundify(settingsNav, 10) stroke(settingsNav, currentTheme.stroke, 1) pad(settingsNav, 6, 6, 6, 6) settingsNav.Parent = settingsCard local settingsNavLayout = Instance.new("UIListLayout") settingsNavLayout.FillDirection = Enum.FillDirection.Vertical settingsNavLayout.Padding = UDim.new(0, 4) settingsNavLayout.Parent = settingsNav local settingsContent = Instance.new("Frame") settingsContent.Size = UDim2.new(1, -180, 1, -30) settingsContent.Position = UDim2.new(0, 170, 0, 30) settingsContent.BackgroundColor3 = currentTheme.panelSoft roundify(settingsContent, 10) stroke(settingsContent, currentTheme.stroke, 1) pad(settingsContent, 10, 10, 10, 10) settingsContent.Parent = settingsCard local settingsPages = {} local currentSettingsPage local function makeSettingsPage(name) local f = Instance.new("Frame") f.Name = name .. "SettingsPage" f.Size = UDim2.new(1, 0, 1, 0) f.BackgroundTransparency = 1 f.Visible = false f.Parent = settingsContent settingsPages[name] = f return f end local function showSettingsPage(name) for n, p in pairs(settingsPages) do p.Visible = (n == name) end currentSettingsPage = name end local function makeSettingsNavButton(name) local btn = makeButton(settingsNav, name) btn.Size = UDim2.new(1, 0, 0, 26) btn.MouseButton1Click:Connect(function() showSettingsPage(name) end) return btn end makeSettingsNavButton("General") makeSettingsNavButton("Themes") makeSettingsNavButton("Editor") makeSettingsNavButton("Execution") makeSettingsNavButton("ScriptBlox") makeSettingsNavButton("Window") makeSettingsNavButton("Security") makeSettingsNavButton("Developer") local generalPage = makeSettingsPage("General") local generalLayout = Instance.new("UIListLayout") generalLayout.FillDirection = Enum.FillDirection.Vertical generalLayout.Padding = UDim.new(0, 6) generalLayout.Parent = generalPage makeToggle(generalPage, "Auto Inject on Startup", settings.autoInject, function(v) settings.autoInject = v end) makeToggle(generalPage, "Auto Execute Last Script", settings.autoExecuteLast, function(v) settings.autoExecuteLast = v end) makeToggle(generalPage, "Queue on Teleport", settings.queueOnTeleport, function(v) settings.queueOnTeleport = v end) local themesPage = makeSettingsPage("Themes") local themesLayout = Instance.new("UIListLayout") themesLayout.FillDirection = Enum.FillDirection.Vertical themesLayout.Padding = UDim.new(0, 6) themesLayout.Parent = themesPage local function applyTheme(t) currentTheme = t main.BackgroundColor3 = currentTheme.bg title.TextColor3 = currentTheme.accent subtitle.TextColor3 = currentTheme.muted searchCard.BackgroundColor3 = currentTheme.panel settingsCard.BackgroundColor3 = currentTheme.panel infoCard.BackgroundColor3 = currentTheme.panel quickCard.BackgroundColor3 = currentTheme.panel socialCard.BackgroundColor3 = currentTheme.panel scriptsCard.BackgroundColor3 = currentTheme.panel editorCard.BackgroundColor3 = currentTheme.panel tabsBar.BackgroundColor3 = currentTheme.panelSoft searchCard.BackgroundColor3 = currentTheme.panel settingsContent.BackgroundColor3 = currentTheme.panelSoft settingsNav.BackgroundColor3 = currentTheme.panelSoft end for name, t in pairs(themes) do local b = makeButton(themesPage, name) b.Size = UDim2.new(1, 0, 0, 26) b.MouseButton1Click:Connect(function() applyTheme(t) end) end local editorPage = makeSettingsPage("Editor") local editorLayout = Instance.new("UIListLayout") editorLayout.FillDirection = Enum.FillDirection.Vertical editorLayout.Padding = UDim.new(0, 6) editorLayout.Parent = editorPage makeSlider(editorPage, "Font Size", 10, 24, settings.editorFontSize, function(v) settings.editorFontSize = v scriptBox.TextSize = v end) makeToggle(editorPage, "Word Wrap", settings.editorWordWrap, function(v) settings.editorWordWrap = v scriptBox.TextWrapped = v end) makeToggle(editorPage, "Auto Indent (visual only)", settings.editorAutoIndent, function(v) settings.editorAutoIndent = v end) local execPage = makeSettingsPage("Execution") local execLayout = Instance.new("UIListLayout") execLayout.FillDirection = Enum.FillDirection.Vertical execLayout.Padding = UDim.new(0, 6) execLayout.Parent = execPage makeToggle(execPage, "Sandbox Mode (visual only)", settings.sandboxMode, function(v) settings.sandboxMode = v end) makeToggle(execPage, "Clear Editor on Execute", settings.clearOnExecute, function(v) settings.clearOnExecute = v end) makeToggle(execPage, "Confirm Before Execute (stub)", settings.confirmExecute, function(v) settings.confirmExecute = v end) local sbPage = makeSettingsPage("ScriptBlox") local sbLayout = Instance.new("UIListLayout") sbLayout.FillDirection = Enum.FillDirection.Vertical sbLayout.Padding = UDim.new(0, 6) sbLayout.Parent = sbPage makeToggle(sbPage, "Auto Open in New Tab", settings.scriptbloxAutoOpenTab, function(v) settings.scriptbloxAutoOpenTab = v end) makeToggle(sbPage, "Safe Mode (visual only)", settings.scriptbloxSafeMode, function(v) settings.scriptbloxSafeMode = v end) local windowPage = makeSettingsPage("Window") local windowLayout = Instance.new("UIListLayout") windowLayout.FillDirection = Enum.FillDirection.Vertical windowLayout.Padding = UDim.new(0, 6) windowLayout.Parent = windowPage makeToggle(windowPage, "Top-Most (visual only)", settings.windowTopMost, function(v) settings.windowTopMost = v end) makeToggle(windowPage, "Animations", settings.windowAnimations, function(v) settings.windowAnimations = v end) makeSlider(windowPage, "UI Scale", 80, 140, math.floor(settings.uiScale * 100), function(v) settings.uiScale = v / 100 uiScale.Scale = settings.uiScale end) makeSlider(windowPage, "Transparency", 0, 50, settings.transparency * 100, function(v) settings.transparency = v / 100 main.BackgroundTransparency = settings.transparency end) local secPage = makeSettingsPage("Security") local secLayout = Instance.new("UIListLayout") secLayout.FillDirection = Enum.FillDirection.Vertical secLayout.Padding = UDim.new(0, 6) secLayout.Parent = secPage makeToggle(secPage, "Confirm Before Execute", settings.confirmExecute, function(v) settings.confirmExecute = v end) local devPage = makeSettingsPage("Developer") local devLayout = Instance.new("UIListLayout") devLayout.FillDirection = Enum.FillDirection.Vertical devLayout.Padding = UDim.new(0, 6) devLayout.Parent = devPage makeToggle(devPage, "Show Internal Logs", settings.showInternalLogs, function(v) settings.showInternalLogs = v end) makeToggle(devPage, "Show Execution Time", settings.showExecTime, function(v) settings.showExecTime = v end) homeTab.MouseButton1Click:Connect(function() showPage("Home") end) codeTab.MouseButton1Click:Connect(function() showPage("Code") end) searchTab.MouseButton1Click:Connect(function() showPage("Search") end) settingsTab.MouseButton1Click:Connect(function() showPage("Settings") end) showPage("Home") showSettingsPage("General") if settings.autoInject then startAttachAnimation() end if settings.autoExecuteLast and lastScript and lastScript ~= "" then if injected then executeScript(lastScript) end end