Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local done = false
- local myid = os.computerID()
- while done == false do
- write("Password:")
- local password = read()
- term.clear()
- term.setCursorPos(1,1)
- rednet.open("back")
- rednet.send(ID_OF_SERVER, password)
- serverID, message, distance = rednet.receive()
- rednet.close("back")
- isValid = message
- if isValid == -1 then
- print("You are not allowed to use this channel")
- elseif isValid == 1 then
- print("Access Granted")
- redstone.setOutput("right",true)
- sleep(5)
- redstone.setOutput("right",false)
- else
- print("Wrong password")
- sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment