HELP, Carts and Grab Coins

Hello beautiful community, I am in need of enormous help. It turns out that I am creating a game and I would like your help to create a script that allows to take coins and save them in persistent storage. that is, as an example: coins from an MMORPG.

Check the community content in your editor.