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