Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- os.sleep(1)
- function menu()
- term.setBackgroundColor(colors.cyan)
- term.clear()
- term.setCursorPos(13, 2)
- print("Orange Anti-Virus version beta 11.4")
- term.setCursorPos(14, 4)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.lightBlue)
- print("[Scan Files]")
- term.setCursorPos(14, 6)
- term.setBackgroundColor(colors.lightBlue)
- term.setTextColor(colors.blue)
- print("[Restore]")
- term.setCursorPos(1, 1)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.lightBlue)
- print("X")
- term.setCursorPos(14, 8)
- term.setBackgroundColor(colors.yellow)
- term.setTextColor(colors.cyan)
- print("[Backup kernel]")
- term.setCursorPos(14, 10)
- term.setBackgroundColor(colors.red)
- term.setTextColor(colors.lightBlue)
- print("[About]")
- while true do
- local event, button, X, Y = os.pullEvent("mouse_click")
- if event == "mouse_click" then
- if X >= 14 and X <= 30 and Y == 4 and button == 1 then
- print("Scanning Files!")
- sleep(1)
- print(fs.delete("/virus"))
- sleep(1)
- print(fs.delete("/trojan"))
- sleep(1)
- print(fs.delete("/computercraft.virus"))
- sleep(1)
- print(fs.delete("/ILOVEYOU.virus"))
- sleep(1)
- print(fs.delete("DDOSBLOCKER.virus"))
- sleep(1)
- print("Done!")
- sleep(1)
- menu()
- elseif X >= 14 and X <= 29 and Y == 6 and button == 1 then
- print(fs.move("//.Orange/kernel/startup", "/startup"))
- sleep(1)
- menu()
- elseif X >= 14 and X <= 28 and Y == 8 and button == 1 then
- print(fs.copy("/startup", "//.Orange/kernel/startup"))
- sleep(1)
- menu()
- elseif X >= 1 and X <= 10 and Y == 1 and button == 1 then
- break
- elseif X >= 14 and X <= 27 and Y == 10 and button == 1 then
- term.clear()
- term.setCursorPos(1, 1)
- print("Orange Anti-Virus is a program that protects your computer from viruses!")
- sleep(4)
- menu()
- end
- end
- end
- end
- function startup()
- response = http.get("http://pastebin.com/raw.php?i=txZEtSbM")
- if response then
- local fileHandler = fs.open("/orange", "w")
- fileHandler.write(response.readAll())
- fileHandler.close()
- term.setCursorPos(1, 1)
- print("Update has complete!")
- sleep(1)
- menu()
- else
- print("Can't reach the server :(")
- sleep(1)
- menu()
- end
- end
- startup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement