我的世界门禁系统

门禁卡系统
[三个记分板,聊天框输入]♥
①
/scoreboard objectives add 门 dummy
②
/scoreboard objectives add 门a dummy
③
/scoreboard objectives add 门b dummy
[第一个循环 其它全部连锁无条件0延迟]♥
①
scoreboard players set @a 门a 0
②
execute @a[hasitem={item=candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ copper_block 0 scoreboard players set @s 门a 1
③
execute @a[hasitem={item=white_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ iron_block 0 scoreboard players set @s 门a 1
④
execute @a[hasitem={item=yellow_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ gold_block 0 scoreboard players set @s 门a 1
⑤
execute @a[hasitem={item=light_blue_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ diamond_block 0 scoreboard players set @s 门a 1
⑥
execute @a[hasitem={item=lime_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ emerald_block 0 scoreboard players set @s 门a 1
⑦
execute @a[hasitem={item=black_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ netherite_block 0 scoreboard players set @s 门a 1
⑧
scoreboard players add @a[scores={门a=1}] 门 1
⑨
scoreboard players set @a[scores={门a=0}] 门 0
⑩
execute @a[scores={门=120..}] ~~~ fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air 0 replace iron_door
⑪
execute @a[scores={门=120..}] ~~~ scoreboard players set @s 门b 120
⑫
execute @a[hasitem={item=candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s candle 0 1
⑬
execute @a[hasitem={item=white_candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s white_candle 0 1
⑭
execute @a[hasitem={item=yellow_candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s yellow_candle 0 1
⑮
execute @a[hasitem={item=light_blue_candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s light_blue_candle 0 1
⑯
execute @a[hasitem={item=lime_candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s lime_candle 0 1
⑰
execute @a[hasitem={item=black_candle,location=slot.weapon.mainhand},scores={门=120..}] ~ ~ ~ clear @s black_candle 0 1
⑱
execute @a[scores={门=1..,门b=1..}] ~~~ scoreboard players set @s 门 0
⑲
scoreboard players remove @a[scores={门b=1..}] 门b 1
⑳
execute @a[scores={门=1..}] ~ ~ ~ titleraw @s actionbar {"rawtext":[{"translate":"%%7","with":{"rawtext":[{"selector":"@s[scores={门=..110}]"},{"selector":"@s[scores={门=..90}]"},{"selector":"@s[scores={门=..70}]"},{"selector":"@s[scores={门=..50}]"},{"selector":"@s[scores={门=..30}]"},{"selector":"@s[scores={门=..10}]"},{"text":"§l§o§f ▅▅▅▅▅▅§r"},{"text":"§l§o§d ▅§f▅▅▅▅▅§r"},{"text":"§l§o§d ▅▅§f▅▅▅▅§r"},{"text":"§l§o§d ▅▅▅§f▅▅▅§r"},{"text":"§l§o§d ▅▅▅▅§f▅▅§r"},{"text":"§l§o§d ▅▅▅▅▅§f▅§r"},{"text":"§l§o§d ▅▅▅▅▅▅§r"}]}},{"text":"\n§c[§b正在开门请稍候..§c]§r"}]}