Advertisement
markman4897

GamePC menu V4

Apr 20th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.01 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. mon = peripheral.wrap("top")
  4.  
  5. term.setCursorPos(1,1)
  6. mon.setCursorPos(1,1)
  7.  
  8. term.write("Please select a number of a game.")
  9. term.setCursorPos(1,3)
  10. term.write("  1. 2048")
  11. term.setCursorPos(1,4)
  12. term.write("  2. Get that dolar")
  13. term.setCursorPos(1,5)
  14. term.write("  3. In space")
  15. term.setCursorPos(1,6)
  16. term.write("  4. Shoot'em all")
  17. mon.write("Please select a number of a game.")
  18. mon.setCursorPos(1,3)
  19. mon.write("  1. 2048")
  20. mon.setCursorPos(1,4)
  21. mon.write("  2. Get that dolar")
  22. mon.setCursorPos(1,5)
  23. mon.write("  3. In space")
  24. mon.setCursorPos(1,6)
  25. mon.write("  4. Shoot'em all")
  26.  
  27.  
  28. term.setCursorPos(1,2)
  29. mon.setCursorPos(1,2)
  30.  
  31. selection = io.read()
  32.  
  33. term.write(selection.." selected.")
  34. mon.write(selection.." selected.")
  35.  
  36. sleep(2)
  37.  
  38. if selection == 1 then
  39.   shell.run("2048/2048")
  40.   end
  41. if selection == 2 then
  42.   shell.run("Game2/game2")
  43.   end
  44. if selection == 3 then
  45.   shell.run("Game3/game3")
  46.   end
  47. if selection == 4 then
  48.   shell.run("Game4/game4")
  49.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement