Date: 2020/06/01 14:15:45 UTC-07:00
Type: Denizen Script
JetpackFuel:
Type: world
Debug: true
Events:
on player starts sneaking:
- if <player.equipment.chestplate.nbt[customnbt]||null> == <mythic_item[mark_1_jetpack].nbt[customnbt]> && <player.item_in_hand.nbt[customnbt]||null> == <mythic_item[grade_1_fuel].nbt[customnbt]>:
- if <player.has_flag[hasbossbar]>:
- bossbar update 1 color:<list[green|yellow|red].get[<player.item_in_hand.nbt[fuelcount].mul[3].round_up>]>
- else:
- bossbar 1 players:<player> title:<&c>Fuel<&sp>Remaining color:green
- flag player hasbossbar
- inventory adjust slot:<player.held_item_slot> nbt:fuelcount/<player.item_in_hand.nbt[fuelcount].sub[0.1]>
- if <player.item_in_hand.nbt[fuelcount]||null> < 0:
- take iteminhand quantity:1
- flag player hasbossbar:!
- bossbar remove 1 players:<player>
- give bucket quantity:1 slot:<player.held_item_slot>
- narrate "Thanks for flying ryan air"