Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- screen = peripheral.wrap("top")
- mod = peripheral.wrap("bottom")
- xM, yM = screen.getSize()
- print("Screen size:"..xM,yM)
- mod.open(2)
- function show(color)
- screen.clear()
- screen.setBackgroundColor(color)
- screen.setCursorPos(3,6)
- screen.write("Kill")
- end
- while true do
- show(colors.green)
- ev, side, x, y = os.pullEvent("monitor_touch")
- if 1 < x and x < xM and 1 < y and y < yM then
- show(colors.red)
- mod.transmit(2,2, "top")
- sleep(0.25)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement