The machines that accept your cash have computers that scan the bills to ensure they are valid. They are not 100% foolproof, they occasionally will let counterfeit bills through or reject valid currency. Additionally, almost all of these self-checkout areas have video cameras.