Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("rs")
- if fs.exists("pass.txt") then
- hRead = assert(fs.open("pass.txt", "r"))
- pass1 = hRead.readLine(1)
- pass2 = hRead.readLine(2)
- pass3 = hRead.readLine(3)
- pass4 = hRead.readLine(4)
- print("User Password:")
- print(pass1)
- print(pass2)
- print(pass3)
- print(pass4)
- hRead.close()
- if fs.exists("admin.txt") then
- hRead = assert(fs.open("admin.txt", "r"))
- admin1 = hRead.readLine(1)
- admin2 = hRead.readLine(2)
- admin3 = hRead.readLine(3)
- admin4 = hRead.readLine(4)
- print("Admin Password:")
- print(admin1)
- print(admin2)
- print(admin3)
- print(admin4)
- hRead.close()
- end
- a=0
- b=0
- c=0
- d=0
- m=0
- while true do
- while true do
- m = rs.getBundledInput("right")
- admin = false
- if m == then
- admin = true
- print("Admin Mode")
- end
- repeat
- a = rs.getBundledInput("right")
- if a == 32768 then
- os.reboot()
- end
- print("A")
- until a ~= 0
- repeat
- print("A-")
- os.pullEvent("redstone")
- b = rs.getBundledInput("right")
- if b == 32768 then
- os.reboot()
- end
- print("B")
- until b ~= 0
- repeat
- os.pullEvent("redstone")
- c = rs.getBundledInput("right")
- if c == 32768 then
- os.reboot()
- end
- print("C")
- until c ~= 0
- repeat
- os.pullEvent("redstone")
- d = rs.getBundledInput("right")
- if d == 32768 then
- os.reboot()
- end
- print("D")
- until d ~= 0
- print(a)
- print(b)
- print(c)
- print(d)
- if admin then
- print("admin")
- hWrite = fs.open("pass.txt", "w")
- hWrite.writeLine(a)
- hWrite.writeLine(b)
- hWrite.writeLine(c)
- hWrite.writeLine(d)
- hWrite.close()
- os.reboot()
- end
- passc = pass1..pass2..pass3..pass4
- adminc = admin1..admin2..admin3..admin4
- passi = a..b..c..d
- if passi== adminc then
- rs.setOutput("top", true)
- sleep(8)
- rs.setOutput("top", false)
- end
- if passi==passc then
- print("Opening Spawn Exit")
- shell.run("OpenD")
- sleep(5)
- shell.run("CloseD")
- else
- break
- end
- end
- print("cycle")
- sleep(1.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement