execute if score world MultiplayerScaling matches ..4 run scoreboard players set world MobAmount 1
execute if score world MultiplayerScaling matches 5.. run scoreboard players set world MobAmount 2

execute if score world MultiplayerScaling matches ..4 run title @a subtitle [{"text":"[MINIBOSS] ","color":"red","bold":true},{"text":"Spider Queen","color":"#5d3b7f","bold":true}]
execute if score world MultiplayerScaling matches 5.. run title @a subtitle [{"text":"[MINIBOSS] ","color":"red","bold":true},{"text":"Spider Queens","color":"#5d3b7f","bold":true}]

execute if score world MultiplayerScaling matches ..4 run summon cave_spider ~ ~50 ~ {DeathLootTable:"kiwi2:entities/custom_mob_items/spider_queen_loot",Health:1000f,Tags:["wave_mob"],Passengers:[{id:"minecraft:spawner_minecart",Invulnerable:1b,Tags:["wave_mob"],SpawnCount:3,MinSpawnDelay:5,MaxSpawnDelay:5,RequiredPlayerRange:72,SpawnData:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Tags:["wave_mob"]}},SpawnPotentials:[{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Tags:["wave_mob"]}},weight:20},{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Health:100f,attributes:[{id:"minecraft:attack_damage",base:8},{id:"minecraft:max_health",base:100},{id:"minecraft:movement_speed",base:0.4},{id:"minecraft:scale",base:2}]}},weight:1},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Health:2f,attributes:[{id:"minecraft:max_health",base:2},{id:"minecraft:scale",base:0.5}]}},weight:15},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",active_effects:[{id:"minecraft:invisibility",amplifier:1,duration:19999980,show_particles:0b,show_icon:0b,ambient:0b}]}},weight:5}]}],attributes:[{id:"minecraft:attack_damage",base:0},{id:"minecraft:follow_range",base:128},{id:"minecraft:jump_strength",base:0},{id:"minecraft:knockback_resistance",base:1},{id:"minecraft:max_health",base:650},{id:"minecraft:movement_speed",base:0.2},{id:"minecraft:scale",base:6},{id:"minecraft:step_height",base:2}]}

execute if score world MultiplayerScaling matches 5.. run summon cave_spider ~ ~50 ~ {DeathLootTable:"kiwi2:entities/custom_mob_items/spider_queen_loot",Health:1000f,Tags:["wave_mob"],Passengers:[{id:"minecraft:spawner_minecart",Invulnerable:1b,Tags:["wave_mob"],SpawnCount:3,MinSpawnDelay:5,MaxSpawnDelay:5,RequiredPlayerRange:72,SpawnData:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Tags:["wave_mob"]}},SpawnPotentials:[{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Tags:["wave_mob"]}},weight:20},{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Health:100f,attributes:[{id:"minecraft:attack_damage",base:8},{id:"minecraft:max_health",base:100},{id:"minecraft:movement_speed",base:0.4},{id:"minecraft:scale",base:2}]}},weight:1},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Health:2f,attributes:[{id:"minecraft:max_health",base:2},{id:"minecraft:scale",base:0.5}]}},weight:15},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",active_effects:[{id:"minecraft:invisibility",amplifier:1,duration:19999980,show_particles:0b,show_icon:0b,ambient:0b}]}},weight:5}]}],attributes:[{id:"minecraft:attack_damage",base:0},{id:"minecraft:follow_range",base:128},{id:"minecraft:jump_strength",base:0},{id:"minecraft:knockback_resistance",base:1},{id:"minecraft:max_health",base:650},{id:"minecraft:movement_speed",base:0.2},{id:"minecraft:scale",base:6},{id:"minecraft:step_height",base:2}]}
execute if score world MultiplayerScaling matches 5.. run summon cave_spider ~ ~50 ~ {DeathLootTable:"kiwi2:entities/custom_mob_items/spider_queen_loot",Health:1000f,Tags:["wave_mob"],Passengers:[{id:"minecraft:spawner_minecart",Invulnerable:1b,Tags:["wave_mob"],SpawnCount:3,MinSpawnDelay:5,MaxSpawnDelay:5,RequiredPlayerRange:72,SpawnData:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Tags:["wave_mob"]}},SpawnPotentials:[{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Tags:["wave_mob"]}},weight:20},{data:{entity:{id:"minecraft:spider",DeathLootTable:"",Health:100f,attributes:[{id:"minecraft:attack_damage",base:8},{id:"minecraft:max_health",base:100},{id:"minecraft:movement_speed",base:0.4},{id:"minecraft:scale",base:2}]}},weight:1},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",Health:2f,attributes:[{id:"minecraft:max_health",base:2},{id:"minecraft:scale",base:0.5}]}},weight:15},{data:{entity:{id:"minecraft:cave_spider",DeathLootTable:"",active_effects:[{id:"minecraft:invisibility",amplifier:1,duration:19999980,show_particles:0b,show_icon:0b,ambient:0b}]}},weight:5}]}],attributes:[{id:"minecraft:attack_damage",base:0},{id:"minecraft:follow_range",base:128},{id:"minecraft:jump_strength",base:0},{id:"minecraft:knockback_resistance",base:1},{id:"minecraft:max_health",base:650},{id:"minecraft:movement_speed",base:0.2},{id:"minecraft:scale",base:6},{id:"minecraft:step_height",base:2}]}

spreadplayers 0 0 1 20 false @e[type=cave_spider,tag=wave_mob]