
This Tutorial Is For People With Little/None Understanding Of ComputerCraft, Or Coding In LUA. Sorry If Its Too Simple, I Could Make It Better, But Want To Keep It As Simple As Possible (:
1) Making Your Program:

- Code: Select all
edit startup
This Creates Your File, And As It Is Named Startup, The Computer Will Run The Program Each Time It Restarts.
2) Making Your GUI:

Print: This Makes The Computer Display The String, Sets Cursor To The Line Below
Write: This Makes The Computer Display The String, Sets Cursor To The End Of The String
3) Input:

- Code: Select all
input = read("*")
This Makes The Computer Request A Input Of The User, In This Case A Password. The String Is Then Stored For Later.
3) If Statment:

- Code: Select all
if input == "password" then
This Checks If The Input (defined earlier) Matches The Password
- Code: Select all
rs.setOutput("left", true)
This Sets A Positive Redstone Output From The Left Side Of The Computer
- Code: Select all
sleep(3)
This Keeps The Computer At The Current State (emitting redstone) For 3 Seconds
- Code: Select all
rs.setOutput("left", false)
This Changes The Redstone Output On The Left To False
4) Else:

- Code: Select all
else
Does The Following If The Input Does Not Equal The Password
- Code: Select all
os.reboot()
Restarts The Computer
- Code: Select all
end
Ends The Code
Fixes:
You'll Probably Notice, That When You Restart Your Computer It Sais This Above The Program:

You Can Fix It By Changing Your Code Accordingly:

- Code: Select all
term.clear()
This Clears The Screen
- Code: Select all
term.setCursorPos(1,1)
This Makes The Cursor Go Back To The Start Of The Screen
The Next Bit Allows Your Computer To Be Un-Hackable (well as much as possible)(sorry for no scrennies)
Add This At The Top Of Your Code:
- Code: Select all
os.pullEvent =os.pullEventRaw
Ok Thats How To Make A Password Protected Door. Click Here For The Raw Paste Data