基巖版首創(chuàng)鍵控菜單,泛用菜單全新可能
#初始化
scoreboard players add @a[rxm=88,scores={菜單=..-61}] "菜單" 1
execute as @a[scores={菜單=..-60}] unless entity @s[rxm=88] run scoreboard players set @s "菜單" -100
title @a[scores={菜單=-60..0}] times 0 5 3
scoreboard players set @a[scores={菜單=-60..0}] "菜單" 5
title @a[scores={菜單=-99..-85}] actionbar 菜單啟動(dòng)中.
title @a[scores={菜單=-84..-75}] actionbar 菜單啟動(dòng)中..
title @a[scores={菜單=-74..-60}] actionbar 菜單啟動(dòng)中...
#功能
execute as @a at @s align xyz positioned ~0.5~~1.5 run scoreboard players add @s[r=0.99,scores={菜單=4..,計(jì)時(shí)=..0}] "菜單" -3
execute as @a at @s align xyz positioned ~0.5~~-0.5 run scoreboard players add @s[r=0.99,scores={菜單=1..6,計(jì)時(shí)=..0}] "菜單" 3
execute as @a at @s align xyz positioned ~1.5~~0.5 run scoreboard players add @s[r=0.99,scores={菜單=2..,計(jì)時(shí)=..0}] "菜單" -1
execute as @a at @s align xyz positioned ~-0.5~~0.5 run scoreboard players add @s[r=0.99,scores={菜單=1..8,計(jì)時(shí)=..0}] "菜單" 1
execute as @a at @s align xyz positioned ~0.5~~0.5 run playsound random.orb @s[rm=0.01,scores={計(jì)時(shí)=..0}] ~~~ 2 1
execute as @a at @s align xyz positioned ~0.5~~0.5 run scoreboard players set @s[rm=0.01,scores={計(jì)時(shí)=..0}] "計(jì)時(shí)" 6
scoreboard players add @a[scores={計(jì)時(shí)=1..,菜單=1..}] "計(jì)時(shí)" -1
#第一排
execute as @a[scores={菜單=1}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run tp 0 -59.9 0
execute as @a[scores={菜單=1}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 回城成功
execute as @a[scores={菜單=2}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 購(gòu)買(mǎi)雞蛋x1
execute as @a[scores={菜單=3}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run summon zombie ~~5~
#第二排
execute as @a[scores={菜單=4}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 簽到成功
execute as @a[scores={菜單=5}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 等級(jí)不夠
execute as @a[scores={菜單=6}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 桀桀桀
#第三排
execute as @a[scores={菜單=7}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 金幣數(shù):233
execute as @a[scores={菜單=8}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 設(shè)置,啟動(dòng)!
execute as @a[scores={菜單=9}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run say 已退出
#結(jié)束
execute as @a[scores={菜單=1..}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run camera @s clear
execute as @a[scores={菜單=1..}] at @s align xyz positioned ~0.5~3~0.5 if entity @s[r=2.99] run scoreboard players set @s "菜單" -100
execute as @a[scores={菜單=1..}] at @s align xyz run tp ~0.5~~0.5 0 0
execute as @a[scores={菜單=1..}] at @s run camera @s set example:example_free ease 1 linear pos ~0.8~1~2.2 rot 0 180
#菜單顯示
titleraw @a[scores={菜單=1}] title {"rawtext":[{"text":"§f? ? ? ? ? §a主城§f? 商店? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=2}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? §a商店§f? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=3}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? §a試煉§f\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=4}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? §a簽到§f? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=5}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? 簽到? §a公會(huì)§f? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=6}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? §a喊話(huà)§f\n\n? ? ? ? ? 個(gè)人? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=7}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? §a個(gè)人§f? 設(shè)置? 退出"}]}
titleraw @a[scores={菜單=8}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? §a設(shè)置§f? 退出"}]}
titleraw @a[scores={菜單=9}] title {"rawtext":[{"text":"§f? ? ? ? ? 主城? 商店? 試煉\n\n? ? ? ? ? 簽到? 公會(huì)? 喊話(huà)\n\n? ? ? ? ? 個(gè)人? 設(shè)置? §a退出§f"}]}
#by 萌鯊無(wú)敵