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

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
