Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local services = {'Workspace', 'ReplicatedFirst', 'ReplicatedStorage', 'Lighting', 'StarterGui', 'StarterPack', 'StarterPlayer', 'Teams', 'InsertService'}
- local ignore = {CameraScript=true, ControlScript=true, ChatScript=true, BubbleChat=true}
- local places = {}
- for i, v in next, services do table.insert(places, game:GetService(tostring(v))) end
- for i, z in pairs(game:GetService'Players':GetPlayers()) do if z ~= game:GetService'Players'.LocalPlayer then ignore[z.Name] = true end end
- local scrtodecompile = {}
- wait(0.25)
- local function CollectScripts(place)
- local isnil = (place == nil)
- local child = (isnil and Synapse:GetNilInstances() or place:GetChildren())
- for i, v in next, child do
- if (v:IsA'LocalScript') and not ignore[v.Name] then
- table.insert(scrtodecompile, {v, isnil}) -- Lazy method for fixing the names
- end
- if not ignore[v.Name] then -- To make sure you get all scripts, but not descendants of ignored ones
- CollectScripts(v)
- end
- end
- end
- for i, z in next, places do CollectScripts(z) end -- Basic Services
- CollectScripts() -- Nil Instances
- wait(0.25)
- for i, x in next, scrtodecompile do
- local source = Synapse:Decompile(x[1]) -- This usually crashes around the third script
- -- SIDE NOTE FOR LATER: I noticed if you execute decompiling one script at a time, it won't crash
- local location, name = '-- Location: ' .. (x[2] and 'NIL' or 'game.' .. x[1]:GetFullName()) .. '\n', tostring(x[1].Name)
- Synapse:WriteFile(name .. '.txt', location .. source)
- wait() -- I really don't think this matters...
- end
Add Comment
Please, Sign In to add comment