Hi I'm trying to make a good probability system but I realize that my code sucks and it doesn't do what I want. Knowing that I just want that when a player breaks a block it has a chance of dropping him a certain item but the problem is that with the code I wrote there is a chance that it will give several items to the person so that I want the person to have only one item.
so if anyone can help me on this please
on break of stone:
chance of 50%:
give 1 iron nugget to the player
chance of 5%:
give 1 slimeball to the player
chance of 2%:
give 1 lapis lazuli to the player
chance of 1%:
give 1 honeycomb to the player