local function F(F)local H=F.ProductId local T=Players:GetPlayerByUserId(F.PlayerId)if T==nil then return Enum.ProductPurchaseDecision.NotProcessedYet end local C=PlayerData.Profiles[T]if not C then return end local b,A=EggConfig.GetEggFromProduct(H)local E=HatchBind:Invoke(T,b,A)task.wait(1.5)Remotes.Eggs.EggProductPurchased:FireClient(T,b,E)end
----- Private Functions -----

local function ProcessReceipt(receipt_info)
	local ProductId = receipt_info.ProductId

	local player = Players:GetPlayerByUserId(receipt_info.PlayerId)

	if player == nil then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	local profile = PlayerData.Profiles[player]
	if not profile then
		return
	end

	local ProductToBuy, amount = EggConfig.GetEggFromProduct(ProductId)

	local pets = HatchBind:Invoke(player, ProductToBuy, amount)

	task.wait(1.5)

	Remotes.Eggs.EggProductPurchased:FireClient(player, ProductToBuy, pets)
end
