Advertisement
onwardprogress

fileChecker

Dec 8th, 2015
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --this is the fileChecker program. It verifies if the clearanceVariables and securityVariables files exist. If they do, it does nothing. If they don't, it creates them.
  2. if fs.exists("/clearanceVariables") then
  3. --do nothing
  4. elseif not fs.exists("/clearanceVariables") then
  5.     local h = fs.open("/clearanceVariables","w")
  6.     h.writeLine("GUEST")
  7.     h.close()
  8. end
  9. if fs.exists("/securityVariables") then
  10. --do nothing
  11. elseif not fs.exists("securityVariables") then
  12.     local i = fs.open("/securityVariables","w")
  13.     i.writeLine("2")
  14.     i.close()
  15. end
  16. shell.run("mainloop")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement