$item replace entity @s $(slot) with minecraft:written_book[item_model='guide/love',custom_data={snc_item:1},written_book_content={'title': 'Lineages', 'author': 'Boris Pinguinikov', 'generation': 2, 'pages': ['{"text":"\\uE364","color":"white"}', '[{"text":"\\uE301","color":"white"},{"text":"1. ","color":"dark_red","bold":true},{"text":"Girl or Boy","color":"black","clickEvent":{"action":"change_page","value":"3"}},"\\n",{"text":"2. ","color":"dark_red","bold":true},{"text":"Partner","color":"black","clickEvent":{"action":"change_page","value":"4"}},"\\n",{"text":"3. ","color":"dark_red","bold":true},{"text":"Babies","color":"black","clickEvent":{"action":"change_page","value":"6"}},"\\n",{"text":"4. ","color":"dark_red","bold":true},{"text":"Reborn","color":"black","clickEvent":{"action":"change_page","value":"9"}}]', '[{"text":"\\uE365","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE366","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE367","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE368","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE369","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE370","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]', '[{"text":"\\uE371","color":"white"},{"text":"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n \\uE300","bold":true,"clickEvent":{"action":"change_page","value":"2"}}]']}] 1