How can I solve this problem in GTA 5?

In GTA 5 when I’m going to get diamonds if I happen to get out of the collection area and get in quickly by pressing the collect button and get several diamonds at once. How can I solve this?

I’m thinking of creating a delay for when the person is to collect it needs to wait 20 seconds for the option to press the button to appear, so the Glitch will not work (Glitch works when the person enters and exits quickly from the diamond area by pressing the key “E” to collect).

I also thought about the chance of the person picking up the diamonds if she kept pressing the “E” key when she automatically released the button to collect.

I need a script to fix this.

thankful. :upside_down_face: