Giving players items based on score

Giving players items based on score - Aerial View of Soccer Field

I have a scoreboard objective called ammoCount. That is how I am tracking the amount of ammo players have, but I would like to put some items in the players' inventories to show them how much ammo they have. So, if a player has 10 ammo, they will have 10 blocks in their inventory, if they have 64 ammo they will have a stack of blocks, and if they have 65 ammo they will have a full stack plus an extra. Is this possible?






Pictures about "Giving players items based on score"

Giving players items based on score - Football Players
Giving players items based on score - Gathering Football Players
Giving players items based on score - Ice Hockey Players





How To Give Players Custom Items In Minecraft Bedrock Edition | Command Block Tutorial




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Mike, Joe Calomeni, Pixabay, Pixabay