How to remove item from inventory when use by pressing key?

Hi there! Can’t figure out how to remove item from inventory based on item IDs. When 0 is pressed, its getting away ID1, but when I press 1, just my ID2 is turning to ID1. Hope someone can help me out… Thanks a lot!

[VIDEO][1]