Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- oldPull = os.pullEvent -- just incase you need
- -- to pull events for custom things :>
- os.pullEvent = os.pullEventRaw
- env = {}
- env.time = 3
- env.side = "back"
- env.messages = {}
- env.messages.gotin = "Welcome back to Blitz HQ" -- lol
- users = {"fisher","nukelar","User","NvQ"} -- it wont matter caps, it will lower case it when checking.
- passwords = {"fishae","DeathByNuke9","Blitz1623","#CommunistsRule"}
- masterpassword = "HappyAIDS69" --ok, its a randy thing ok?
- function reset()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- end
- while true do
- reset()
- size = {term.getSize()}
- term.setBackgroundColor(colors.gray)
- term.setCursorPos(3,3)
- for i = 1,size[2]-4 do
- cpos = {term.getCursorPos()}
- for i = 1,size[1]-4 do
- term.write(" ")
- end
- term.setCursorPos(cpos[1],cpos[2]+1)
- end
- term.setBackgroundColor(colors.red)
- title = " Blitz Bunker OS "
- title1 = " "
- function titlelen(y)
- term.setCursorPos((size[1]/2)-(#title/2),y)
- end
- titlelen(2)
- print(title1)
- titlelen(3)
- print(title)
- titlelen(4)
- print(title1)
- term.setCursorPos(4,6)
- term.setBackgroundColor(colors.gray)
- print("Input your Credentials to proceed.")
- term.setCursorPos(4,8)
- term.write("User: ")
- local user = read()
- term.setCursorPos(4,10)
- term.write("Password: ")
- local pass = read("*") --don't want any others getting this hence local
- found = false
- if pass == masterpassword then
- term.setCursorPos(4,12)
- print("Welcome back, "..user..". You look mighty spiffy today, might I also add, you have the mastercode! Don't tell anyone!")
- _G["cuser"] = user
- break
- end
- if not found then
- for i = 1,#users do
- for i1 = 1,#passwords do
- if user:lower() == users[i]:lower() then
- if pass == passwords[i1] then
- found = true
- term.setCursorPos(4,12)
- print(env.messages.gotin)
- rs.setOutput(env.side, true)
- sleep(env.time)
- rs.setOutput(env.side,false)
- end
- end
- end
- end
- end
- end
- --print("Welcome to the computer, ".._G["cuser"]..", and have a nice day.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement