Advertisement
Guest User

startup

a guest
Sep 19th, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2.  
  3. while true do
  4.  mon.setBackgroundColour((colours.black))
  5.  mon.clear()
  6.  mon.setCursorPos(1,3)
  7.  mon.setBackgroundColour((colours.lime))
  8.  mon.write("Get Key")
  9.  event, side, x, y = os.pullEvent("monitor_touch")
  10.  if x > 1 and x < 7 and y == 3 then
  11.  mon.setBackgroundColour((colours.black))
  12.  mon.clear()
  13.  mon.setCursorPos(1,3)
  14.  mon.setBackgroundColour((colours.red))
  15.  mon.write("Get Key")
  16.  rs.setOutput("bottom", true)
  17.  sleep(1)
  18.  rs.setOutput("bottom", false)
  19.  end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement