function game:id/dynamic {"selector":"@e[type=magma_cube]"}
execute if entity @e[type=magma_cube,tag=id_share,tag=!new2] run tellraw @s[scores={spawn_message_delay=..0}] [{"text":"[ Spawn Point Returned ]","color":"gray"},{"text":"","color":"dark_green"}]
execute if entity @e[type=magma_cube,tag=id_share,tag=!new2] run scoreboard players set @s spawn_message_delay 60
execute if entity @e[type=magma_cube,tag=id_share,tag=!new2] run give @s magma_cube_spawn_egg[custom_model_data={strings:["3"]},can_place_on=[{blocks:"#game:bolt_place"}],custom_name={"text":"Spawn Point","italic":false,"color":"gray"},lore=[{"text":"Place a location to respawn at","color":"white","italic":false},{"text":"Respawn 1.5 seconds faster","color":"white","italic":false},{"text":"Can be shot","color":"white","italic":false},{"text":"Max active: 1","color":"white","italic":false},{"text":"Returned on flag capture","color":"white","italic":false}],entity_data={id:"minecraft:magma_cube",PersistenceRequired:1b,Silent:1b,Size:0},tooltip_display={hidden_components:["attribute_modifiers","can_break","custom_model_data","unbreakable","tooltip_display","weapon","max_damage","can_place_on","trim","dyed_color","damage","enchantments","food","tool","tooltip_display","potion_contents","item_model","item_name"]}] 1
execute if entity @e[type=magma_cube,tag=id_share,tag=!new2] run tag @s add used_spawn
kill @e[type=magma_cube,tag=id_share,tag=!new2]

execute as @s at @s positioned ^ ^ ^1.6 positioned ~ ~1.6 ~ run scoreboard players operation @e[type=magma_cube,limit=1,sort=nearest,tag=!old] ID = @s ID