Advertisement
Myst1ka

Door

Dec 15th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. term.setCursorPos(1,1)
  2. term.clear()
  3. motdepasse = "motdepasse"
  4. print("Duree de l`ouverture de la porte")
  5. time = read()
  6. time = tonumber(time)
  7. print("Saisir le mot de passe")
  8. text = read("*")
  9. if text == (motdepasse) then
  10. write("La porte restera ouverte pendant"..time.."seconde(s))
  11. redstone.setOutput("facade", true)
  12. term.setCursorPos(1,1)
  13. term.clear()
  14. sleep(time)
  15. redstone.setOutput("facade",false)
  16. else
  17. write("Mot de passe incorrect!")
  18. sleep(3)
  19. end
  20. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement