Advertisement
osmarks

PotatOS SCP Database Viewer

May 15th, 2020
1,938
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. local f = fs.open("secret/SCP", "r")
  2. local rawdata = f.readAll()
  3. f.close()
  4.  
  5. local fn, err = load(rawdata, "@PotatOS SCP database")
  6. if not fn then
  7.     error(("Error loading database: %s. Please update, clean up any infohazardous anomalies, and try again."):format(err))
  8. end
  9. local data = fn()
  10. while true do
  11.     write "Lookup entry: "
  12.     local entry = data[tonumber(read())]
  13.     if not entry then printError "Not found or higher clearance required."
  14.     else
  15.         textutils.pagedPrint(entry)
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement