Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local server = changeme -- mettre votre speudo
- rednet.open("back")
- while true do
- textutils.slowPrint("please log in")
- textutils.slowPrint("Username:")
- local user = read()
- textutils.slowPrint("Password:")
- local pass = read()
- rednet.send(server, user.."n"..pass) -- remplacer server par id computer server
- textutils.slowPrint("waiting for server")
- local id, access
- repeat
- id, access = rednet.receive()
- until id == server -- mettre id computer server
- if access == "granted" then
- textutils.slowPrint("porte ouvert pour 10 sec.")
- redstone.setOutput("right", true)
- sleep(10)
- redstone.setOutput("right", false)
- term.clear()
- term.setCursorPos(1, 1)
- else
- textutils.slowPrint("acces refuser")
- sleep(2)
- term.clear()
- term.setCursorPos(1, 1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement