Advertisement
HPWebcamAble

AIC Installer

Feb 20th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.49 KB | None | 0 0
  1. --Made with Advanced Installer Creater--
  2. --YEP thats right this installs a program that made this program trippy right?
  3.  
  4. print("Ready to install")
  5. print("Press any key to continue...")
  6. os.pullEvent("key")
  7.  
  8. --This is a function is part of Pastebin! I didn't write this--
  9. --Well, I rewrote it to be used inside of a program rather than as a program itself--
  10. function get(sCode,sFile)
  11. local sPath = shell.resolve( sFile )
  12. if fs.exists( sPath ) then
  13.   return false
  14. end
  15. local response = http.get("http://pastebin.com/raw.php?i="..textutils.urlEncode( sCode ))
  16. if response then       
  17.   local sResponse = response.readAll()
  18.   response.close()     
  19.   local file = fs.open( sPath, "w" )
  20.   file.write( sResponse )
  21.   file.close()
  22.   return true      
  23. else
  24.   return false
  25. end
  26. end
  27.  
  28. if not http then
  29. error("Http API not enabled")
  30. end
  31.  
  32. print("Downloading...")      
  33.   fs.makeDir("IC")
  34.   if fs.exists("/IC/AIC") then
  35.     print("File conflict! Deleting...")
  36.     shell.run("delete /IC/AIC")
  37.     print("Fixed. Retrying...")
  38.   end
  39.   if get("ne9NUiFX","/IC/AIC") then
  40.     print("Successfully downloaded AIC")
  41.   else
  42.     print("Something went wrong while downloading AIC")
  43.     return
  44.   end
  45.        
  46.   fs.makeDir("IC")
  47.   if fs.exists("/IC/button") then
  48.     print("File conflict! Deleting...")
  49.     shell.run("delete /IC/button")
  50.     print("Fixed. Retrying...")
  51.   end
  52.   if get("YjXkvXaE","/IC/button") then
  53.     print("Successfully downloaded button")
  54.   else
  55.     print("Something went wrong while downloading button")
  56.     return
  57.   end
  58.    
  59. print("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement