local function center(monitor, text)
  local x, y = monitor.getSize()
  monitor.setCursorPos((x-text:len())/2+1, (y-1)/2+1)
end 
redstone.setOutput("bottom", false)
m = peripheral.wrap("top")
m.setTextScale(1)
m.clear()
m.setCursorPos(1, 1)
m.write("Right click to begin")
os.pullEvent("monitor_touch")
m.setTextScale(4)
m.clear()
m.setTextColor(colors.yellow)
for i = 5, 1, -1 do
  local text = string.format("%i", i)
  center(m, text)
  m.write(text)
  os.sleep(1)
end
m.clear()
center(m, "GO!")
m.setTextColor(colors.green)
m.write("GO!")
os.sleep(.5)
redstone.setOutput("bottom", true)
