gaga2023

base os downloader

Nov 26th, 2023 (edited)
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local pastebinCode = "anZq3PdH"
  2. local startupPath = "/startup.lua"
  3. local programPath = "/password_protected_system.lua"
  4.  
  5. -- Download the code from Pastebin
  6. local response = http.get("https://pastebin.com/raw/" .. pastebinCode)
  7.  
  8. if response then
  9. local code = response.readAll()
  10. response.close()
  11.  
  12. -- Save the code to the computer's filesystem
  13. local file = fs.open(programPath, "w")
  14. file.write(code)
  15. file.close()
  16.  
  17. -- Create or update the startup script
  18. local startupFile = fs.open(startupPath, "w")
  19. startupFile.writeLine('shell.run("' .. programPath .. '")')
  20. startupFile.close()
  21.  
  22. print("Installation successful!")
  23. print("Rebooting in 3 seconds...")
  24. sleep(3)
  25. os.reboot()
  26. else
  27. print("Failed to download code from Pastebin.")
  28. end
Advertisement
Add Comment
Please, Sign In to add comment