Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- # Reboot Program for CC:Tweaked # --
- -- # IMPORTANT: Name this program restart
- local mon = peripheral.find("monitor")
- local monX, monY = mon.getSize()
- local termX, termY = term.getSize()
- mon.setTextScale(1)
- local title = "Restart"
- local len = string.len(title)
- mon.setBackgroundColor(colors.blue)
- term.setBackgroundColor(colors.blue)
- term.clear()
- mon.clear()
- mon.setCursorPos((monX - len+1) / 2, monY/2)
- term.setCursorPos((termX - len+1) / 2, monY/2)
- mon.write(title)
- term.write(title)
- os.sleep(1)
- mon.write(".")
- term.write(".")
- os.sleep(1)
- mon.write(".")
- term.write(".")
- os.sleep(1)
- mon.write(".")
- term.write(".")
- os.sleep(1)
- mon.setBackgroundColor(colors.black)
- mon.clear()
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement