Burkino

Synapse Script Decompile

Jan 11th, 2018
2,523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local services = {'Workspace', 'ReplicatedFirst', 'ReplicatedStorage', 'Lighting', 'StarterGui', 'StarterPack', 'StarterPlayer', 'Teams', 'InsertService'}
  2. local ignore = {CameraScript=true, ControlScript=true, ChatScript=true, BubbleChat=true}
  3. local places = {}
  4. for i, v in next, services do table.insert(places, game:GetService(tostring(v))) end
  5. for i, z in pairs(game:GetService'Players':GetPlayers()) do if z ~= game:GetService'Players'.LocalPlayer then ignore[z.Name] = true end end
  6. local scrtodecompile = {}
  7. wait(0.25)
  8.  
  9. local function CollectScripts(place)
  10. local isnil = (place == nil)
  11. local child = (isnil and Synapse:GetNilInstances() or place:GetChildren())
  12.  
  13. for i, v in next, child do
  14. if (v:IsA'LocalScript') and not ignore[v.Name] then
  15. table.insert(scrtodecompile, {v, isnil}) -- Lazy method for fixing the names
  16. end
  17. if not ignore[v.Name] then -- To make sure you get all scripts, but not descendants of ignored ones
  18. CollectScripts(v)
  19. end
  20. end
  21. end
  22.  
  23. for i, z in next, places do CollectScripts(z) end -- Basic Services
  24. CollectScripts() -- Nil Instances
  25. wait(0.25)
  26.  
  27. for i, x in next, scrtodecompile do
  28. local source = Synapse:Decompile(x[1]) -- This usually crashes around the third script
  29. -- SIDE NOTE FOR LATER: I noticed if you execute decompiling one script at a time, it won't crash
  30.  
  31. local location, name = '-- Location: ' .. (x[2] and 'NIL' or 'game.' .. x[1]:GetFullName()) .. '\n', tostring(x[1].Name)
  32. Synapse:WriteFile(name .. '.txt', location .. source)
  33. wait() -- I really don't think this matters...
  34. end
Add Comment
Please, Sign In to add comment