Advertisement
Guest User

startup

a guest
Jul 23rd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. function UI(Str)
  2. term.clear()
  3. term.setCursorPos(14, 5)
  4. print("####################")
  5. term.setCursorPos(14, 6)
  6. print("# CONTROLE D'ACCES #")
  7. term.setCursorPos(14, 7)
  8. print(Str)
  9. term.setCursorPos(14, 8)
  10. print("####################")
  11. end
  12.  
  13. while true do
  14. UI("# CODE  NECESSAIRE #")
  15. term.setCursorPos(14, 10)
  16. print(">>")
  17. term.setCursorPos(16, 10)
  18. local input = read("*")
  19. if input == "machine" then
  20.   UI("#  PORTE  OUVERTE  #")
  21.   redstone.setOutput("right", true)
  22.   sleep(3)
  23.   UI("#   PORTE  CLOSE   #")
  24.   redstone.setOutput("right", false)
  25.   sleep(3)
  26.   else
  27.     if input == "gestion" then
  28.     UI("#   CODE  GESTION  #")
  29.   term.setCursorPos(1, 1)
  30.   term.clear()
  31.     error("ouverture de la gestion")
  32.     else
  33.     UI("#    CODE  FAUX    #")
  34.     sleep(3)
  35.     end
  36.   end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement