execute as @s at @s positioned ~ ~-1 ~ run give @p[team=blue,gamemode=adventure,distance=..1.2] minecraft:netherite_scrap[custom_name={"text":"Scrap (Return to Generator)","italic":false},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 as @s at @s positioned ~ ~-1 ~ as @p[team=blue,gamemode=adventure,distance=..1.2] run function game:player/scrap_correct
execute as @s at @s positioned ~ ~-1 ~ if entity @a[team=blue,gamemode=adventure,distance=..1.2] run kill @s
execute as @s at @s run give @p[team=blue,gamemode=adventure,distance=..1.2] minecraft:netherite_scrap[custom_name={"text":"Scrap (Return to Generator)","italic":false},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 as @s at @s as @p[team=blue,gamemode=adventure,distance=..1.2] run function game:player/scrap_correct
execute as @s at @s if entity @a[team=blue,gamemode=adventure,distance=..1.2] run kill @s
effect give @s minecraft:glowing infinite 10 true
