Advertisement
Wardes

startup portableComputer

May 4th, 2021 (edited)
779
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. --By Wardes
  2. shell.run("clear")
  3. print("Initialization")
  4.  
  5. listApi = {
  6.   {name = "mTestApi", code = "xWn6BtXA"}
  7. }
  8.  
  9. if table.getn(listApi) ~= 0 then
  10.   for i,v in ipairs(listApi) do
  11.     mPath = fs.combine("rom/apis", v.name)
  12.     shell.run("rm", v.name)
  13.     shell.run("pastebin get ", v.code, v.name)
  14.     shell.run("os.loadAPI(",v.name,")")
  15.     term.setTextColor (colors.blue)
  16.     print("Api [" .. v.name .. "] loaded")
  17.   end
  18.   term.setTextColor (colors.green)
  19.   print("All api loaded")
  20. else
  21.   term.setTextColor (colors.red)
  22.   print("Not api found")
  23. end
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement