execute at @s as @e[type=experience_orb,distance=..2,tag=!upgraded] store result score @s itemcount run data get entity @s Value
execute at @s as @e[type=experience_orb,distance=..2,tag=!upgraded] if score @s itemcount matches ..4 run scoreboard players set @s itemcount 5
execute at @s[predicate=survivalplus:magicrobes] as @e[type=experience_orb,distance=..2,tag=!upgraded] if score @s itemcount matches ..9 run scoreboard players set @s itemcount 10
execute at @s as @e[type=experience_orb,distance=..2,tag=!upgraded] store result entity @s Value short 1 run scoreboard players get @s itemcount
execute at @s as @e[type=experience_orb,distance=..2,tag=!upgraded] run tag @s add upgraded
advancement revoke @s only survivalplus:tools/tick/xpupgrade