#65% chance to corrupt on a random marker, 35% to corrupt the closest marker to the portal. Remove 10 from scoreboard for every corrupt
tag @s remove RandomMarker
execute if predicate suhc:65percent run tag @s add RandomMarker
scoreboard players remove @s NetherQ 10

execute as @s[tag=!RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=nearest] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
execute as @s[tag=RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=random] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
execute unless score #KyuAllowNetherCorruption KyuDummy matches 1 run execute at @s run kill @e[type=marker,distance=..100,tag=KyuNetherCorrupt]

execute unless entity @e[type=marker,distance=..100,tag=KyuNetherCorrupt] run scoreboard players set @s NetherQ 0
execute unless score #KyuAllowNetherCorruption KyuDummy matches 1 run kill @s[type=marker]

#make the corruption spread quicker depending on how large the scoreboard value is
##remove only 1000 from score since it only corrupts again 50% of the time on each set
#
#tag @s remove RandomMarker
#execute if predicate suhc:65percent run tag @s add RandomMarker
#
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=20000..}] run execute as @s[tag=!RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=nearest] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=20000..}] run execute as @s[tag=RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=random] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute as @s[scores={NetherQ=20000..}] run scoreboard players remove @s NetherQ 1000
#
#tag @s remove RandomMarker
#execute if predicate suhc:65percent run tag @s add RandomMarker
#
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=40000..}] run execute as @s[tag=!RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=nearest] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=40000..}] run execute as @s[tag=RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=random] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute as @s[scores={NetherQ=40000..}] run scoreboard players remove @s NetherQ 1000
#
#tag @s remove RandomMarker
#execute if predicate suhc:65percent run tag @s add RandomMarker
#
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=60000..}] run execute as @s[tag=!RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=nearest] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=60000..}] run execute as @s[tag=RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=random] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute as @s[scores={NetherQ=60000..}] run scoreboard players remove @s NetherQ 1000
#
#tag @s remove RandomMarker
#execute if predicate suhc:65percent run tag @s add RandomMarker
#
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=80000..}] run execute as @s[tag=!RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=nearest] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute if predicate suhc:50percent run execute as @s[scores={NetherQ=80000..}] run execute as @s[tag=RandomMarker] run execute as @e[type=marker,distance=..100,tag=KyuNetherCorrupt,limit=1,sort=random] run execute at @s run function zzzzdonotuse:nethercorruption/corruptionredux1
#execute as @s[scores={NetherQ=80000..}] run scoreboard players remove @s NetherQ 1000