RazzaJava

CraftOs 1.6 Clock from YT (comments "--" must be deleted)

Jun 23rd, 2022 (edited)
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. local time = os.time()
  2. local day = os.day()
  3. local year = day/365
  4. local dayfinal = day % 365
  5. -- set "bottom" to whatever side you want the monitor attached to (remember don't type this in it's just tips :P)
  6. monitor01 = peripheral.wrap("bottom")
  7. --set v this v to whetever you want 3.4 is nice for a 1 tall by 4 long monitor setup
  8. monitor01.setTextScale(3.4)
  9.  
  10. while true do
  11.     monitor01.clear()
  12.     monitor01.setCursorPos(12,1)
  13.     time = os.time()
  14.     day = os.day()
  15.     monitor01.write(textutils.formatTime(time))
  16.     monitor01.setCursorPos(8,2)
  17.     monitor01.write("Year:")
  18.     monitor01.write(tostring(math.floor(year)))
  19.     monitor01.write(" Day:")
  20.     monitor01.write(tostring(dayfinal))
  21.     sleep(1)
  22. end
Add Comment
Please, Sign In to add comment