View difference between Paste ID: LQZxW2TX and Qug1MRPv
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")
26+
shell.run("redpulse left 1 10", "cd10")
27
28
sleep(2)
29
os.reboot()
30-
peripheral.wrap("top").write("Closing in.. 10")
30+
31
print("Incorrect password")
32-
peripheral.wrap("top").clear()    -- Clears the screen
32+
33-
peripheral.wrap("top").setCursorPos(1, 1) 
33+
34-
peripheral.wrap("top").write("Closing in.. 9")
34+