Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Client side: Lock ]]--
- os.pullEvent = os.pullEventRaw
- rednet.open("back")
- local serverId = 3
- local myId = os.computerID()
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Password:")
- local password = read("*")
- term.clear()
- term.setCursorPos(1,1)
- if password == "Admin" then
- break
- else
- rednet.send(serverId,password)
- local senderId, message = rednet.receive(5)
- if senderId == serverId and message == "Valid" then
- print("Access Granted")
- redstone.setOutput("right", true)
- sleep(5)
- redstone.setOutput("right", false)
- end
- end
- end
Add Comment
Please, Sign In to add comment