function getPlayerFromId(u)for R,X in pairs(game.Players:GetPlayers())do if X.userId==u then return X end end end game.MarketplaceService.ProcessReceipt=function(u)local R=getPlayerFromId(u.PlayerId)if R~=nil then if u.ProductId==PRODUCT_ID then game.ServerStorage.ChangeRadio:Invoke(R)end end return Enum.ProductPurchaseDecision.PurchaseGranted end


function getPlayerFromId(id) -- Throw this in somewhere above your ProcessReceipt function
	for i,v in pairs(game.Players:GetPlayers()) do
		if v.userId == id then
			return v
		end
	end
end

game.MarketplaceService.ProcessReceipt = function(receiptInfo) -- Do not copy this part, this is where the code goes
	
	local player = getPlayerFromId(receiptInfo.PlayerId)
	if player ~= nil then
		if receiptInfo.ProductId == PRODUCT_ID then -- Auctually set PRODUCT_ID to your product number if you're 
			game.ServerStorage.ChangeRadio:Invoke(player)
		end
	end
	
	return Enum.ProductPurchaseDecision.PurchaseGranted	-- Make sure this is at the end of your ProcessReceipt Function	
end	
