Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fileName = "admin"
- if(fs.exists(fileName) == true)then
- print("Installing Admin System")
- shell.run("rename "..fileName.." startup")
- sleep(5)
- os.reboot()
- end
- side = nil -- Rednet Modem Side
- dSide = nil -- Disk Drive Side (End)
- -- Determine where the modem is.
- print("Looking for drive,")
- if peripheral.isPresent("left") and peripheral.getType("left")=="drive" then
- dSide = "left"
- elseif peripheral.isPresent("right") and peripheral.getType("right")=="drive" then
- dSide = "right"
- elseif peripheral.isPresent("top") and peripheral.getType("top")=="drive" then
- dSide = "top"
- elseif peripheral.isPresent("back") and peripheral.getType("back")=="drive" then
- dSide = "back"
- elseif peripheral.isPresent("bottom") and peripheral.getType("bottom")=="drive" then
- dSide = "bottom"
- else
- print("No Disk Drive Found")
- dSide = false
- end
- while dSide == false do
- sleep(5)
- shell.run("startup")
- end
- print("Disk Drive found on "..dSide)
- -- Determine where the modem is.
- print("Looking for modem,")
- if peripheral.isPresent("left") and peripheral.getType("left")=="modem" then
- side = "left"
- elseif peripheral.isPresent("right") and peripheral.getType("right")=="modem" then
- side = "right"
- elseif peripheral.isPresent("top") and peripheral.getType("top")=="modem" then
- side = "top"
- elseif peripheral.isPresent("back") and peripheral.getType("back")=="modem" then
- side = "back"
- elseif peripheral.isPresent("bottom") and peripheral.getType("bottom")=="modem" then
- side = "bottom"
- else
- print("No Modem Found")
- side = false
- end
- while side == false do
- sleep(5)
- shell.run("startup")
- end
- print("Modem found on "..side)
- rednet.open(side)
- ser = nil -- Server ID#
- function getserver()
- local fname = "ServerID"
- if fs.exists(fname) then
- file = fs.open(fname, "r")
- ser = tonumber(file.readAll())
- file.close()
- print("Server ID: "..ser)
- else
- print("No server configured")
- print("This ID is: ".. os.getComputerID())
- term.write("Server ID: ")
- ser = io.read()
- file = fs.open(fname, "w")
- file.write(ser)
- file.close()
- ser = tonumber(ser)
- end
- end
- getserver()
- --[ BlueBank Admin by TrumpetMiner v3.5
- --[ pastebin get 6WpAVENC admin
- --[ Setup
- term.setBackgroundColor(colors.blue)
- term.setTextColor(colors.yellow)
- side = nil -- Rednet Modem Side
- dSide = nil -- Disk Drive Side (End)
- -- Determine where the modem is.
- dSide = nil
- print("Looking for drive,")
- if peripheral.isPresent("left") and peripheral.getType("left")=="drive" then
- dSide = "left"
- elseif peripheral.isPresent("right") and peripheral.getType("right")=="drive" then
- dSide = "right"
- elseif peripheral.isPresent("top") and peripheral.getType("top")=="drive" then
- dSide = "top"
- elseif peripheral.isPresent("back") and peripheral.getType("back")=="drive" then
- dSide = "back"
- elseif peripheral.isPresent("bottom") and peripheral.getType("bottom")=="drive" then
- dSide = "bottom"
- else
- print("No Disk Drive Found")
- dSide = false
- end
- while dSide == false do
- sleep(5)
- shell.run("startup")
- end
- print("Disk Drive found on "..dSide)
- -- Determine where the modem is.
- side = nil
- print("Looking for modem,")
- if peripheral.isPresent("left") and peripheral.getType("left")=="modem" then
- side = "left"
- elseif peripheral.isPresent("right") and peripheral.getType("right")=="modem" then
- side = "right"
- elseif peripheral.isPresent("top") and peripheral.getType("top")=="modem" then
- side = "top"
- elseif peripheral.isPresent("back") and peripheral.getType("back")=="modem" then
- side = "back"
- elseif peripheral.isPresent("bottom") and peripheral.getType("bottom")=="modem" then
- side = "bottom"
- else
- print("No Modem Found")
- side = false
- end
- while side == false do
- sleep(5)
- shell.run("startup")
- end
- print("Modem found on "..side)
- rednet.open(side)
- ser = nil -- Server ID#
- function getserver()
- local fname = "ServerID"
- if fs.exists(fname) then
- file = fs.open(fname, "r")
- ser = tonumber(file.readAll())
- file.close()
- print("Server ID: "..ser)
- else
- print("No server configured")
- print("This ID is: ".. os.getComputerID())
- term.write("Server ID: ")
- ser = io.read()
- file = fs.open(fname, "w")
- file.write(ser)
- file.close()
- ser = tonumber(ser)
- end
- end
- getserver()
- function start()
- term.clear()
- term.setCursorPos(3,4)
- print "[Add Money]"
- --term.setCursorPos(3,6)
- --print "[Check Balance]"
- term.setCursorPos(3,8)
- print "[New Encryption Key]"
- term.setCursorPos(3,10)
- print "[Auth Code Request]"
- event, button, x, y = os.pullEvent("mouse_click")
- if x >= 3 and x <= 14 and y == 4 then
- term.clear()
- term.setCursorPos(3,4)
- write "User: "
- user = read()
- term.setCursorPos(3,6)
- write "Amount: "
- amt = read()
- term.setCursorPos(3,8)
- write "Authorization Code > "
- auth = read()
- rednet.send(ser,"Add")
- rednet.send(ser,user)
- rednet.send(ser,amt)
- rednet.send(ser,auth)
- id, msg = rednet.receive()
- term.clear()
- term.setCursorPos(3,4)
- print(msg)
- os.pullEvent("mouse_click")
- start()
- elseif x >=3 and x <= 22 and y == 8 then
- key()
- elseif x >= 3 and x <= 21 and y == 10 then
- term.clear()
- rednet.send(ser,"Auth")
- id, msg = rednet.receive()
- term.setCursorPos(3,4)
- print(msg)
- os.pullEvent("mouse_click")
- start()
- else
- start()
- end
- end
- function key()
- term.clear()
- if disk.hasData(dSide) == true then
- term.setCursorPos(3,4)
- start()
- else
- term.setCursorPos(3,4)
- print "Please Insert Key"
- os.pullEvent("disk")
- key()
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement