Advertisement
RobotBubble

ComputerMenu

Oct 23rd, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1, 1)
  3. print("Remote [1]")
  4. print("IMClient [2]")
  5. print("Calculator [3]")
  6. print("NumberGame [4]")
  7. print("Comp. Info [5]")
  8. print("Options [6]")
  9. print("Reboot [7]")
  10. print("Shutdown [8]")
  11. local sEvent, param = os.pullEvent("key")
  12. if(sEvent == "key" ) then
  13. if(param == 2) then
  14. term.clear()
  15. term.setCursorPos(1, 1)
  16. shell.run("remote")
  17. elseif(param == 3) then
  18. term.clear()
  19. term.setCursorPos(1, 1)
  20. shell.run("IMClient")
  21. elseif(param == 4) then
  22. term.clear()
  23. term.setCursorPos(1, 1)
  24. shell.run("calculator")
  25. elseif(param == 5) then
  26. term.clear()
  27. term.setCursorPos(1, 1)
  28. shell.run("numbergame")
  29. elseif(param == 6) then
  30. term.clear()
  31. term.setCursorPos(1, 1)
  32. shell.run("label get")
  33. shell.run("id")
  34. shell.run("gps.locate()")
  35. sleep(3)
  36. print("x to return to menu")
  37. elseif(param == 7) then
  38. term.clear()
  39. term.setCursorPos(1, 1)
  40. shell.run("options")
  41. elseif(param == 8) then
  42. sleep(1)
  43. os.reboot()
  44. elseif(param == 9) then
  45. sleep(1)
  46. os.shutdown()
  47. elseif(param == 10) then
  48. sleep(1)
  49. shell.run("help")
  50. end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement