Advertisement
epireyn

[Lua]Password Protected Door

Apr 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. rednet.open("back");
  2. while true do
  3.     term.clear()
  4.     term.setCursorPos(1, 1)
  5.     print("Acces restreind au roi et sa cour:")
  6.     input = read("*")
  7.     if input == "Alberto" then
  8.   term.setTextColor(colors.green)
  9.   rednet.send(1, true);
  10.   term.write("Bienvenue !")
  11.   term.setTextColor(colors.white)
  12.         redstone.setOutput("left", true)
  13.         sleep(5)
  14.         redstone.setOutput("left", false)
  15.     else
  16.   term.setTextColor(colors.red)
  17.   rednet.send(1, false);
  18.         term.write("Mauvais mot de passe")
  19.   term.setTextColor(colors.white)
  20.         sleep(3)
  21.  end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement