Advertisement
funnybunnyofdoom

Untitled

Dec 16th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. function main()
  2. X = window.create(term.current(),2,1,18,11)
  3. X.setBackgroundColor(colors.blue)
  4. X.clear()
  5. end
  6.  
  7. function frameOne()
  8. X.clear()
  9. X.setCursorPos(2,2)
  10. X.setBackgroundColor(colors.blue)
  11. X.write("CMD ")
  12. X.setCursorPos(2,3)
  13. X.setBackgroundColor(colors.gray)
  14. X.write("BunnyPath ")
  15. X.setCursorPos(2,4)
  16. X.write("Path Select")
  17. X.setCursorPos(2,5)
  18. X.write("Run ")
  19. X.setCursorPos(2,6)
  20. X.write("Exit ")
  21. end
  22.  
  23. function frameTwo()
  24. X.clear()
  25. X.setCursorPos(2,2)
  26. X.write("CMD ")
  27. X.setCursorPos(2,3)
  28. X.setBackgroundColor(colors.blue)
  29. X.write("BunnyPath ")
  30. X.setCursorPos(2,4)
  31. X.setBackgroundColor(colors.gray)
  32. X.write("Path Select")
  33. X.setCursorPos(2,5)
  34. X.write("Run ")
  35. X.setCursorPos(2,6)
  36. X.write("Exit ")
  37. end
  38.  
  39. function frameThree()
  40. X.clear()
  41. X.setCursorPos(2,2)
  42. X.write("CMD ")
  43. X.setCursorPos(2,3)
  44. X.write("BunnyPath ")
  45. X.setCursorPos(2,4)
  46. X.setBackgroundColor(colors.blue)
  47. X.write("Path Select")
  48. X.setBackgroundColor(colors.gray)
  49. X.setCursorPos(2,5)
  50. X.write("Run ")
  51. X.setCursorPos(2,6)
  52. X.write("Exit ")
  53. end
  54.  
  55. function frameFour()
  56. X.clear()
  57. X.setCursorPos(2,2)
  58. X.write("CMD ")
  59. X.setCursorPos(2,3)
  60. X.write("BunnyPath ")
  61. X.setCursorPos(2,4)
  62. X.write("Path Select")
  63. X.setCursorPos(2,5)
  64. X.setBackgroundColor(colors.blue)
  65. X.write("Run ")
  66. X.setBackgroundColor(colors.gray)
  67. X.setCursorPos(2,6)
  68. X.write("Exit ")
  69. end
  70.  
  71. function frameFive()
  72. X.clear()
  73. X.setCursorPos(2,2)
  74. X.write("CMD ")
  75. X.setCursorPos(2,3)
  76. X.write("BunnyPath ")
  77. X.setCursorPos(2,4)
  78. X.write("Path Select")
  79. X.setCursorPos(2,5)
  80. X.write("Run ")
  81. X.setBackgroundColor(colors.blue)
  82. X.setCursorPos(2,6)
  83. X.write("Exit ")
  84. X.setBackgroundColor(colors.gray)
  85. end
  86.  
  87. on = true
  88. ref = 0
  89. frameOne()
  90. while on do
  91. local event, key = os.pullEvent( "key" )
  92.  
  93. if key == keys.up then
  94. if Ref == 1 then
  95. Ref = Ref - 1
  96. frameOne()
  97. elseif Ref == 2 then
  98. Ref = Ref - 1
  99. frameTwo()
  100. elseif Ref == 3 then
  101. Ref = Ref - 1
  102. frameThree()
  103. elseif Ref == 4 then
  104. Ref = Ref - 1
  105. frameFour()
  106. end
  107. elseif key == keys.down then
  108. if Ref == 0 then
  109. Ref = Ref + 1
  110. frameTwo()
  111. elseif Ref == 1 then
  112. Ref = Ref + 1
  113. frameThree()
  114. elseif Ref == 2 then
  115. Ref = Ref + 1
  116. frameFour()
  117. elseif Ref == 3 then
  118. Ref = Ref + 1
  119. frameFive()
  120. end
  121. elseif key == keys.enter then
  122. if Ref == 0 then
  123. exit()
  124. elseif Ref == 1 then
  125. shell.run("BunnyPath")
  126. elseif Ref == 2 then
  127. print("Incomplete")
  128. elseif Ref == 3 then
  129. print("Incomplete")
  130. elseif Ref == 4 then
  131. exit()
  132. end
  133. end
  134. end
  135. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement