Advertisement
Guest User

restart2

a guest
Dec 8th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. mon = peripheral.wrap("right")
  2. term.redirect(peripheral.wrap("right"))
  3. mon.setTextScale(3.4)
  4.  
  5. h = 0
  6. m = 0
  7. s = -1
  8.  
  9. while h <= 2 do
  10.   mon.setCursorPos(2,2)
  11.   sleep(1)
  12.   mon.clear()
  13.   s = s + 1
  14.  
  15.   if s == 60 then
  16.     m = m + 1
  17.     s = 0
  18.   end
  19.  
  20.   if m == 60 then
  21.     h = h + 1
  22.     m = 0
  23.   end
  24.  
  25.   if m < 10 and s < 10 then
  26.     print("0",h,":0",m,":0",s)
  27.  
  28.   elseif m >=10 and s < 10 then
  29.     print("0",h,":",m,":0",s)
  30.    
  31.   elseif m <10 and s >=10 then
  32.     print("0",h,":0",m,":",s)
  33.    
  34.   elseif m >=10 and s>=10 then
  35.     print("0",h,":",m,":",s)
  36.  
  37.  
  38.   end
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement