The next-generation networks (5G and beyond) require robust channel codes to support their high specifications, such as low latency, low complexity, significant coding gain, and flexibility. In this paper, we propose using a fountain code as a promising solution to 5G and 6G networks, and then we propose using a modified version of the fountain codes (Luby transform codes) over a network topology (Y-network) that is relevant in the context of the 5G networks. In such a network, the user can be connected to two different cells at the same time. In addition, the paper presents the necessary techniques for analyzing the system and shows that the proposed scheme enhances the system performance in terms of decoding success probability, error probability, and code rate (or overhead). Furthermore, the analyses in this paper allow us to quantify the trade-off between overhead, on the one hand, and the decoding success probability and error probability, on the other hand. Finally, based on the analytical approach and numerical results, our simulation results demonstrate that the proposed scheme achieves better performance than the regular LT codes and the other schemes in the literature.