h = 0
m = 45
s = 0
side = "back"
endmsg = "Time Is Up!"
someline = "Super Wrench"
timerend = false
wait = 60
local t = peripheral.wrap(side)
 
function check()
 
if s <= 0 then
  m = m -1
  s = 60
end
 
if m < 0 then
  h = h-1
  m = 60
end
 
if h < 0 then
  t.setTextScale(5)
  t.clear()
  t.setCursorPos(3,3)
  t.write(endmsg)
  redstone.setOutput("top", true)
  sleep(1)
  redstone.setOutput("top", false)
  sleep(wait)
  timerend = true
 end
end
rs.setOutput("top", true)
sleep(1)
rs.setOutput("top", false)
while true do
t.clear()
t.setBackgroundColor(colors.yellow)
t.setTextScale(5)
t.setCursorPos(2,2)
t.write(someline)
--t.setTextScale(5)
t.setCursorPos(2,3.5)
t.write(h..":"..m..":"..s.." Left")
sleep(1)
s = s-1
check()
if timerend == true then
os.reboot()
end
end
