Spoiler
os.pullEvent = os.pullEventRaw
term.clear()
term.setCursorPos(13,1)
print("Welcome To Shadow Inc.")
sleep(1)
term.setCursorPos(1,2)
print("--------------------------------------------------")
sleep(1)
term.setCursorPos(1,4)
write("Enter Your Password: ")
local input = read("*")
if input == "somethingsomething...side" then
term.clear()
term.setCursorPos(14,1)
print("Welcome Back, Shadow")
term.setCursorPos(1,3)
print("--------------------------------------------------")
redstone.setOutput("left", true)
sleep(2)
redstone.setOutput("left", false)
os.shutdown()
elseif input == "Debugging" then
term.clear()
term.setCursorPos(7,1)
write("Logging Out of the Secure Network")
sleep(0.5)
term.clear()
term.setCursorPos(7,1)
write("Logging Out of the Secure Network.")
sleep(0.5)
term.clear()
term.setCursorPos(7,1)
write("Logging Out of the Secure Network..")
sleep(0.5)
term.clear()
term.setCursorPos(7,1)
write("Logging Out of the Secure Network...")
sleep(1)
term.setCursorPos(1,2)
print("--------------------------------------------------")
sleep(0.5)
term.clear()
term.setCursorPos(7,1)
print("Unsecure Debugging System Operational")
term.setCursorPos(1,2)
print("--------------------------------------------------")
sleep(0.5)
error()
elseif input == "Chrisyy" then
term.setCursorPos(15,1)
term.clear()
print("Welcome Back, Chrisy.")
term.setCursorPos(1,3)
print("---------------------------------------------------")
rs.setOutput("left",true)
sleep(2)
rs.setOutput("left",false)
os.shutdown()
else
term.clear()
term.setCursorPos(8,1)
print("You are not Welcome at ShadowInc.")
term.setCursorPos(1,2)
print("---------------------------------------------------")
sleep(1)
term.clear()
term.setCursorPos(15,1)
print("Defences Activated.")
term.setCursorPos(1,2)
print("--------------------------------------------------")
sleep(0.5)
rs.setOutput("back",true)
sleep(2)
rs.setOutput("back",false)
os.shutdown()
end
I was wondering if there is a way to replicate this, but allow a user to chose their own name and password.
Further detail:
elseif input == "Chrisyy" then
Where is says "Chrisyy", that is the username of my friend. I manually wrote it in there, so, is there a way that I can code something, so that another user may type their desired username into a computer with the code, and it appear there, without them having to edit the raw code.I want to be able to have a title screen with the option for a user to create a username and password. I can do the rest from there.
If anyone could help me, that would be great.
Thank you,
-billy