Advertisement
Guest User

Untitled

a guest
May 25th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. cb = peripheral.wrap("bottom")
  2. function numbercolors()
  3. term.setTextColor(colors.blue)
  4. end
  5.  
  6. function start()
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. term.setTextColor(colors.lime)
  10. print("[1] - Start loud")
  11. print(" ")
  12. term.setTextColor(colors.red)
  13. print("[2] - Start silent")
  14. local event, key = os.pullEvent("char")
  15. if key == "1" then
  16. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eStarting...")
  17. cb.runCommand()
  18. sleep(0.1)
  19. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eLoading... 39%")
  20. cb.runCommand()
  21. sleep(0.1)
  22. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eLoading... 83%")
  23. cb.runCommand()
  24. sleep(0.3)
  25. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eDone!")
  26. cb.runCommand()
  27. sleep(0.2)
  28. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eRunning version 0.01 Alpha.")
  29. cb.runCommand()
  30. sleep(0.2)
  31. wholeprogram()
  32. elseif key == "2" then
  33. wholeprogram()
  34.  
  35. end
  36. end
  37.  
  38.  
  39. function wholeprogram()
  40. while true do
  41.  
  42. numbercolors()
  43. term.clear()
  44. term.setCursorPos(1,3)
  45. print("[1] - Kick")
  46. print(" ")
  47. print("[2] - Say")
  48. print(" ")
  49. print("[3] - Smite")
  50. print(" ")
  51. print("[4] - Say info")
  52. print(" ")
  53. print("[5] - Update info")
  54. print(" ")
  55. term.setTextColor(colors.yellow)
  56. write("> ")
  57. local input = read()
  58.  
  59. ---------------------- [ "KICK" ] --------------
  60.  
  61. if input == "1" then
  62. term.setTextColor(colors.red)
  63. term.clear()
  64. term.setCursorPos(1,1)
  65. print("Who would you like to kick?")
  66. term.setTextColor(colors.yellow)
  67. write("> ")
  68. kickwho = read()
  69. if kickwho == "@a" then
  70. term.clear()
  71. term.setCursorPos(1,1)
  72. term.setTextColor(colors.red)
  73. print("Please do NOT use @a, @p or @r!")
  74. sleep(2.5)
  75. elseif kickwho == "@p" then
  76. term.clear()
  77. term.setCursorPos(1,1)
  78. term.setTextColor(colors.red)
  79. print("Please do NOT use @a, @p or @r!")
  80. sleep(2.5)
  81. elseif kickwho == "@r" then
  82. term.clear()
  83. term.setCursorPos(1,1)
  84. term.setTextColor(colors.red)
  85. print("Please do NOT use @a, @p or @r!")
  86. sleep(2.5)
  87. else
  88. print(" ")
  89. term.setTextColor(colors.red)
  90. print("Reason:")
  91. term.setTextColor(colors.yellow)
  92. write("> ")
  93. reasonkick = read()
  94. cb.setCommand("bukkit:kick "..kickwho.." "..reasonkick)
  95. cb.runCommand()
  96. cb.setCommand("say Kicked "..kickwho..", Reason: "..reasonkick)
  97. cb.runCommand()
  98. end
  99.  
  100. --------------------- [ End of "KICK" ] --------
  101.  
  102. --------------------- [ "Say" ] ----------------
  103.  
  104. elseif input == "2" then
  105. term.clear()
  106. term.setCursorPos(1,1)
  107. term.setTextColor(colors.red)
  108. print("What would you like to say?")
  109. print(" ")
  110. term.setTextColor(colors.yellow)
  111. write("> ")
  112. say = read()
  113. print(" ")
  114. cb.setCommand("say "..say)
  115. cb.runCommand()
  116. term.clear()
  117. term.setCursorPos(1,3)
  118. print("You said: "..say)
  119. sleep(1)
  120.  
  121.  
  122. --------------------- [ End of "Say" ] ---------
  123.  
  124. --------------------- [ "Smite" ] --------------
  125.  
  126. elseif input == "3" then
  127.  
  128. --------------------- [ End of "Smite" ] -------
  129.  
  130. elseif input == "console" then
  131. term.setTextColor(colors.lime)
  132. term.clear()
  133. term.setCursorPos(1,1)
  134. print("TIP: Write exit to close the console.")
  135. print(" ")
  136. term.setTextColor(colors.red)
  137. print("Please input a command:")
  138. while true do
  139. term.setTextColor(colors.yellow)
  140. write("> ")
  141. local cmd = read()
  142. if cmd == "exit" then
  143. term.clear()
  144. else
  145. cb.setCommand(cmd)
  146. cb.runCommand()
  147. end
  148. end
  149. end
  150.  
  151. end
  152. end
  153.  
  154. term.clear()
  155. term.setCursorPos(1,1)
  156. term.setTextColor(colors.lime)
  157. print("[1] - Start loud")
  158. print(" ")
  159. term.setTextColor(colors.red)
  160. print("[2] - Start silent")
  161. local event, key = os.pullEvent("char")
  162. if key == "1" then
  163. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eStarting...")
  164. cb.runCommand()
  165. sleep(0.1)
  166. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eLoading... 39%")
  167. cb.runCommand()
  168. sleep(0.1)
  169. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eLoading... 83%")
  170. cb.runCommand()
  171. sleep(0.3)
  172. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eDone!")
  173. cb.runCommand()
  174. sleep(0.2)
  175. cb.setCommand("sudo @a ping &f[&9C&f/&bD &cCore&f] &eRunning version 0.01 Alpha.")
  176. cb.runCommand()
  177. sleep(0.2)
  178. wholeprogram()
  179. elseif key == "2" then
  180. wholeprogram()
  181.  
  182. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement