Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("monitor_2") --Find monitor
- local xPos = 0 --Set up X-Pos
- local yPos = 0 -- Set up Y-Pos
- --Set up Monitor for program
- mon.setBackgroundColor(colors.black)
- mon.clear()
- mon.setTextScale(.5)
- mon.setTextColor(colors.white)
- mon.setCursorPos(1, 1)
- --Empty Smeltery code
- mon.write("Empty Smeltery")
- while true do
- event, side, xPos, yPos = os.pullEvent(monitor_touch)
- if xPos >= 1 and xPos <= 14 and yPos == 1 then --Test for touch
- redstone.setBundledOutput("top", colors.white) --Send Redstone
- -- Set up monitor for next screen
- mon.clear()
- mon.setTextColor(colors.red)
- mon.setCursorPos(10,20)
- mon.write("Touch anywhere to continue.")
- os.sleep(2) --Pause to avoid double-tap
- if event == monitor_touch then --Test for touch anywhere
- redstone.setBundledOutput("top", 0) --Stop Redstone
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement