| m 1 revision | 
| (No difference) | 
To make a simple login for Computer Craft you need to use the text below:
shell.run('clear')
done = true
while done == true do
 shell.run('clear')
 print ("Please enter your Username")
 input1 = read()
 print ("Please enter your Password")
 input2 = read()
 if input1 == "Enter a Username Here" and input2 == "Enter a Password Here" then
 print ("Welcome")
 done = false
 sleep (1)
 shell.run('clear')
 else
 print ("Error")
 sleep(2)
 end
end
Note: You need to save the file as "startup" so it runs when you turn on your computer. If you forget your password/username hold Ctrl + T for a few seconds and it will exit.
To log out of your computer you need to run the code below:
shell.run("startup")
Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.