Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("right")
- p = peripheral.wrap("left")
- function pulse()
- redstone.setOutput("left", true)
- sleep(2)
- redstone.setOutput("left", false)
- end
- function trains()
- mon.setTextColor(colors.white)
- mon.setCursorPos(2,5)
- mon.write("TRAIN 1 - Water")
- mon.setCursorPos(2,6)
- mon.write("TRAIN 2 - Oil")
- mon.setCursorPos(2,7)
- mon.write("TRAIN 3 -")
- mon.setCursorPos(2,8)
- mon.write("TRAIN 4 -")
- mon.setCursorPos(2,9)
- mon.write("TRAIN 5 -")
- mon.setCursorPos(2,10)
- mon.write("TRAIN 6 -")
- mon.setCursorPos(2,11)
- mon.write("TRAIN 7 -")
- mon.setCursorPos(2,12)
- mon.write("TRAIN 8 -")
- end
- function stop1()
- p.setFreq(100)
- mon.setTextColor(colors.red)
- mon.setCursorPos(22,5)
- mon.write("CANCELLED")
- mon.setCursorPos(22,6)
- mon.write("CANCELLED")
- mon.setCursorPos(22,7)
- mon.write("CANCELLED")
- mon.setCursorPos(22,8)
- mon.write("CANCELLED")
- mon.setCursorPos(22,9)
- mon.write("CANCELLED")
- mon.setCursorPos(22,10)
- mon.write("CANCELLED")
- mon.setCursorPos(22,11)
- mon.write("CANCELLED")
- mon.setCursorPos(22,12)
- mon.write("CANCELLED")
- end
- function start1()
- mon.setTextColor(colors.green)
- mon.setCursorPos(22,12)
- mon.write("DEPARTING")
- p.setFreq(108)
- pulse()
- sleep(2)
- mon.setCursorPos(22,11)
- mon.write("DEPARTING")
- p.setFreq(107)
- pulse()
- sleep(2)
- mon.setCursorPos(22,10)
- mon.write("DEPARTING")
- p.setFreq(106)
- pulse()
- sleep(2)
- mon.setCursorPos(22,9)
- mon.write("DEPARTING")
- p.setFreq(105)
- pulse()
- sleep(2)
- mon.setCursorPos(22,8)
- mon.write("DEPARTING")
- p.setFreq(104)
- pulse()
- sleep(2)
- mon.setCursorPos(22,7)
- mon.write("DEPARTING")
- p.setFreq(103)
- pulse()
- sleep(2)
- mon.setCursorPos(22,6)
- mon.write("DEPARTING")
- p.setFreq(102)
- pulse()
- sleep(2)
- mon.setCursorPos(22,5)
- mon.write("DEPARTING")
- p.setFreq(101)
- pulse()
- end
- while true do
- local event = os.pullEvent("redstone")
- local Red=rs.getInput("back")
- if Red then
- mon.clear()
- mon.setCursorPos(2,2)
- mon.setTextColor(colors.white)
- mon.write("TRAIN STATION")
- mon.setCursorPos(2,3)
- mon.setTextColor(colors.green)
- mon.write("ZONE CLEAR. RESUMING DEPARTURES. ")
- trains()
- start1()
- sleep(0.4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment