Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- # Startup Program for CC:Tweaked # --
- -- # Name the program startup to function properly
- -- # Version: 1.0
- local mon = peripheral.find("monitor")
- local monX, monY = mon.getSize()
- local termX, termY = term.getSize()
- mon.setTextScale(1)
- local title = "Starting... Please wait!"
- local len = string.len(title)
- term.redirect(mon)
- mon.setBackgroundColor(colors.lightBlue)
- mon.clear()
- mon.setCursorPos((monX - len+1) / 2, monY/2)
- mon.write(title)
- os.sleep(3)
- mon.setBackgroundColor(colors.black)
- mon.clear()
- local title = "Virus Industries"
- local len = string.len(title)
- mon.setCursorPos((monX - len+1) / 2, (monY/4))
- mon.setTextColor(colors.green)
- mon.write(title)
- mon.setTextColor(colors.white)
- local title = "Loading OS"
- local len = string.len(title)
- mon.setCursorPos((monX - len+1)/2,(monY/8)*4)
- mon.write(title)
- paintutils.drawBox(3,(monY/8)*6,monX-3,(monY/8)*7,colors.white)
- local barLength = monX-7
- mon.setCursorPos(4,(monY/16)*13)
- mon.setBackgroundColor(colors.red)
- for i=1,barLength do
- mon.write(" ")
- os.sleep(0.1)
- end
- os.sleep(1)
- mon.setBackgroundColor(colors.black)
- mon.clear()
- if fs.exists("program") then
- local title = "Loading program.lua"
- local len = string.len(title)
- mon.setCursorPos((monX-len+1)/2,3)
- mon.write(title)
- os.sleep(3)
- shell.run("program")
- else
- local title1 = "No program.lua found."
- local len1 = string.len(title1)
- local title2 = "Proceeding normal procedure"
- local len2 = string.len(title2)
- mon.setCursorPos((monX-len1+1)/2, 6)
- mon.write(title1)
- mon.setCursorPos((monX-len2+1)/2, 8)
- mon.write(title2)
- end
- os.sleep(1)
- mon.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement