Your function CoinsCollected should accept an agent instead of a collectible_object_device, as that is what Coin.CollecedEvent will return.
CoinsCollected(Agent : agent):void=
Unfortunately I don’t think you will be able to reference the coin that triggers the CoinsCollected function, only the agent (player) which collects it.
Also I don’t think that the collectible_object_device has the method Disable.