Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.blue)
- term.clear()
- term.setCursorPos(1,1)
- modem = peripheral.wrap("back")
- modem.open(199)
- file = fs.open("data", "r")
- accounts = textutils.unserialise(file.readAll())
- file.close()
- term.setCursorPos(13,3)
- print("Bienvenue sur Alpha Energy !")
- term.setCursorPos(1,5)
- print("Veuillez entrer vos identifiants ci-dessous afin d'acceder a votre compte personnel.")
- term.setCursorPos(2,8)
- print("Nom d'utilisateur :")
- term.setCursorPos(2,9)
- print("Mot de passe :")
- term.setCursorPos(22,8)
- username = read()
- term.setCursorPos(17,9)
- password = read("*")
- if accounts[username] == password then
- term.clear()
- term.setCursorPos(15,5)
- print("Identification reussie.")
- term.setCursorPos(12,6)
- print("Chargement de votre compte...")
- term.setCursorPos(10,8)
- textutils.slowPrint("---------------------------------", 30)
- sleep(2)
- file = fs.open("username_temp","w")
- file.write(username)
- file.close()
- os.run({}, "account")
- elseif accounts[username] == nil then
- term.clear()
- term.setCursorPos(14,6)
- print("Ce compte n'existe pas !")
- sleep(3)
- os.reboot()
- else
- term.clear()
- term.setCursorPos(14,6)
- print("Mot de passe incorrect !")
- sleep(3)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement