JustDoesGames

Computercraft Software Beta

Jul 31st, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. --os.pullEvent = os.pullEventRaw
  2.  
  3. function cls()
  4. shell.run("clear")
  5. end
  6.  
  7. if term.isColor() == true then
  8. local color = true
  9. term.setTextColor(colours.green)
  10. print("Color Found")
  11. else
  12. local color = false
  13. term.setTextColor(colours.white)
  14. print("Color Not Found")
  15. end
  16. sel = 1
  17. while true do
  18. cls()
  19. if color == true then
  20. term.setTextColor(colours.yellow)
  21. if sel == 1 then
  22. print("> Grab Files")
  23. print("Exit")
  24. elseif sel == 2 then
  25. print("Grab Files")
  26. print("> Exit")
  27. end
  28.  
  29. else
  30. term.setTextColor(colours.white)
  31. if sel == 1 then
  32. print("-----------------")
  33. print("| > Grab Files |")
  34. print("| Exit |")
  35. print("-----------------")
  36. elseif sel == 2 then
  37. print("-----------------")
  38. print("| Grab Files |")
  39. print("| > Exit |")
  40. print("-----------------")
  41. end
  42.  
  43. end
  44.  
  45. a, i = os.pullEvent("key")
  46. sleep(.01)
  47. if i == 17 or i == 200 and sel == 2 then
  48. sel = 1
  49. elseif i == 31 or i == 208 and sel == 1 then
  50. sel = 2
  51. elseif i == 28 or i == 57 then
  52. if sel == 1 then
  53. if fs.exists("Updat") == true then
  54. shell.run("delete Updat")
  55. end
  56. if fs.exists("TicTacToe") == true then
  57. shell.run("delete TicTacToe")
  58. end
  59. term.setBackgroundColor(colours.white)
  60. term.setTextColor(colours.black)
  61. cls()
  62. print("Downloading Files... Please Wait...")
  63. term.setTextColor(colours.white)
  64. shell.run("pastebin get H6f0efWS Updat")
  65. shell.run("pastebin get V4a4TCr3 TicTacToe")
  66. cls()
  67. term.setBackgroundColor(colours.black)
  68. cls()
  69. shell.run("Updat")
  70. shell.run("delete Updat")
  71. shell.run("delete TicTacToe")
  72. break
  73. elseif sel == 2 then
  74. cls()
  75. break
  76. end
  77. end
  78.  
  79.  
  80. end
Advertisement
Add Comment
Please, Sign In to add comment