scoreboard players remove #cave_spiders temp 1

execute store result storage pctf:angle input.x1 int 1 run random value -1..1
execute store result storage pctf:angle input.x2 int 1 run random value 0..1

execute store result storage pctf:angle input.y1 int 1 run random value 0..1
execute store result storage pctf:angle input.y2 int 1 run random value 0..1

execute store result storage pctf:angle input.z1 int 1 run random value -1..1
execute store result storage pctf:angle input.z2 int 1 run random value 0..1

function pctf:logic/items/lucky_block/outcomes/negative/team/cave_spiders/summon with storage pctf:angle input

execute if score #cave_spiders temp matches 1.. run function pctf:logic/items/lucky_block/outcomes/negative/team/cave_spiders/loop