Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function count(o)
- local lines = 0
- for _, child in pairs(o:GetChildren()) do
- local passed, c = pcall(count, child)
- if passed then
- lines = lines + c
- end
- end
- if o:IsA 'BaseScript' then
- local S = {}
- if o.Source:len() > 10000 then
- local rounds = math['ceil'](o.Source:len()/10000)
- for i = 1, rounds do
- table.insert(S, o.Source:sub(10000 * (i-1), 10000*i))
- end
- else
- S = {o.Source}
- end
- for each, andeveryone in pairs(S) do
- for _, char in pairs{andeveryone:byte(1, andeveryone:len())} do
- if char == 10 then
- lines = lines + 1
- end
- end
- end
- end
- return lines
- end
- print(count(game))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement