Paste #77524: Untitled Paste

Date: 2020/11/13 11:42:18 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


###########
## ITEMS ##
###########
profile_item:
    type: item
    material: player_head[skull_skin=<player.skull_skin>]
    mechanisms:
        nbt: profile/true
    display name: <&b>Your Profile <&7>(Right-Click)
    lore:
        - <&3>Manage or settings your profile
soon:
    type: item
    material: barrier
    display name: <&c>Comingsoon..
settings:
    type: item
    material: COMPARATOR
    display name: <&f><&l>Settings
    lore:
        - <&7>Click here to settings
notification:
    type: item
    material: bell
    display name: <&f><&l>Notification
    lore:
        - <&7>Click here to settings

############
## EVENTS ##
############
profile_inventory:
    type: world
    debug: false
    events:
        on player joins:
            - take scriptname:profile_item quantity:1 slot:9
            - give profile_item quantity:1 slot:9
        on player clicks profile_item in inventory:
            - determine passively cancelled
            - wait 1t
            - ratelimit <player> 1t
            - run profile_task
        on player right clicks block with:profile_item:
            - determine passively cancelled
            - wait 1t
            - run profile_task
        on entity damaged by player with:profile_item:
            - determine cancelled
        on player drops profile_item:
            - determine cancelled
        on player swaps items offhand:profile_item:
            - determine cancelled
        on player clicks in profile_gui:
            - determine cancelled

        # Open: Notification Menu
        on player clicks notification in profile_gui:
            - inventory open destination:notification_gui
        on player clicks settings in profile_gui:
            - inventory open destination:gui_setting

###########
## TASKS ##
###########
profile_task:
    type: task
    debug: false
    script:
        - inventory open d:profile_gui
        - playsound <player> sound:BLOCK_LEVER_CLICK pitch:1.2
#########
## GUI ##
#########
profile_gui:
    type: inventory
    inventory: CHEST
    title: <player.name>'s Profile
    size: 45
    slots:
        - [] [] [] [] [] [] [] [] []
        - [] [notification] [] [] [settings] [] [] [soon] []
        - [] [] [] [] [] [] [] [] []
        - [] [soon] [] [] [soon] [] [] [soon] []
        - [] [] [] [] [] [] [] [] []