Jump to content




How to hide my password?


  • You cannot reply to this topic
1 reply to this topic

#1 Klausar

  • Members
  • 110 posts

Posted 25 June 2012 - 01:59 PM

I use this code for my door code, but I want to hide it, so it shows up as *******
How do I have to change the code?

pass = ("123")
osacces = ("123123")
tries = 3
triesfull = 0
print ("Password:")

for triesnum = 1,tries,1 do
password = read ()

if password == osacces then
print ("os activated")
break
end

if password == (pass) then
print ("Door is open!")
redstone.setOutput("back", true)
shell.exit()
sleep(5)
redstone.setOutput("back", false)
os.shutdown()
else
print ("Wrong Password!")
print ("Password:")
triesfull = triesfull + 1
end

end

if triesfull == tries then
os.shutdown()
end


#2 tfoote

  • New Members
  • 134 posts
  • LocationSalt Lake, UT

Posted 25 June 2012 - 02:01 PM

password = read("*")
-- right now we set it so that as you type it looks like ******. you can change it to @@@@, AAAA, BBBB, whatever you want as long as it is a character. you put it in the ""






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users