execute unless entity @s[gamemode=creative] unless items entity @s weapon.mainhand *[custom_data~{wizard_battle:1b}] run item modify entity @s weapon.mainhand pctf:remove1
execute if items entity @s weapon.mainhand *[custom_data~{wizard_battle:1b}] run scoreboard players add @s spell_cooldown 4

scoreboard players set @s time_warp_delay 1

tag @s add warp_temp
scoreboard players set #min temp 999999
execute as @e[type=marker,tag=time_warp_scroll] if score @s real_ID = @a[tag=warp_temp,sort=nearest,limit=1] real_ID run function pctf:logic/items/scrolls/time_warp/check_newest
execute as @e[type=marker,tag=time_warp_scroll] if score @s generic_timer = #min temp run tag @s add newest
execute as @e[type=marker,tag=time_warp_scroll,tag=newest] if score @s real_ID = @a[tag=warp_temp,sort=nearest,limit=1] real_ID at @s run function pctf:logic/items/scrolls/time_warp/warp
tag @s remove warp_temp

scoreboard players add @s spell_cooldown3 4