Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------SecureStart 1.1-----------------
- os.pullEvent = os.pullEventRaw
- function clearSCR() -- Clears screen
- term.clear()
- term.setCursorPos(1,1)
- end
- function textColour()
- term.setTextColor(colors.yellow)
- end
- function Pass() -- Sets password variable
- password = "TheBlackPlaguE2017*"
- end
- function askPass() -- Asks for password
- textutils.slowPrint("Please enter the password:")
- end
- function receivePass() -- Reads for input
- username = "TheWhiteKhan"
- greet = "Welcome "
- welcome = greet..username
- input = read("*")
- if input == password then
- clearSCR()
- term.setTextColor(colors.green)
- textutils.slowPrint("Login Successful")
- sleep(0.5)
- clearSCR()
- term.setTextColor(colors.orange)
- textutils.slowPrint(welcome)
- sleep(0.5)
- else
- clearSCR()
- term.setTextColor(colors.red)
- textutils.slowPrint("Login Insuccessful")
- sleep(0.5)
- clearSCR()
- textutils.slowPrint("Shutting down")
- sleep(2)
- os.shutdown()
- end
- end
- ------------------PROGRAM BEGINS------------------
- clearSCR()
- textColour()
- Pass()
- askPass()
- receivePass()
- clearSCR()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement