buy_particle_close.mcfunction 949 B

123456789101112
  1. # 粒子系统关闭 (0 eb)
  2. # 触发器ID 101
  3. execute unless entity @s[scores={shop_particle_s=0..}] run scoreboard players set @s shop_particle_s 0
  4. tag @s remove canbuy
  5. tag @s[scores={shop_particle_s=1..},tag=particle] add canbuy
  6. tellraw @s[scores={shop_particle_s=1..},tag=particle] ["",{"text":">> ","color":"aqua","bold":true},{"text":"成功关闭 ","color":"aqua"},{"text":"粒子系统","color":"green"}]
  7. tellraw @s[scores={shop_particle_s=1..},tag=!particle] ["",{"text":">> ","color":"aqua","bold":true},{"text":"你已经关闭了 ","color":"aqua"},{"text":"粒子系统","color":"green"}]
  8. tellraw @s[scores={shop_particle_s=0}] ["",{"text":">> ","color":"red","bold":true},{"text":"你需要先购买粒子效果系统!","color":"red"}]
  9. execute as @s[tag=!canbuy] at @s run function lib:sounds/error
  10. execute as @s[tag=canbuy] at @s run function lib:sounds/levelup
  11. execute as @s[tag=canbuy] run tag @s remove particle
  12. tag @s remove canbuy