View difference between Paste ID: 49k8hGWn and TVt4MAst
SHOW: | | - or go back to the newest paste.
1-
    os.pullEvent = os.pullEventRaw
1+
function wait(seconds, event)
2-
	function wait(seconds, event)
2+
  local waitdelay = os.startTimer(seconds)
3-
      local waitdelay = os.startTimer(seconds)
3+
  local chk, p1, p2, p3;
4-
      local chk, p1, p2, p3;
4+
  repeat chk, p1, p2, p3 = os.pullEvent() until (event ~= nil and chk == event) or (chk == "timer" and p1 == waitdelay)
5-
      repeat chk, p1, p2, p3 = os.pullEvent() until (event ~= nil and chk == event) or (chk == "timer" and p1 == waitdelay)
5+
  return chk, p1, p2, p3
6-
      return chk, p1, p2, p3
6+
end
7-
    end
7+
8-
     
8+
term.clear()
9
term.setCursorPos(1,1)
10
textutils.slowPrint("Running Startup Program...")
11-
    textutils.slowPrint("Running Startup Program...")
11+
wait(1)
12-
    wait(1)
12+
13-
     
13+
term.setCursorPos(1,1)
14
term.clearLine()
15-
    term.clearLine()
15+
print("Running Startup Program..")
16-
    print("Running Startup Program..")
16+
wait(1)
17-
    wait(1)
17+
18-
     
18+
term.setCursorPos(1,1)
19
term.clearLine()
20-
    term.clearLine()
20+
print("Running Startup Program...")
21-
    print("Running Startup Program...")
21+
wait(1)
22-
    wait(1)
22+
23-
     
23+
term.setCursorPos(1,1)
24
term.clearLine()
25-
    term.clearLine()
25+
print("Running Startup Program..")
26-
    print("Running Startup Program..")
26+
wait(1)
27-
    wait(1)
27+
28-
     
28+
term.setCursorPos(1,1)
29
term.clearLine()
30-
    term.clearLine()
30+
print("Running Startup Program...")
31-
    print("Running Startup Program...")
31+
wait(1)
32-
    wait(1)
32+
33-
     
33+
textutils.slowPrint("Processing Scripts...")
34-
    textutils.slowPrint("Processing Scripts...")
34+
wait(1)
35-
    wait(1)
35+
36-
     
36+
term.setCursorPos(1,2)
37-
    term.setCursorPos(1,2)
37+
term.clearLine()
38-
    term.clearLine()
38+
print("Processing Scripts..")
39-
    print("Processing Scripts..")
39+
wait(1)
40-
    wait(1)
40+
41-
     
41+
term.setCursorPos(1,2)
42-
    term.setCursorPos(1,2)
42+
term.clearLine()
43-
    term.clearLine()
43+
print("Processing Scripts...")
44-
    print("Processing Scripts...")
44+
wait(1)
45-
    wait(1)
45+
46-
     
46+
totalbytes = 3250187
47-
    totalbytes = 3250187
47+
local count = 0
48-
    local count = 0
48+
49-
     
49+
repeat
50-
    repeat
50+
  count = count + 325000  
51-
      count = count + 325000  
51+
  print("Bytes Loaded: " .. count)
52-
      print("Bytes Loaded: " .. count)
52+
  wait(0.001)
53-
      wait(0.001)
53+
until count >= totalbytes
54-
    until count >= totalbytes
54+
55-
     
55+
textutils.slowPrint("35 folders detected.")
56-
    textutils.slowPrint("35 folders detected.")
56+
wait(2)
57-
    wait(2)
57+
58-
     
58+
textutils.slowPrint("491 initial files loaded.")
59-
    textutils.slowPrint("491 initial files loaded.")
59+
wait(2)
60-
    wait(2)
60+
61-
     
61+
textutils.slowPrint("Loading user made programs.")
62-
    textutils.slowPrint("Loading user made programs.")
62+
wait(1)
63-
    wait(1)
63+
64-
     
64+
textutils.slowPrint("Loading startup screen")
65-
    textutils.slowPrint("Loading startup screen")
65+
wait(1)
66-
    wait(1)
66+
67-
     
67+
term.clear()
68
pos1 = 30
69-
    pos1 = 30
69+
term.setCursorPos(pos1, 9)
70-
    term.setCursorPos(pos1, 9)
70+
71-
     
71+
countt = 0
72-
    countt = 0
72+
repeat
73-
    repeat
73+
  term.setCursorPos(pos1, 9)
74-
      term.setCursorPos(pos1, 9)
74+
  print("-")
75-
      print("-")
75+
  pos1 = pos1 - 1
76-
      pos1 = pos1 - 1
76+
  wait(0.5)
77-
      wait(0.5)
77+
until pos1 == 18
78-
    until pos1 == 18
78+
79-
     
79+
term.clearLine()
80-
    term.clearLine()
80+
term.setCursorPos(1,6)
81
print([[
82
    _____          _____  ____  ____
83-
          __             
83+
   / ___/______ _/ _/ /_/ __ \/ __/
84-
		       / /  ___  ___ _(_)__ 
84+
  / /__/ __/ _  / _/ __/ /_/ /\ \  
85-
        / /__/ _ \/ _ `/ / _ \
85+
  \___/_/  \_,_/_/ \__/\____/___/
86-
	      /____/\___/\_, /_/_//_/   
86+
       / /  ___  ___ ____/ /__ ___/ /
87-
	                /___/           __       __                       
87+
      / /__/ _ \/ _  / _  / -_) _  /  
88-
              / /  ___  ___ ____/ /__ ___/ /  
88+
     /____/\___/\_,_/\_,_/\__/\_,_/  
89-
			          / /__/ _ \/ _ `/ _  / -_) _  / 
89+
90-
            /____/\___/\_,_/\_,_/\__/\_,_/  
90+
]])
91-
     
91+
92
wait(3)
93-
     
93+
Admin = "Admin"
94
Apass = "Password"
95-
    Admin = "Admin"
95+
User = "User"
96-
    Apass = "Password"
96+
Upass = "Password"
97-
    User = "User"
97+
98-
    Upass = "Password"
98+
shell.run("clear")
99-
     
99+
term.clear()
100
term.setCursorPos(1,1)
101
term.setCursorPos(1,6)
102
print([[
103
    _____          _____  ____  ____
104-
    print([[                
104+
   / ___/______ _/ _/ /_/ __ \/ __/
105-
		       / /  ___  ___ _(_)__ 
105+
  / /__/ __/ _  / _/ __/ /_/ /\ \  
106-
        / /__/ _ \/ _ `/ / _ \
106+
  \___/_/  \_,_/_/ \__/\____/___/
107-
	      /____/\___/\_, /_/_//_/   
107+
      
108-
	                /___/           __       __                       
108+
 ]])
109-
              / /  ___  ___ ____/ /__ ___/ /  
109+
print ("ComputerCraft 1.4")
110-
			          / /__/ _ \/ _ `/ _  / -_) _  / 
110+
print("------------------------")
111-
            /____/\___/\_,_/\_,_/\__/\_,_/  
111+
-- Height, 18
112-
       
112+
-- Width, 50
113-
     ]])
113+
print("Computer Users Enter Password")
114
print("User:Admin")
115
print("User:User")
116
status, input = pcall (read)
117
if input == Admin then
118-
    print("Computer Users Enter Password")
118+
  print "Password:"
119-
    print("User:Admin")
119+
  status, password = pcall (read,'*')
120-
    print("User:User")
120+
  if password == Apass then
121-
    status, input = pcall (read)
121+
    print "Access Granted!"
122-
    if input == Admin then
122+
    sleep(2)
123-
      print "Password:"
123+
    shell.run("cd","Admin")
124-
      status, password = pcall (read,'*')
124+
    shell.run("clear")   
125-
      if password == Apass then
125+
126-
        print "Access Granted!"
126+
127-
        sleep(2)
127+
128-
        shell.run("cd","Admin")
128+
129-
        shell.run("clear")  
129+
130-
        sleep(1)
130+
131-
     
131+
132-
        term.clear()
132+
    _____          _____  ____  ____
133-
        term.setCursorPos(1,1)
133+
   / ___/______ _/ _/ /_/ __ \/ __/
134-
        term.setCursorPos(1,6)
134+
  / /__/ __/ _  / _/ __/ /_/ /\ \  
135-
     
135+
  \___/_/  \_,_/_/ \__/\____/___/
136-
        print([[
136+
       / /  ___  ___ ____/ /__ ___/ /
137-
          ______           __          
137+
      / /__/ _ \/ _  / _  / -_) _  /  
138-
         / __/ /____ _____/ /___ _____ 
138+
     /____/\___/\_,_/\_,_/\__/\_,_/  
139-
        _\ \/ __/ _ `/ __/ __/ // / _ \
139+
140-
       /___/\__/\_,_/_/  \__/\_,_/ .__/
140+
141-
                   ___          /_/ __
141+
142-
	                 / _ \___ ___ ____/ /_ __
142+
143-
                 / , _/ -_) _ `/ _  / // /
143+
144-
                /_/|_|\__/\_,_/\_,_/\_, / 
144+
145-
                                   /___/  
145+
  else
146-
	
146+
  end
147-
		]])
147+
elseif input == User then
148-
        print ("ComputerCraft 1.4")
148+
  print "Password:"
149-
        print("------------------------")
149+
  status, password = pcall (read,'*')
150-
        -- Height, 18
150+
  if password == Upass then
151-
        -- Width, 50
151+
    print "Access Granted!"
152-
      else
152+
    sleep(2)
153-
      end
153+
    shell.run("cd","User")
154-
    elseif input == User then
154+
155-
      print "Password:"
155+
  else
156-
      status, password = pcall (read,'*')
156+
157-
      if password == Upass then
157+
  end -- needed a end here
158-
        print "Access Granted!"
158+
elseif input ~= Admin and input ~= User then -- to stop people bypassing your script.
159-
        sleep(2)
159+
  print("WrongPassword")
160-
        shell.run("cd","User")
160+
  sleep(3)
161-
        shell.run("clear")
161+
162-
      else
162+
  term.clear()
163-
     
163+
  term.setCursorPos(1,1)
164-
      end -- needed a end here
164+
  textutils.slowPrint("ShutingDown...")
165-
    elseif input ~= Admin and input ~= User then -- to stop people bypassing your script.
165+
  wait(1)
166-
      print("WrongPassword")
166+
167-
      sleep(3)
167+
  term.setCursorPos(1,1)
168-
     
168+
  term.clearLine()
169-
      term.clear()
169+
  print("ShutingDown..")
170-
      term.setCursorPos(1,1)
170+
  wait(1)
171-
      textutils.slowPrint("ShutingDown...")
171+
172-
      wait(1)
172+
  term.setCursorPos(1,1)
173-
     
173+
  term.clearLine()
174-
      term.setCursorPos(1,1)
174+
  print("ShutingDown...")
175-
      term.clearLine()
175+
  wait(1)
176-
      print("ShutingDown..")
176+
177-
      wait(1)
177+
  term.setCursorPos(1,1)
178-
     
178+
  term.clearLine()
179-
      term.setCursorPos(1,1)
179+
  print("ShutingDown..")
180-
      term.clearLine()
180+
  wait(1)
181-
      print("ShutingDown...")
181+
182-
      wait(1)
182+
  term.setCursorPos(1,1)
183-
     
183+
  term.clearLine()
184-
      term.setCursorPos(1,1)
184+
  print("ShutingDown...")
185-
      term.clearLine()
185+
  wait(1)
186-
      print("ShutingDown..")
186+
187-
      wait(1)
187+
188-
     
188+
  sleep(3)
189-
      term.setCursorPos(1,1)
189+
  os.shutdown()
190-
      term.clearLine()
190+
end