Advertisement
Guest User

startup

a guest
Feb 18th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. term.setCursorPos(1,1)
  2. term.clear()
  3.  
  4. motdepasse = "00004"
  5.  
  6. print("Temps d'ouverture de la porte (seconde) ?")
  7.  
  8. time = read()
  9. time = tonumber(time)
  10.  
  11. print("Veuillez saisir le mot de passe :")
  12.  
  13. text = read("*")
  14.  
  15. if text == (motdepasse) then
  16.  
  17. write("La porte restera ouverte pendant "..time.." seconde(s)")
  18.  
  19. redstone.setOutput("bottom", true)
  20.  
  21. term.setCursorPos(1,1)
  22. term.clear()
  23. sleep(time)
  24.  
  25. redstone.setOutput("bottom", false)
  26.  
  27. else
  28.  
  29. write("Le mot de passe que vous avez saisi est incorrect !")
  30. sleep(3)
  31.  
  32. end
  33.  
  34. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement