Advertisement
squidingtin

2

Nov 15th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local copy = {"Workspace", "Players", "Lighting", "ReplicatedFirst", "ReplicatedStorage", "StarterGui", "serverscriptservice", "serverstorage", "StarterPack", "StarterPlayer", "Teams"}
  2. local decompileEnabled = true -- If enabled, will decompile LocalScripts/ModuleScripts without using the paramater within the saveinstance function
  3. local useBuiltInDecompiler = false -- If enabled, will use the paramater within the SaveInstance function to decompile(very buggy)
  4. -- Set both of the variables for decompiling to false if you do not want to decompile LocalScripts/ModuleScripts
  5.  
  6. local games = Instance.new("Folder", game)
  7. games.Name = "GameStorage"
  8.  
  9. printoutput("\nSteal processing")
  10.  
  11. function archivable(root)
  12.    for i,v in pairs(root:GetChildren()) do
  13.        if not game.Players:GetPlayerFromCharacter(v) then
  14.            v.Archivable = true
  15.            archivable(v)
  16.        end
  17.    end
  18. end
  19.  
  20. for _,v in pairs(copy) do
  21. local folder = Instance.new("Folder", games)
  22. folder.Name = v
  23.  
  24. archivable(game[v])
  25. end
  26.  
  27. for _,v in pairs(copy) do
  28. for _, w in pairs(game[v]:GetChildren()) do
  29. pcall(function()
  30. w:Clone().Parent = games[v]
  31. end)
  32. end
  33. end
  34.  
  35. local un_pack = Instance.new("LocalScript", games)
  36. un_pack.Source = [[
  37. -- Take this and execute it in the command bar
  38.  
  39. for _,v in pairs(game:WaitForChild("GameStorage"):GetChildren()) do
  40. for _,w in pairs(v:GetChildren()) do
  41. pcall(function()
  42. w.Parent = game[v.Name]
  43. end)
  44. end
  45. end
  46. ]]
  47.  
  48. function Decompiler(Source)
  49.   for i,v in pairs(Source:children())do
  50.       if v:IsA("LocalScript") then
  51.           pcall(function()
  52.               v.Source = tostring(decompile(v))
  53.           end)
  54.       elseif v:IsA("ModuleScript") then
  55.           pcall(function()
  56.               v.Source = tostring(decompile(v))
  57.           end)
  58.       end
  59.       Decompiler(v)
  60.   end
  61. end
  62.  
  63. if decompileEnabled and not useBuiltInDecompiler then
  64. pcall(Decompiler, game.GameStorage)
  65. end
  66.  
  67. saveinstance(games, game:GetService("MarketplaceService"):GetProductInfo(tonumber(game.PlaceId)).Name, useBuiltInDecompiler)
  68. printoutput("\n Steal complete")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement