View difference between Paste ID: hFzawHpp and LQZxW2TX
SHOW: | | - or go back to the newest paste.
1
os.pullEvent = os.pullEventRaw
2
3
term.clear()
4
term.setCursorPos(1, 1)
5
6
username = {"12345"}
7
8
write("Password: ")
9
pass = read('*')
10
11
for i=1, #username do
12
 if pass == username[i] then
13
   access = true
14
 end
15
end
16
17
if access == true then
18
print("Logging in...")
19
sleep(1)
20
print("Welcome")
21
sleep(1)
22
23
term.clear() -- Clears the screen
24
term.setCursorPos(1, 1) 
25
26-
shell.run("redpulse left 1 10", "cd10")
26+
parallel.waitForAny(
27
function() return shell.run("redpulse left 1 10") end, 
28
function() return shell.run("cd2") end
29
) 
30
31
sleep(2)
32
os.reboot()
33
else
34
print("Incorrect password")
35
sleep(2)
36
os.reboot()
37
end