Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- --[[ GET ELEMENT ]]--
- password = "sesame" --[[Main password]]--
- debugpass = "erwin" --[[Debug password (admin)]]--
- time_door_1 = 3 --[[Time in S open door 1]]--
- time_bt = 3 --[[Time in S open bt door 1&2]]--
- time_door_2 = 4 --[[Time in S open door 2]]--
- color_door1 = colors.white --[[bundle cable color output]]--
- color_door2 = colors.black --[[bundle cable color output]]--
- inc = "MOT DE PASSE INCORRECT" --[[Mes. en cas d'erreur]]--
- timer_inc = 0.7 --[[Delay entre mes.]]--
- timer_rep = 20 --[[Nombre de repetition mes. erreur]]--
- --[[ END ELEMENT ]]--
- --[[ PROGRAM ]]--
- while true do
- --[[ GRAPHICAL INTERFACE ]]--
- term.clear()
- term.setCursorPos(10, 1)
- term.setTextColor(colors.purple)
- term.write("| Bienvenue chez ICS Co. |")
- term.setCursorPos(1,2)
- term.setTextColor(colors.gray)
- term.write("Entrer le texte \"aide\" afin d'obtenir de l\'aide")
- term.setCursorPos(1,4)
- term.setTextColor(colors.yellow)
- term.write("Veuillez saisir le code secret")
- term.setCursorPos(1,6)
- term.setTextColor(colors.yellow)
- term.write("Mot de passe:")
- term.setCursorPos(15,6)
- term.setTextColor(colors.cyan)
- input = read("*")
- --[[ IF PASSWORD OK ]]--
- if input == password then
- term.setTextColor(colors.blue)
- print("Connexion au serveur...")
- sleep(3)
- term.clear()
- term.setTextColor(colors.lime)
- print("Mot de passe correct. Bienvenue chez ICS Co.")
- term.setTextColor(colors.yellow)
- print("Ouverture du SAS d\'entrée N°1...")
- print("Veuillez vous diriger vers le sas svp.")
- redstone.setBundledOutput("back", color_door1)
- sleep(1)
- rs.setBundledOutput("back", 0)
- term.setTextColor(colors.red)
- print("Fermerture de la porte dans ".. time_door_1 .." secondes.")
- sleep(time_door_1)
- print("Fermeture de la porte imminente")
- redstone.setBundledOutput("back", color_door1)
- sleep(1)
- rs.setBundledOutput("back", 0)
- sleep(time_bt)
- term.setTextColor(colors.yellow)
- print("Ouverture du SAS d\'entrée N°2...")
- redstone.setBundledOutput("back", color_door2)
- sleep(1)
- rs.setBundledOutput("back", 0)
- sleep(time_door_2)
- term.setTextColor(colors.red)
- print("Fermeture de la porte imminente")
- redstone.setBundledOutput("back", color_door2)
- sleep(1)
- rs.setBundledOutput("back", 0)
- sleep(1)
- --[[ PASSWORD DEBUG ]]--
- else if input == debugpass then
- term.setTextColor(colors.blue)
- print("Verification...")
- sleep(2)
- term.clear()
- term.setTextColor(colors.yellow)
- print("Bienvenue")
- print("Chargement...")
- sleep(5)
- term.clear()
- os.quit()
- --[[ PASSWORD HELP ]]--
- else if input == "aide" then
- term.clear()
- term.setTextColor(colors.white)
- print("Bienvenue sur la page d\'aide")
- print("ERREUR 403")
- print("CETTE PAGE N\'EST PAS ACCESSIBLE POUR L\'INSTANT.")
- print("Retour vers l\'accueil...")
- sleep(5)
- os.reboot()
- else
- term.setTextColor(colors.blue)
- print("Connexion au serveur...")
- sleep(3)
- term.setTextColor(colors.red)
- rs.setBundledOutput("back", colors.red)
- sleep(1)
- rs.setBundledOutput("back", 0)
- term.clear()
- term.setCursorPos(1,1)
- for i = 1, timer_rep do
- print(inc)
- sleep(timer_inc)
- end
- sleep(30)
- rs.setBundledOutput("back", colors.red)
- sleep(1)
- rs.setBundledOutput("back", 0)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement