{
  "criteria": {
    "requirement": {
      "trigger": "minecraft:tick",
      "conditions": {
        "player": [
          {
            "condition": "minecraft:any_of",
            "terms": [
              {
                "condition": "minecraft:entity_properties",
                "entity": "this",
                "predicate": {
                  "nbt": "{playerGameType:0}"
                }
              },
              {
                "condition": "minecraft:entity_properties",
                "entity": "this",
                "predicate": {
                  "nbt": "{playerGameType:2}"
                }
              }
            ]
          },
          {
            "condition": "minecraft:entity_scores",
            "entity": "this",
            "scores": {
              "Insomnia": {
                "min": 72000
              }
            }
          },
          {
            "condition": "minecraft:random_chance",
            "chance": 0.004
          }
        ]
      }
    }
  },
  "rewards": {
    "function": "survivalplus:tools/sanity/sounds/sort"
  }
}