Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- conSide = "back"
- icbmSide = "bottom"
- protocol = "iTnP"
- computerId = os.getComputerID()
- rednet.open(conSide)
- term.clear()
- term.setCursorPos(1, 1)
- if not rednet.isOpen(conSide) then
- print("Erro ao estabelecer conexao a rede Skynet.")
- sleep(3)
- os.reboot()
- end
- print("Conexao com Sistemas Skynet .. OK")
- print("Aguardando log in.")
- sleep(2)
- term.clear()
- x,y = term.getSize()
- term.setCursorPos(x/2 - 17, y/2 - 1)
- print("Username: ")
- term.setCursorPos(x/2 - 15, y/2)
- user = read()
- term.setCursorPos(x/2 - 17, y/2 + 1)
- print("Password: ")
- term.setCursorPos(x/2 - 15, y/2 + 2)
- pass = read("*")
- authString = "R.Check." .. user .. "." .. pass
- term.clear()
- term.setCursorPos(1, 1)
- function menu()
- term.clear()
- x,y = term.getSize()
- term.setCursorPos(x/2 - 20, y/2)
- print("[1] Lancar [2] Sair")
- term.setCursorPos(x/2 - 10, y/2 + 1)
- c = read()
- if c == "1" then
- term.clear()
- term.setCursorPos(x/2 - 10, y/2)
- sleep(20)
- print("A Lancar Missil...")
- redstone.setOutput(icbmSide, true)
- term.setCursorPos(x/2 - 10, y/2 + 1)
- print("Missil Lancado.....")
- sleep(5)
- redstone.setOutput(icbmSide, false)
- menu()
- return
- elseif c == "2" then
- os.reboot()
- end
- end
- while true do
- rednet.broadcast("R.Id", protocol)
- i1,m1,p1 = rednet.receive()
- if i1 == m1 and p1 == protocol then
- rednet.send(i1, authString, protocol)
- i2,m2,p2 = rednet.receive()
- if i2 == i1 and p2 == protocol then
- if m2 == "Resp.True" then
- menu()
- break
- else
- print("Dados Invalidos.")
- sleep(2)
- os.reboot()
- end
- else
- os.reboot()
- end
- else
- os.reboot()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement