-- Compiled with roblox-ts v3.0.0 local TS = _G[script] local CenturionType = TS.import(script, TS.getModule(script, "@rbxts", "centurion").out).CenturionType local Players = TS.import(script, TS.getModule(script, "@rbxts", "services")).Players local mount = TS.import(script, TS.getModule(script, "@rbxts", "vide").src).mount local DEFAULT_INTERFACE_OPTIONS = TS.import(script, script.Parent, "constants", "options").DEFAULT_INTERFACE_OPTIONS local DefaultPalette = TS.import(script, script.Parent, "palette").DefaultPalette local _store = TS.import(script, script.Parent, "store") local uiOptions = _store.options local uiVisible = _store.visible local CenturionApp = TS.import(script, script, "centurion-app").CenturionApp local CenturionUI = {} do local _container = CenturionUI --[[ * * Returns whether the terminal UI is visible. * * @returns Whether the terminal UI is visible. ]] local function isVisible() return uiVisible() end _container.isVisible = isVisible --[[ * * Sets the visibility of the terminal UI. * * @param visible Whether the terminal UI should be visible. ]] local function setVisible(visible) uiVisible(visible) end _container.setVisible = setVisible --[[ * * Updates the terminal UI options. * * @param options The options to update. ]] local function updateOptions(options) local _object = table.clone(DEFAULT_INTERFACE_OPTIONS) setmetatable(_object, nil) for _k, _v in uiOptions() do _object[_k] = _v end for _k, _v in options do _object[_k] = _v end uiOptions(_object) end _container.updateOptions = updateOptions --[[ * * Mounts the terminal UI. * * If `registerBuiltInCommands` is **true** (default), client commands * will be registered. * * @param client The Centurion client. * @param options The terminal UI options. ]] local registerCommands local function start(client, options) if options == nil then options = {} end if client.config.registerBuiltInCommands then registerCommands(client.registry) end updateOptions(options) mount(function() return CenturionApp(client) end, Players.LocalPlayer:WaitForChild("PlayerGui")) end _container.start = start function registerCommands(registry) registry:registerCommand({ name = "theme", description = "Change the terminal's theme", arguments = { { name = "name", description = "The name of the theme", type = CenturionType.String, suggestions = { "mocha", "macchiato", "frappe", "latte" }, } }, }, function(ctx, theme) if not (DefaultPalette[theme] ~= nil) then ctx:error("Invalid theme") return nil end updateOptions({ palette = DefaultPalette[theme], }) ctx:reply(`Set theme to '{theme}'`) end, { "centurion" }) end end return { CenturionUI = CenturionUI, }