# Increment timer scoreboard players add #timer herobrine_timer 1 scoreboard players add #cooldown herobrine_cooldown 1 # Random spawn check execute if score #cooldown herobrine_cooldown matches 200.. if score #active herobrine_active matches 0 if predicate herobrine:random_spawn run function herobrine:summon_herobrine # Check if herobrine exists and handle visibility duration execute if score #active herobrine_active matches 1 run function herobrine:check_visibility # Teleport away execute if score #active herobrine_active matches 1 if score #timer herobrine_timer matches 200.. run function herobrine:teleport_away