
function PrintCentered(text)
    local w, h = term.getSize()
    x = math.max(math.ceil((w / 2) - (#text / 2)), 0)
    y = math.max(math.ceil((h / 2)), 0)
    term.setCursorPos(x, y)
    print(text)
end

term.setBackgroundColor(colors.lightBlue)
term.setTextColor(colors.white)
term.clear()

PrintCentered("Restoring CraftOS...")
sleep(1)
OSSettings['boot_arg'] = "craftos"
OSTableIO.save(OSSettings, "Settings")
os.reboot()