Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- rednet.open("left")
- local serverId = 14
- local done = false
- local myId = os.computerID()
- while done == false do
- term.clear()
- term.setCursorPos(1,1)
- write("Password:")
- local password = read()
- term.clear()
- term.setCursorPos(1,1)
- if password == "ADMIN" then
- done = true
- else
- rednet.send(serverId.password)
- senderId.message.distance = rednet.receive(5)
- if senderId == serverId then
- if message == "Valid" then
- print("Access Granted")
- redstone.setOutput("top",true)
- sleep(3)
- redstone.setOutput("top",false)
- else
- print("Access Denied")
- sleep(1)
- print("Goodbye")
- redstone.setOutput("back",false)
- sleep(3)
- redstone.setOutput("back",true)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment