Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loading()
- term.setCursorPos(17,11)
- term.clearLine()
- print ("[ Loading ]")
- sleep(0.5)
- term.setCursorPos(17,11)
- term.clearLine()
- print ("[ Loading 16% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading 31% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading 46% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading 62% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading 78% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading 93% ]")
- term.setCursorPos(17,11)
- term.clearLine()
- sleep(0.5)
- print ("[ Loading Done ]")
- sleep(2)
- end
- function start()
- term.clear()
- term.setCursorPos(1,1)
- print (" __ | __ | Login System ")
- print (" || || _ \\ (_-< ")
- print (" __// __// .\\___/ ___/ ")
- print ("------------------(Version: 2.1)------------------")
- print ("")
- end
- function welcome()
- term.clear()
- term.setCursorPos(1,1)
- print (" __ | __ | Welcome, "..username.."")
- print (" || || _ \\ (_-< ")
- print (" __// __// .\\___/ ___/ ")
- print ("-----------------(Version: 2.1)-------------------")
- print ("")
- end
- function accountAccepted()
- term.setCursorPos(17,11)
- term.clearLine()
- print ("Account Accepted.")
- sleep(3)
- end
- function wrongLogin()
- term.setCursorPos(11,11)
- term.clearLine()
- textutils.slowPrint ("Username and/or Password do not match")
- end
- os.pullEvent = os.pullEventRaw
- start()
- print ("Login: ")
- print ("")
- write ("Username: ")
- username = read()
- write ("Password: ")
- password = read ("*")
- sleep(1)
- -- admin account
- if username == "admin" and password == "adminbypass" then
- loading()
- accountAccepted()
- welcome()
- -- jumpingjoran account
- elseif username == "jumpingjoran" and password == "jumpingjoran" then
- loading()
- accountAccepted()
- welcome()
- -- mastermy2 account
- elseif username == "mastermy2" and password == "mastermy2" then
- loading()
- accountAccepted()
- welcome()
- -- no account whatsoever...
- else
- wrongLogin()
- sleep(3)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment