execute @a[x=2000,y=100,z=2000,rm=70,score_InGame_min=1,m=2,score_Back=0,score_Back_min=0] ~ ~ ~ function Hierarchy:Game/book/give

scoreboard players set @a[score_InGame_min=1,score_Back_min=-2,score_Drop=0] Back -3 {SelectedItem:{id:"minecraft:written_book"}}
scoreboard players add @a[score_Back=-1] Back 1
scoreboard players set @a[tag=IsPlaying,score_Drop_min=1,score_Drop=4] Back 2 {SelectedItem:{id:"minecraft:written_book"}}

scoreboard players enable @a Menu
execute @r[score_Back_min=1] ~ ~ ~ /function Hierarchy:Game/book/back
execute @r[score_Menu_min=1] ~ ~ ~ /function Hierarchy:Game/book/Shop
execute @r[score_Menu=-1] ~ ~ ~ /function Hierarchy:Game/book/FastMessages
execute @a[score_Menu_min=1000] ~ ~ ~ /function Hierarchy:Game/book/Surrend