Advertisement
YourMain12

Save Whole Game (Synapse X only and can save serverside scripts with clientside)

May 5th, 2023 (edited)
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. local HttpService = game:GetService("HttpService")
  2. local Studio = game:GetService("StudioService")
  3.  
  4. local placeId = INSERT_PLACE_ID_HERE -- Replace with the place ID of the game you want to download
  5. local fileName = "downloaded_game.rbxlx" -- Replace with the name you want to save the downloaded file as
  6.  
  7. local success, result = pcall(function()
  8.     return HttpService:RequestAsync({
  9.         Url = "https://assetdelivery.roblox.com/v1/asset?id=" .. tostring(placeId),
  10.         Method = "GET",
  11.     })
  12. end)
  13.  
  14. if success then
  15.     local body = result.Body
  16.     if body then
  17.         local file = io.open(fileName, "w")
  18.         file:write(body)
  19.         file:close()
  20.        
  21.         local success, result = pcall(function()
  22.             return Studio:DecompilePlaceAsync(fileName)
  23.         end)
  24.        
  25.         if success then
  26.             print("Successfully downloaded and decompiled the game!")
  27.         else
  28.             print("Failed to decompile the game: " .. tostring(result))
  29.         end
  30.     else
  31.         print("Failed to download the game: no response body")
  32.     end
  33. else
  34.     print("Failed to download the game: " .. tostring(result))
  35. end
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement