{
  "version": 1,
  "name": "Timed Bonus",
  "mode": "Slayer",
  "rules": {
    "score_to_win": 50,
    "kill_points": 1,
    "death_points": 0,
    "suicide_points": 0,
    "betrayal_points": 0
  },
  "options": {
    "rounds.teams": 0,
    "rounds.limit": 1,
    "rounds.minutes": 10
  },
  "script": {
    "version": 2,
    "name": "Timed Bonus",
    "initial": [],
    "logic": {
      "options": {
        "interval": {"value": 10, "min": 1, "max": 60}
      },
      "on_round_start": [
        {"op": "timer_set", "scope": "global", "slot": 0, "value": ["option.interval"]},
        {"op": "timer_rate", "scope": "global", "slot": 0, "value": [-1]}
      ],
      "on_tick": [
        {"op": "if", "condition": ["global.timer.0", 0, "=="], "then": [
          {"op": "for_each_player", "actions": [
            {"op": "score", "when": ["self.alive"], "value": [1]},
            {"op": "hud", "slot": 0, "text": "Score", "value": ["self.score"], "max": [50]}
          ]},
          {"op": "timer_set", "scope": "global", "slot": 0, "value": ["option.interval"]}
        ]}
      ]
    }
  }
}
