Darknio

Tinker mit uhr

May 6th, 2025 (edited)
3,929
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. mon1 = peripheral.wrap("back")
  2. local status = "Off"
  3. local side =  "left"
  4. function Time()
  5.     mon1.clear()
  6.     mon1.setCursorPos(1,1)
  7.     mon1.write(textutils.formatTime(os.time(),true))
  8.     mon1.setCursorPos(1,2)
  9.     mon1.write("Tag ")
  10.     mon1.write(textutils.serialize(os.day()),number)
  11.     mon1.setCursorPos(1,3)
  12.     mon1.write(status)
  13. end
  14.  
  15.  
  16. while true doTime()  
  17.  
  18.     if redstone.getInput(side) then
  19.         status = "ON"
  20.         redstone.setOutput("bottom", true)
  21.         sleep(1)
  22.         redstone.setOutput("bottom", false)
  23.  
  24.         else
  25.             status = "Off"   
  26.             sleep(1)
  27.     end
  28. end
Advertisement