Advertisement
Guest User

getclick

a guest
Apr 26th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. peripheral.call("back","clear")
  2. peripheral.call("back","setCursorPos",10,1)
  3. peripheral.call("back","write","Lethal Inc.")
  4. peripheral.call("back","setCursorPos",9,6)
  5. peripheral.call("back","write","Farms")
  6. peripheral.call("back","setCursorPos",17,6)
  7. peripheral.call("back","write","Power")
  8.  
  9. peripheral.call("back","setCursorPos",9,8)
  10. peripheral.call("back","write","Storage")
  11. peripheral.call("back","setCursorPos",1,9)
  12. peripheral.call("back","write","logout")
  13.  
  14. while true do
  15. event, side, x,y = os.pullEvent()
  16. print(event .."=> Side " .. tostring(side))
  17. print("X:" .. tostring(x) .. " Y: " .. tostring(y))
  18. if y==6 then
  19. shell.run("roff")
  20. end
  21. if y==7 then
  22. shell.run("ron")
  23. end
  24. if y==8 then
  25. shell.run("maintenence")
  26. end
  27. if x==17 then
  28. peripheral.call("back","clear")
  29. peripheral.call("back","setCursorPos",10,1)
  30. peripheral.call("back","write", "Power Management")
  31. sleep(5)
  32. shell.run("reboot")
  33.  
  34. end
  35.  
  36.  
  37. if x == 1 and y ==1 then
  38. shell.run("open")
  39. sleep(10)
  40. shell.run("close")
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement