Advertisement
kirkarr

Bartender

Apr 6th, 2023
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. while true do
  2. local monitor = peripheral.find("monitor")
  3. local sx,sy = monitor.getSize()
  4. local drinks = ["Apple","Coffee","Coffee with milk","Strawberry iced coffee"]
  5. local eventData = {os.pullEvent()}
  6. local event = eventData[1]
  7.  
  8. if event == "monitor_touch" then
  9. print("Monitor was clicked at", eventData[4]," ", eventData[3])
  10. elseif event == "key" then
  11. print("Key code", eventData[2], "was pressed")
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement