Advertisement
Guest User

Welcomew

a guest
Jul 16th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. monitor = peripheral.wrap("right") -- Moved the initialization out of the loop
  2. monitor.setTextScale(5)
  3. monitor.setTextColour(16384)
  4.  
  5. repeat  
  6.   term.clear()  -- Moved to start of loop to handle case where cursor is somewhere weird to begin with
  7.   term.setCursorPos( 1, 1 )
  8.   local nTime = os.time()
  9.   print( "The time is "..textutils.formatTime( nTime, false ) )
  10.     print()
  11.   if nTime < 18 and nTime > 6 then
  12.         print("Have a good day at Trivnab Enterprises!")
  13.   else
  14.         print("Have a good night at Trivnab Enterprises!")
  15.   end
  16.  
  17.   sleep(1)
  18.  
  19. until nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement