SHARE
TWEET

Welcomew

a guest Jul 16th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top