Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("front")
- mon.clear()
- mon.setTextScale(1.5)
- mon.setCursorPos(2,1)
- mon.write("Cobblestone")
- mon.setCursorPos(2,3)
- mon.write("Stone")
- mon.setCursorPos (2,5)
- mon.write("Sand")
- mon.setCursorPos(2,7)
- mon.write("Silicon")
- mon.setCursorPos(2,9)
- mon.write("Glass")
- while true do
- event,side,x,y = os.pullEvent("monitor_touch")
- if x > 1 and x < 13 and y == 1 and rs.getOutput("left") == false then
- rs.setOutput("left",true)
- mon.setCursorPos(2,1)
- mon.clearLine()
- mon.blit("Cobblestone","00000000000","ddddddddddd")
- elseif x > 1 and x < 13 and y == 1 and rs.getOutput("left") == true then
- rs.setOutput("left",false)
- mon.setCursorPos(2,1)
- mon.clearLine()
- mon.write("Cobblestone")
- elseif x > 1 and x < 13 and y == 3 and rs.getOutput("right") == false then
- rs.setOutput("right",true)
- mon.setCursorPos(2,3)
- mon.clearLine()
- mon.blit("Stone ","00000000000","ddddddddddd")
- elseif x > 1 and x < 13 and y == 3 and rs.getOutput("right") == true then
- rs.setOutput("right",false)
- mon.setCursorPos(2,3)
- mon.clearLine()
- mon.write("Stone")
- elseif x > 1 and x < 13 and y == 5 and rs.getOutput("bottom") == false then
- rs.setOutput("bottom",true)
- mon.setCursorPos(2,5)
- mon.clearLine()
- mon.blit("Sand ","00000000000","ddddddddddd")
- elseif x > 1 and x < 13 and y == 5 and rs.getOutput("bottom") == true then
- rs.setOutput("bottom",false)
- mon.setCursorPos(2,5)
- mon.clearLine()
- mon.write("Sand")
- elseif x > 1 and x < 13 and y == 7 and rs.getOutput("back") == false then
- rs.setOutput("back",true)
- mon.setCursorPos(2,7)
- mon.clearLine()
- mon.blit("Silicon ","00000000000","ddddddddddd")
- elseif x > 1 and x < 13 and y == 7 and rs.getOutput("back") == true then
- rs.setOutput("back",false)
- mon.setCursorPos(2,7)
- mon.clearLine()
- mon.write("Silicon")
- elseif x > 1 and x < 13 and y == 9 and rs.getOutput("front") == false then
- rs.setOutput("front",true)
- mon.setCursorPos(2,9)
- mon.clearLine()
- mon.blit("Glass ","00000000000","ddddddddddd")
- elseif x > 1 and x < 13 and y == 9 and rs.getOutput("front") == true then
- rs.setOutput("front",false)
- mon.setCursorPos(2,9)
- mon.clearLine()
- mon.write("Glass")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement