Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- function c_print(text,color)
- oldColor = term.getTextColor()
- term.setTextColor(color)
- print(text)
- term.setTextColor(oldColor)
- end
- --YOUR LOGIN INFO HERE-----------
- local user = "user"
- local password = "password"
- local favoriteColor = colors.blue
- ---------------------------------
- term.clear()
- xsize,ysize = term.getSize()
- title = "Parlocameon Protected Login Protocol"
- titlepos = math.ceil(xsize/2-string.len(title)/2)
- term.setCursorPos(titlepos,1)
- c_print(title,colors.orange)
- write("User: ")
- useri = read()
- if useri == user then
- c_print("Valid User",colors.green)
- write("Password?: ")
- passwordi = read("*")
- if password==passwordi then
- c_print("Login accepted!",colors.green)
- c_print("Welcome, "..user,favoriteColor)
- sleep(2)
- print("Starting stargate management....")
- sleep(2)
- shell.run("stargate.lua")
- else
- c_print("Login denied!",colors.red)
- sleep(2)
- os.reboot()
- end
- else
- c_print("Invalid User",colors.red)
- sleep(2)
- os.reboot()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement