--local l__ID__2 = u1.Directory.Gamepasses.VIP.ID;

local u3 = {};
function v1.Progress(p4, p5)
	local v12 = u1.Saving.Get(p4);
	if not v12 then
		return;
	end;
	--if u1.Gamepasses.Owns(p4, l__ID__2) then
	--	p5 = p5 * 2;
	--end;
	if v12.IsFollowingOnTwitter then
		p5 = p5 * 1.5;
	end;
	if not u3[p4] then
		u3[p4] = p5;
		return;
	end;
	u3[p4] = u3[p4] + p5;
end;
function v1.GetNextRank(p6)
	local v13 = u1.Saving.Get(p6);
	if not v13 then
		return;
	end;
	for v14, v15 in ipairs(u1.Shared.RankChart) do
		if v15 == v13.Rank then
			return u1.Shared.RankChart[v14 + 1];
		end;
	end;
end;
function v1.GetRankNumber(p7)
	local v16 = u1.Saving.Get(p7);
	if not v16 then
		return;
	end;
	local l__RankChart__17 = u1.Shared.RankChart;
	for v18, v19 in ipairs(l__RankChart__17) do
		if v19 == v16.Rank then
			return v18;
		end;
	end;
	return #l__RankChart__17;
end;
function ApplyProgress(p8)
	local v20 = u1.Saving.Get(p8);
	local v21 = u3[p8];
	if v21 then
		if v20 then
			u3[p8] = nil;
			v20.RankProgress = v20.RankProgress + v21;
			if u1.Directory.Ranks[v20.Rank].needed <= v20.RankProgress then
				local v22 = v1.GetNextRank(p8);
				if v22 then
					v1.Give(p8, v22);
				end;
			end;
		end;
	end;
end;
coroutine.wrap(function()
	while true do
		for v23, v24 in ipairs(game.Players:GetPlayers()) do
			ApplyProgress(v24);
		end;
		wait(0.5);	
	end;
end)();
game.Players.PlayerRemoving:Connect(function(p9)
	if u3[p9] then
		u3[p9] = nil;
	end;
end);
u1.Network.Invoked("Redeem Rank Rewards").OnInvoke = function(p10)
	return v1.Reward(p10);
end;
return v1;
