Help with tables and for loops?
local shop = {creditshop:WaitForChild("10Credits"),creditshop:WaitForChild("50Credits")}
for _, v in pairs (shop[1]) do
v.MouseButton1Click:connect(function()
local passId = 21545568
game:GetService("MarketplaceService"):PromptProductPurchase(player,passId)
game:GetService("MarketplaceService").ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == player.userId then
player.Credits.Value = player.Credits.Value + 10
wait(1)
end
end
end)
end