Closing the table

local info 

local function create()
	for gamepass_id, gamepass_info in pairs(info.gamepasses_info) do
		local button = script:WaitForChild("ImageButton"):Clone() 
		button.MouseButton1Click:Connect(function()
			selected_pass = gamepass_id
			if info.checked_gamepasses[gamepass_id] == true then
				-- ...
			end
		end)

	end
end

replicated_storage:WaitForChild("remote_events"):WaitForChild("send_info").OnClientEvent:Connect(function(data_type, recived_info)
	if data_type ~= "shop_info" then return end info = recived_info
	create()
end)

market.PromptGamePassPurchaseFinished:Connect(function(player, gamepassId, wasPurchased)
	if player.UserId ~= game.Players.LocalPlayer.UserId then return end
	if wasPurchased == true then info.checked_gamepasses[gamepassId] = true end
end)

at the moment onclientevent info = {0,0,0} conditionally
but when the purchase is completed, the table changes to {0,1,0}
the problem is that inside the loop, inside the click handler, the info table is still {0,0,0}.

PromptGamePassPurchaseFinished should be used on the server not on the client