Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[> Copyright XenusSoft 2020 <]]--
- --[[> Use of file is allowed. <]]--
- local isRunning = true
- local function runRecovery()
- shell.run("/disk/bootloader/recovery")
- isRunning = false
- end
- parallel.waitForAny(
- function()
- --< code here >--
- sleep(8) -- remove this, just for show
- end,
- function()
- local title = "Booting CraftOS..." -- Change title to what you prefer for the bootup.
- local w, h = term.getSize()
- local wm, hm = w / 2, h / 2
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(1)
- while isRunning do
- for i = 1, 2 do
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.lightGray)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(0.025)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.gray)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(0.025)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.lightGray)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(0.025)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(0.025)
- end
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- term.clear()
- term.setCursorPos(wm - (#title / 2), hm)
- term.write(title)
- sleep(2)
- end
- end
- )
- term.clear()
- term.setTextColor(colors.white)
- term.setCursorPos(1, 1)
- -- Listen for the Enter key press
- while isRunning do
- local event, key = os.pullEvent("key")
- if event == "key" and key == keys.enter then
- runRecovery()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement