execute as @s run data remove storage custom_item_model_data:item_model Model execute as @s run data modify storage custom_item_model_data:item_model Model set from entity @s Inventory[{Slot:-106b}].components.minecraft:writable_book_content.pages[0].raw execute as @s run function custom_item_model_data:set_model with storage custom_item_model_data:item_model {} execute as @s run scoreboard players reset @s CustomModel scoreboard players set @s CustomModel 0 scoreboard players enable @a CustomModel