Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oldPull = os.pullEvent
- os.pullEvent = os.pullEventRaw
- -- Above, getting rid of those pesky terminate "hackers"
- -- Below, defining accounts and passwords
- local a = {
- a1 = "Brodur",
- a2 = "Hard24get"
- }
- -- I'd like to condense these in the future if possible --
- local p = {
- p1 = "qwerty25",
- p2 = "blackmesa",
- }
- term.clear()
- term.setCursorPos(1,1)
- print("Welcome to the MesaNet, running on BroDOS!")
- sleep(0.5)
- term.setCursorPos(1,3)
- print("Username: ")
- print("Password: ")
- sleep(0.5)
- term.setCursorPos(11,3)
- input = read() -- Entering username --
- if input==(a.a1) then --Does the account even exist? if so, continue!--
- term.setCursorPos(11,4)
- elseif input==(a.a2) then
- term.setCursorPos(11,4)
- elseif input=="I give up" then -- Self explanatory --
- os.reboot()
- else
- term.clearLine()
- print("No such account!")
- sleep(1)
- shell.run(login)
- end
- code = read("*") -- Seeing if accounts and passwords match, if they do, login! --
- if code==p.p1 and input==a.a1 then
- print(" ")
- print("Welcome "..a.a1.."!")
- elseif code==(p.p2) and input==(a.a2) then
- print(" ")
- print("Welcome "..a.a2.."!")
- else
- print("Invalid password!")
- sleep(1)
- shell.run("login")
- end
- os.pullEvent = oldPull -- Resetting pullEvent --
Advertisement
Add Comment
Please, Sign In to add comment