Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- sleep(1)
- print("Potato Inc. Mainframe v1.3\n")
- end
- function login()
- clear()
- print("\nPlease Login.")
- write("Username: ")
- x = read()
- write("Password: ")
- y = read("*")
- if x == "Jacob" and y == "test" then
- clear()
- print("Welcome " .. x)
- sleep(1)
- command()
- else
- sleep(1)
- print("Wrong Username or Password, Please try again")
- login()
- end
- end
- function command()
- clear()
- write(x .. ": ")
- z = read()
- a = string.gmatch(z, %s)
- if a[0] == "open" then
- print ("open")
- elseif a[0] == "close" then
- print("close")
- else
- print("Unknown Command"
- end
- login()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement