Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- h = 0
- m = 0
- s = 30
- mon = peripheral.wrap("front")
- function Depart()
- if h ==0 and m == 0 and s == 0 then
- term.clear()
- term.setCursorPos(1,1)
- redstone.setOutput("left", true)
- print("Train is Departing")
- sleep(5)
- term.clear()
- term.setCursorPos(1,1)
- redstone.setOutput("left", false)
- print("Waiting for the next Train")
- sleep(66)
- h = 0
- m = 9
- s = 59
- end
- end
- function Check()
- if s <= -1 then
- m = m -1
- s = 59
- end
- if m < 0 then
- h = h -1
- m = 60
- end
- if redstone.getInput("right", true) then
- h = 0
- m = 0
- s = 0
- end
- Depart()
- end
- while true do
- term.redirect(peripheral.wrap("front"))
- mon.setTextScale(4)
- term.clear()
- term.setCursorPos(1,1)
- print("Train Will Depart In:")
- mon.setCursorPos(6,4)
- print(m..":"..s)
- sleep(1)
- s = s-1
- Check()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement