Guest User

Untitled

a guest
Jan 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. rfid = peripheral.wrap("back")
  2. if disk.isPresent("bottom") then
  3.   if disk.hasData("bottom") then
  4.     local file = fs.open("disk/A","r")
  5.     local Alias = file.readLine()
  6.     local Pass = file.readLine()
  7.     file.close()
  8.     if rfid.isPresent() then
  9.       rfid.encode(Alias .. "." ..Pass,"KI")
  10.       os.pullEvent("rfid_written")
  11.       local endfile = fs.open("disk/E","w")
  12.       endfile.close()
  13.       sleep(5)
  14.       os.reboot()
  15.     end
  16.   end
  17. end
Add Comment
Please, Sign In to add comment