clear @s minecraft:written_book[minecraft:custom_data={secbook:1}] 1
execute store result score @s evsw_math run data get storage powersconfig:world ResetLevel 1
execute as @s[scores={evsw_math=0}] run return run advancement grant @s[advancements={superpowers:lvl_sec1=false}] only superpowers:lvl_sec1
advancement revoke @s from superpowers:lvl_sec1
scoreboard players set @s evsw_seclevel 1
scoreboard players set @s evsw_secexp 0
advancement grant @s only superpowers:lvl_sec1