local E={[1527684360]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+5 return true end end;[1527684736]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+10 return true end end,[1527684772]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+15 return true end end;[1527684906]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+25 return true end end,[1527684963]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+50 return true end end,[1527685101]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+75 return true end end;[1527685172]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+100 return true end end,[1527685229]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+250 return true end end,[1527685281]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+500 return true end end,[1527685476]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+1000 return true end end;[1527685554]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+2500 return true end end,[1527685603]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+5000 return true end end;[1527685835]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+10000 return true end end,[1527685970]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+25000 return true end end,[1527689815]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+50000 return true end end;[1527686109]=function(E,e)local Z=e:FindFirstChild("\068\111\110\097\116\105\111\110\086\097\108\117\101")local B=Z if B then B.Value=B.Value+100000 return true end end}MarketplaceService.ProcessReceipt=function(e)local Z=e.PlayerId..("\095"..e.PurchaseId)local B=false local J,T=pcall(function()B=purchaseHistoryStore:GetAsync(Z)end)if J and B then return Enum.ProductPurchaseDecision.PurchaseGranted elseif not J then error("\068\097\116\097 \115\116\111\114\101 \101\114\114\111\114\058"..T)end local H=Players:GetPlayerByUserId(e.PlayerId)if not H then return Enum.ProductPurchaseDecision.NotProcessedYet end local s=E[e.ProductId]local D,w=pcall(s,e,H)if not D or not w then warn("\069\114\114\111\114 \111\099\099\117\114\114\101\100 \119\104\105\108\101 \112\114\111\099\101\115\115\105\110\103 \097 \112\114\111\100\117\099\116 \112\117\114\099\104\097\115\101")print("\n\080\114\111\100\117\099\116\073\100\058",e.ProductId)print("\n\080\108\097\121\101\114\058",H)return Enum.ProductPurchaseDecision.NotProcessedYet end local c,S=pcall(function()purchaseHistoryStore:SetAsync(Z,true)end)if not c then error("\067\097\110\110\111\116 \115\097\118\101 \112\117\114\099\104\097\115\101 \100\097\116\097\058 "..S)end return Enum.ProductPurchaseDecision.PurchaseGranted end
-- Table setup containing product IDs and functions for handling purchases
local productFunctions = {
	[1527684360] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 5
			return true
		end
	end,

	[1527684736] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 10
			return true
		end
	end,

	[1527684772] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 15
			return true
		end
	end,

	[1527684906] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 25
			return true
		end
	end,

	[1527684963] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 50
			return true
		end
	end,

	[1527685101] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 75
			return true
		end
	end,

	[1527685172] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 100
			return true
		end
	end,

	[1527685229] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 250
			return true
		end
	end,

	[1527685281] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 500
			return true
		end
	end,

	[1527685476] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 1000
			return true
		end
	end,

	[1527685554] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 2500
			return true
		end
	end,

	[1527685603] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 5000
			return true
		end
	end,

	[1527685835] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 10000
			return true
		end
	end,

	[1527685970] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 25000
			return true
		end
	end,

	[1527689815] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 50000
			return true
		end
	end,

	[1527686109] = function(receipt, player)
		local stats = player:FindFirstChild("DonationValue")
		local donation = stats
		if donation then
			donation.Value = donation.Value + 100000
			return true
		end
	end,
}

MarketplaceService.ProcessReceipt = function(receiptInfo)
	local playerProductKey = receiptInfo.PlayerId .. "_" .. receiptInfo.PurchaseId
	local purchased = false
	local success, errorMessage = pcall(function()
		purchased = purchaseHistoryStore:GetAsync(playerProductKey)
	end)

	if success and purchased then
		return Enum.ProductPurchaseDecision.PurchaseGranted
	elseif not success then
		error("Data store error:" .. errorMessage)
	end

	local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
	if not player then
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	local handler = productFunctions[receiptInfo.ProductId]

	local success, result = pcall(handler, receiptInfo, player)
	if not success or not result then
		warn("Error occurred while processing a product purchase")
		print("\nProductId:", receiptInfo.ProductId)
		print("\nPlayer:", player)
		return Enum.ProductPurchaseDecision.NotProcessedYet
	end

	local success, errorMessage = pcall(function()
		purchaseHistoryStore:SetAsync(playerProductKey, true)
	end)
	if not success then
		error("Cannot save purchase data: " .. errorMessage)
	end

	return Enum.ProductPurchaseDecision.PurchaseGranted
end
