Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- local function pause(key)
- while true do
- local sEvent, sParam=os.pullEvent('char')
- if string.lower(sParam)==key then
- break
- end
- end
- end
- term.clear()
- sleep(0.3)
- term.setCursorPos(20,4)
- sleep(0.5)
- end
- sleep(1.0)
- term.clear()
- term.setCursorPos(21,2)
- print("Welcome!")
- sleep(2.5)
- local intcount=0
- term.clear()
- term.setCursorPos(1,1)
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print("Login into SpaceOS.")
- print("UserName: LuigiBros02")
- write("Password: ")
- passwordInput = read("*")
- print("Verifying login...")
- sleep(2.5)
- if passwordInput == "mac" then
- print("Loading your settings...")
- sleep(1.5)
- print("Logging in...")
- sleep(3.5
- shell.run("/menu")
- break
- else
- sleep(1)
- print("Username not found.")
- intcount=intcount+1
- sleep(1)
- for i=3,2,-1 do
- term.setCursorPos(1,i)
- term.clearLine()
- end
- end
- if intcount==3 then
- print('You have entered an invalid username too many times.')
- sleep(5)
- os.shutdown()
- end
- end
- local intcount=0
- while true do
- write("Password: ")
- passwordInput = read("*")
- print("Verifying login...")
- sleep(2.5)
- if passwordInput == "banana" then
- print("Loading your settings...")
- sleep(1.5)
- print("Logging in...")
- sleep(3.5)
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to CraftOS!")
- pause('x')
- term.setCursorPos(1,2)
- term.clearLine()
- break
- else
- print("The password you have entered is incorrect.")
- intcount=intcount+1
- sleep(1)
- for i=6,3,-1 do
- term.setCursorPos(1,i)
- term.clearLine()
- end
- end
- if intcount==3 then
- print('You have entered an incorrect password too many times.')
- sleep(5)
- os.shutdown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement