Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getPass(checkPass)
- local pass = ""
- term.write("please enter the password: ")
- pass = read()
- if pass ~= checkPass then
- print("wrong password")
- return false
- else
- print("correct password")
- return true
- end
- end
- --Main program bellow!
- print("starting program")
- while not getPass("fredrik") do
- print("please try again")
- end
- print("bla")
- while not getPass("f") do
- print("please try again")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement