Paste #66137: Untitled Paste

Date: 2020/03/14 01:51:00 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


zoom:
  debug: false
  type: command
  name: zoom
  description: zoom
  usage: /zoom
  #permission:
  aliases:
  - z
  script:
  - if <context.args.is_empty>:
    - if <player.flag[zoom]||null> == null:
      - flag player zoom:default
      - while <player.flag[zoom]||null> == default:
        - adjust <player> potion_effects:SLOW,6,99999,false,false,false
        - actionbar '<&e><&l>Zoom<&f><&l>: <&a><&l>100% <&7>/z to toggle'
        - wait 1s
    - else:
      - adjust <player> remove_effects
      - actionbar <&r>
      - flag player zoom:!
  - foreach 1|2|3|4|5 as:mode:
    - if <context.raw_args> == <[mode]>:
      - flag player zoom:<[mode]>
      - while <player.flag[zoom]||null> == <[mode]>:
        - adjust <player> remove_effects
        - adjust <player> potion_effects:SLOW,<[mode].mul[1.2]>,99999,false,false,false
        - actionbar '<&e><&l>Zoom<&f><&l>: <&a><&l><[mode].mul[2]>0% <&7>/z to toggle'
        - wait 1s