Advertisement
Guest User

startup

a guest
Oct 19th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.25 KB | None | 0 0
  1. defaultPass = "123"
  2. error = "Mot de passe incorrect"
  3. facade = "back"
  4. aserror = false
  5.  
  6. term.setBackgroundColor(colors.green)
  7.  
  8. write("Username: ")
  9. username = read()
  10. write("Mot de passe: ")
  11. mdp = read()
  12.  
  13. if username == "Coca" then
  14.  
  15.   if mdp == "swag" then
  16.  
  17.     print("ok")
  18.  
  19.   else
  20.     term.setBackgroundColor(colors.red)
  21.     print(error)
  22.     aserror = true
  23.   end
  24.  
  25.  
  26. elseif username == "AzorKill" then
  27.  
  28.   if mdp == "eole" then
  29.    
  30.     print("ok")
  31.  
  32.   else
  33.     term.setBacgroundColor(colors.red)
  34.     print(error)
  35.     aserror = true
  36.   end
  37.  
  38. elseif username == "Gauthier" then
  39.  
  40.   if mdp == "nrgy" then
  41.     print("ok")
  42.    
  43.   else
  44.     term.setBackgroundColor(colors.red)
  45.     print(error)
  46.     aserror = true
  47.  
  48.   end
  49.  
  50. elseif username == "Predator" then
  51.  
  52.   if mdp == "Gulli" then
  53.  
  54.     print("ok")
  55.   else
  56.   term.setBackgroundColor(colors.red)
  57.   print(error)
  58.   aserror = true
  59.  
  60.   end
  61.  
  62.  
  63. else
  64.  
  65.   if mdp == defaultPass then
  66.     print("ok")
  67.     facade = "bottom"
  68.  
  69.   else
  70.  
  71.     term.setBackgroundColor(colors.red)
  72.     print(error)
  73.     aserror = true
  74.    
  75.   end
  76.  
  77. end
  78.  
  79. if aserror then
  80.   sleep(5)
  81.   os.shutdown()
  82. end
  83.  
  84. rs.setOutput(facade, true)
  85. sleep(5)
  86. rs.setOutput(facade, false)
  87.  
  88. os.shutdown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement