Advertisement
thegreatstudio

test

May 4th, 2013
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. term.clear()
  2. os.sleep(1)
  3. function menu()
  4. term.setBackgroundColor(colors.cyan)
  5. term.clear()
  6. term.setCursorPos(13, 2)
  7. print("Orange Anti-Virus version beta 11.4")
  8. term.setCursorPos(14, 4)
  9. term.setBackgroundColor(colors.red)
  10. term.setTextColor(colors.lightBlue)
  11. print("[Scan Files]")
  12. term.setCursorPos(14, 6)
  13. term.setBackgroundColor(colors.lightBlue)
  14. term.setTextColor(colors.blue)
  15. print("[Restore]")
  16. term.setCursorPos(1, 1)
  17. term.setBackgroundColor(colors.red)
  18. term.setTextColor(colors.lightBlue)
  19. print("X")
  20. term.setCursorPos(14, 8)
  21. term.setBackgroundColor(colors.yellow)
  22. term.setTextColor(colors.cyan)
  23. print("[Backup kernel]")
  24. term.setCursorPos(14, 10)
  25. term.setBackgroundColor(colors.red)
  26. term.setTextColor(colors.lightBlue)
  27. print("[About]")
  28. while true do
  29. local event, button, X, Y = os.pullEvent("mouse_click")
  30. if event == "mouse_click" then
  31. if X >= 14 and X <= 30 and Y == 4 and button == 1 then
  32. print("Scanning Files!")
  33. sleep(1)
  34. print(fs.delete("/virus"))
  35. sleep(1)
  36. print(fs.delete("/trojan"))
  37. sleep(1)
  38. print(fs.delete("/computercraft.virus"))
  39. sleep(1)
  40. print(fs.delete("/ILOVEYOU.virus"))
  41. sleep(1)
  42. print(fs.delete("DDOSBLOCKER.virus"))
  43. sleep(1)
  44. print("Done!")
  45. sleep(1)
  46. menu()
  47. elseif X >= 14 and X <= 29 and Y == 6 and button == 1 then
  48. print(fs.move("//.Orange/kernel/startup", "/startup"))
  49. sleep(1)
  50. menu()
  51. elseif X >= 14 and X <= 28 and Y == 8 and button == 1 then
  52. print(fs.copy("/startup", "//.Orange/kernel/startup"))
  53. sleep(1)
  54. menu()
  55. elseif X >= 1 and X <= 10 and Y == 1 and button == 1 then
  56. break
  57. elseif X >= 14 and X <= 27 and Y == 10 and button == 1 then
  58. term.clear()
  59. term.setCursorPos(1, 1)
  60. print("Orange Anti-Virus is a program that protects your computer from viruses!")
  61. sleep(4)
  62. menu()
  63. end
  64. end
  65. end
  66. end
  67.  
  68. function startup()
  69. response = http.get("http://pastebin.com/raw.php?i=txZEtSbM")
  70. if response then
  71. local fileHandler = fs.open("/orange", "w")
  72. fileHandler.write(response.readAll())
  73. fileHandler.close()
  74. term.setCursorPos(1, 1)
  75. print("Update has complete!")
  76. sleep(1)
  77. menu()
  78. else
  79. print("Can't reach the server :(")
  80. sleep(1)
  81. menu()
  82. end
  83. end
  84.  
  85.  
  86. startup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement