Paste #28400: Kit GUI Script

Date: 2016/01/13 19:16:05 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


kit_menu:
    type: inventory
    debug: false
    title: <&2>Kit Selection
    size: 36
    slots:
    - "[kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge]"
    - "[kit_menu_edge] [kit_menu_edge] [kit_menu_slot1] [kit_menu_slot10] [kit_menu_slot11] [kit_menu_slot12] [kit_menu_slot2] [kit_menu_edge] [kit_menu_edge]"
    - "[kit_menu_edge] [kit_menu_slot3] [kit_menu_slot4] [kit_menu_slot5] [kit_menu_slot6] [kit_menu_slot7] [kit_menu_slot8] [kit_menu_slot9] [kit_menu_edge]"
    - "[kit_menu_exit] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_edge] [kit_menu_exit]"

kit_menu_slot1:
    type: item
    debug: false
    material: leather_chestplate
    display name: <&8>[<&7>Peasant<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[defaultcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.peasant]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot2:
    type: item
    debug: false
    material: i@tripwire_hook[flags=hide_enchants]
    display name: <&6>Weekly Key
    enchantments:
    - DURABILITY:3
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[weeklykeycooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.weeklykey]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot3:
    type: item
    debug: false
    material: i@tripwire_hook[flags=hide_enchants]
    display name: <&2>Donor Key
    enchantments:
    - DURABILITY:3
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[donorkeycooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.donorkey]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot4:
    type: item
    debug: false
    material: nether_star
    display name: <&8>[<&e>Sponsor<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[sponsorcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.sponsor]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot5:
    type: item
    debug: false
    material: gold_ingot
    display name: <&8>[<&6>Gold<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[goldcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.gold]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot6:
    type: item
    debug: false
    material: diamond
    display name: <&8>[<&b>Diamond<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[diamondcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.diamond]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot7:
    type: item
    debug: false
    material: emerald
    display name: <&8>[<&a>Emerald<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[emeraldcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.emerald]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot8:
    type: item
    debug: false
    material: dragon_egg
    display name: <&8>[<&d>Legend<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[legendcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.legend]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot9:
    type: item
    debug: false
    material: ender_chest
    display name: <&8>[<&3>Mythical<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[mythicalcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.mythical]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot10:
    type: item
    debug: false
    material: chainmail_chestplate
    display name: <&8>[<&7>Adventurer<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[adventurercooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.adventurer]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot11:
    type: item
    debug: false
    material: iron_chestplate
    display name: <&8>[<&7>Warrior<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[warriorcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.warrior]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_slot12:
    type: item
    debug: false
    material: diamond_chestplate
    display name: <&8>[<&7>Gladiator<&8>] <&7>Kit
    lore:
    - "<&8><&l>> <&7>Cooldown<&8>: <&e><player.flag[gladiatorcooldown].expiration.formatted>"
    - "<&8><&l>> <&7>Status<&8>: <tern[<player.has_permission[essentials.kits.gladiator]>]:<&a><&l>UNLOCKED||<&c><&l>LOCKED>"

kit_menu_exit:
    type: item
    debug: false
    material: stained_glass_pane:14
    display name: <&c>Exit
    lore:
    - "<&8><&l>> <&7>Click me to exit!"

kit_menu_edge:
    type: item
    debug: false
    material: stained_glass_pane
    display name: <&c>

kit_menu_handler:
    type: world
    debug: false
    events:
        on player clicks in kit_menu:
        - determine cancelled
        on player drags on kit_menu:
        - determine cancelled
        on player clicks kit_menu_exit in kit_menu:
        - inventory close d:in@kit_menu
        on player clicks kit_menu_slot1 in kit_menu:
        - if <player.has_permission[essentials.kits.peasant]> && <player.has_flag[defaultcooldown].not> {
          - flag player defaultcooldown duration:1h
          - execute as_server "ekit Peasant <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[defaultcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[defaultcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot2 in kit_menu:
        - if <player.has_permission[essentials.kits.weeklykey]> && <player.has_flag[weeklykeycooldown].not> {
          - flag player weeklykeycooldown duration:7d
          - execute as_server "ekit WeeklyKey <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[weeklykeycooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[weeklykeycooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot3 in kit_menu:
        - if <player.has_permission[essentials.kits.donorkey]> && <player.has_flag[donorkeycooldown].not> {
          - flag player donorkeycooldown duration:3d
          - execute as_server "ekit DonorKey <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[donorkeycooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[donorkeycooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot4 in kit_menu:
        - if <player.has_permission[essentials.kits.sponsor]> && <player.has_flag[sponsorcooldown].not> {
          - flag player sponsorcooldown duration:1d
          - execute as_server "ekit Sponsor <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[sponsorcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[sponsorcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot5 in kit_menu:
        - if <player.has_permission[essentials.kits.gold]> && <player.has_flag[goldcooldown].not> {
          - flag player goldcooldown duration:1d
          - execute as_server "ekit Gold <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[goldcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[goldcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot6 in kit_menu:
        - if <player.has_permission[essentials.kits.diamond]> && <player.has_flag[diamondcooldown].not> {
          - flag player diamondcooldown duration:2d
          - execute as_server "ekit Diamond <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[diamondcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[diamondcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot7 in kit_menu:
        - if <player.has_permission[essentials.kits.emerald]> && <player.has_flag[emeraldcooldown].not> {
          - flag player emeraldcooldown duration:3d
          - execute as_server "ekit Emerald <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[emeraldcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[emeraldcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot8 in kit_menu:
        - if <player.has_permission[essentials.kits.legend]> && <player.has_flag[legendcooldown].not> {
          - flag player legendcooldown duration:3d
          - execute as_server "ekit Legend <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[legendcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[legendcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot9 in kit_menu:
        - if <player.has_permission[essentials.kits.mythical]> && <player.has_flag[mythicalcooldown].not> {
          - flag player mythicalcooldown duration:5d
          - execute as_server "ekit Mythical <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[mythicalcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[mythicalcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot10 in kit_menu:
        - if <player.has_permission[essentials.kits.adventurer]> && <player.has_flag[adventurercooldown].not> {
          - flag player adventurercooldown duration:1d
          - execute as_server "ekit Adventurer <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[adventurercooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[adventurercooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot11 in kit_menu:
        - if <player.has_permission[essentials.kits.warrior]> && <player.has_flag[warriorcooldown].not> {
          - flag player warriorcooldown duration:1d
          - execute as_server "ekit Warrior <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[warriorcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[warriorcooldown].expiration.formatted> left]"
        }
        on player clicks kit_menu_slot12 in kit_menu:
        - if <player.has_permission[essentials.kits.gladiator]> && <player.has_flag[gladiatorcooldown].not> {
          - flag player gladiatorcooldown duration:1d
          - execute as_server "ekit Gladiator <player.name>"
        } else {
          - narrate "<&c>Error: You do not have access for this kit."
        - if <player.has_flag[gladiatorcooldown]> {
          - narrate "<&c>Error: You must wait before using this kit again. [<player.flag[gladiatorcooldown].expiration.formatted> left]"
        }

kit_command:
    type: command
    debug: false
    name: kit
    description: Select a kit!
    usage: /kit
    aliases:
    - kits
    script:
    - inventory open d:in@kit_menu