{
  "function": "minecraft:set_custom_model_data",
  "value": {
    "type": "minecraft:score",
    "target": "this",
    "score": "broom.use"
  },
  "conditions": [
    {
      "condition": "minecraft:entity_properties",
      "entity": "this",
      "predicate": {
        "nbt": "{SelectedItem:{components:{\"minecraft:custom_data\":{broom:1}}}}"
      }
    }
  ]
}