Jump to content




Password Program

utility computer

  • You cannot reply to this topic
No replies to this topic

#1 MeLike2D

  • Members
  • 3 posts

Posted 29 December 2017 - 10:19 AM

Password Program

This is my first Program So be easy on me

https://pastebin.com/eQLpZMf9

pastebin get eQLpZMf9 startup



os.pullEvent = os.pullEventRaw

while true do
  
	term.clear()
	term.setTextColor(colors.red)
	term.setCursorPos(3,2)
	term.write("Password: ")
	local password = read("#")
  
	if password == "password" then
		  term.clear()
		  print("Hello Player!")
		  redstone.setOutput("right", true)
		  sleep(2)
		  redstone.setOutput("right", false)
		  os.shutdown()
	 else
		  term.clear()
		  term.setBackgroundColor(colors.white)
		  term.setTextColor(colors.black)
		  print("Wrong Password")
		  sleep(2)
		  print("Shutting Down")
		  sleep(2)
		  os.shutdown()
	   end	
end


Edited by MeLike2D, 30 December 2017 - 11:02 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users