uepyon

clock.lua

Feb 16th, 2024
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | Gaming | 0 0
  1. mon = peripheral.wrap("left")
  2.  
  3. mon.clear()
  4. mon.setTextScale(2)
  5.  
  6. while true do
  7. time = os.time()
  8. time_str = textutils.formatTime(time)
  9.  
  10. if time > 6 and time < 18.5 then
  11. mon.setTextColor(colors.yellow)
  12. else
  13. mon.setTextColor(colors.blue)
  14. end
  15.  
  16. mon.setCursorPos(1,1)
  17. mon.clearLine()
  18. mon.write(time_str)
  19.  
  20. sleep(1)
  21. end
  22.  
Tags: ccTweaked
Add Comment
Please, Sign In to add comment