>programming the money so that it couldn’t be used for sweets
That's stretching the concept 'money' a bit, is it still money if it's non-fungible? What on earth happens if the money is paid to someone? Can you 'launder' the restriction away by swapping money with a friend? Does the restriction remain indefinitely, making it completely non-fungible?