For example, Player A has 65 minerals and 19/20 supply. Calldown Mule costs 5 minerals. He uses the ability once, so he get 20/20 supply and 60 minerals left. He can´t use it more until he free up his supply.
Ps. I won´t use this for MULES, I just need the system to work so I can use it for other units.