$loot give @s loot {"pools":[{"rolls": 1,"entries":[{"type":"minecraft:item",name:"$(id)","functions":[{function:"minecraft:set_count",count:$(count)},{"function":"minecraft:set_components","components":$(components)}]}]}]}
execute at @s run playsound doors:misc.click master @s
function doors:slot/changed
function schedule:command {command: "clear @s *[custom_data~{library_book: true}]", delay: 60, id: "remove_book"}