Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw -- Prevents CTRL+T shortcut
- local function porte()
- local computer = {"computer_436","computer_438","computer_437","computer_434","computer_435","computer_433"}
- for n = 1,6 do
- m = peripheral.wrap (computer[n])
- m.turnOn()
- end
- end
- term.clear() -- Clears the screen
- term.setCursorPos(1, 1) -- The places the print position to the top of screen
- username = {"Batponney","Shiranuit","Darktimmy"} -- Here you need to define all usernames avaible
- password = {"BatbotInc","HelixProject","Artange"} -- Here you define what password each user has, remember to put user1's password in the first row and so on.
- i = paintutils.loadImage("interfaceDoor")
- paintutils.drawImage(i, 1, 1)
- term.setTextColor(colors.orange)
- term.setCursorPos(1,1)
- write("Welcome To Stage Of Batponney")
- term.setCursorPos(1,19)
- write("Login Edited By HelixProject")
- term.setCursorPos(16,7)
- term.setBackgroundColor(colors.black)
- write("Username: ")
- term.setCursorPos(16,9)
- write("Password: ")
- term.setCursorPos(26,7)
- user = read()
- term.setCursorPos(26,9)
- pass = read('*') -- This prevents people from reading the password as you put it in
- for i=1, #username do -- Starts a loop
- if user == username[i] and pass == password[i] then
- access = true
- end
- end
- if access == true then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.orange)
- term.setCursorPos(20,12)
- print("Logging in...")
- term.setCursorPos(17,12)
- print("GoodBye "..user)
- porte()
- term.setCursorPos(15,11)
- print(user.." Door is open !")
- sleep(2)
- os.reboot()
- else
- term.setCursorPos(10,12)
- term.setTextColor(colors.orange)
- term.setBackgroundColor(colors.white)
- print("Incorrect username and password")
- sleep(1)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement