function PlayerManager.SetGameRunning(T,j)GameRunning=j end function PlayerManager.ClearPlayerScores(j)for j,T in ipairs(Players:GetPlayers())do local b=T:FindFirstChild("\108\101\097\100\101\114\115\116\097\116\115")if b then local j=b:FindFirstChild("\067\097\112\116\117\114\101\115")if j then j.Value=0 end end end end function PlayerManager.LoadPlayers(j)for j,T in ipairs(Players:GetPlayers())do T:LoadCharacter()end end function PlayerManager.AllowPlayerSpawn(T,j)PlayersCanSpawn=j end function PlayerManager.DestroyPlayers(j)for j,T in ipairs(Players:GetPlayers())do T.Character:Destroy()for j,T in ipairs(T.Backpack:GetChildren())do T:Destroy()end end ResetMouseIcon:FireAllClients()end function PlayerManager.AddPlayerScore(b,j,T)j.leaderstats.Captures.Value=j.leaderstats.Captures.Value+T local B,s=pcall(function()spawn(function()PointsService:AwardPoints(j.userId,T)end)end)end


function PlayerManager:SetGameRunning(running)
	GameRunning = running
end

function PlayerManager:ClearPlayerScores()
	for _, player in ipairs(Players:GetPlayers()) do
		local leaderstats = player:FindFirstChild('leaderstats')
		if leaderstats then
			local Captures = leaderstats:FindFirstChild('Captures')
			if Captures then
				Captures.Value = 0
			end
		end
	end
end

function PlayerManager:LoadPlayers()
	for _, player in ipairs(Players:GetPlayers()) do
		player:LoadCharacter()
	end
end

function PlayerManager:AllowPlayerSpawn(allow)
	PlayersCanSpawn = allow
end

function PlayerManager:DestroyPlayers()
	for _, player in ipairs(Players:GetPlayers()) do
		player.Character:Destroy()
		for _, item in ipairs(player.Backpack:GetChildren()) do
			item:Destroy()
		end
	end
	ResetMouseIcon:FireAllClients()
end

function PlayerManager:AddPlayerScore(player, score)
	player.leaderstats.Captures.Value = player.leaderstats.Captures.Value + score
	local success, message = pcall(function() spawn(function() PointsService:AwardPoints(player.userId, score) end) end)
end
