# Scenes

A GUI can have multiple "scenes" to create animations or timed transitions. Scenes cycle through in order, each after its specified delay.

```yaml
codescenes:
  '0':
    delay: 0
    items:
      '1':
        slot: 13
        item: DIAMOND_SWORD
        amount: 1
        item-name: "&bEpic Sword"
        item-lore:
          - "&7Powerful blade"
        item-flags: [all]
        unbreakable: false
        custom-model-data: 123
        # conditions and click-events here
```

* Scenes are indexed by strings (`'0'`, `'1'`, etc.).
* `delay`: Time in ticks after previous scene before showing this scene. 20 ticks = 1 second.
* `items`: Defines GUI slots and their contents.

<figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FmelHNu2gWXS39BBQ5SyP%2Fminishowcase.gif?alt=media&#x26;token=2c4a1d4d-ad9d-47f9-afc1-adae0b97d393" alt=""><figcaption><p>Quick Scene Example</p></figcaption></figure>

<div><figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2Ffygy1NzjmWTij02WZ6oV%2Fscene1.png?alt=media&#x26;token=b64d27fa-0315-4947-b1a6-df9abc3aead8" alt=""><figcaption><p>Scene 0</p></figcaption></figure> <figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FVVfuYPgHMJ6rkZuXJspF%2Fscene2.png?alt=media&#x26;token=6c25cc1e-e8ae-44ba-a144-445e8b065cf2" alt=""><figcaption><p>Scene 1</p></figcaption></figure> <figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2Fdb4BQX2QSghC8NwEwoj4%2Fscene3.png?alt=media&#x26;token=b970f364-85c4-4492-b06d-3ac810be4240" alt=""><figcaption><p>Scene 2</p></figcaption></figure> <figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FsETchOFGvV4FWteLHsKx%2Fscene4.png?alt=media&#x26;token=682c4963-1634-4b03-b1ab-89c79be12824" alt=""><figcaption><p>Scene 3</p></figcaption></figure></div>

<figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FxqCkP4QQuhjWfrzcxYxo%2FScreenshot_3.png?alt=media&#x26;token=6e0cafeb-cfef-4623-bf3a-64c20c81a843" alt=""><figcaption><p>Scene Menu</p></figcaption></figure>

Scenes also allow for an additional action to be made with the Event Manager.

<figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FXIToi5aegj5DzM5EJr4t%2F%7B692389A1-114C-4844-A954-AA4E110D33BE%7D.png?alt=media&#x26;token=82cc4965-08dd-4c1d-9c1d-62bd985cd333" alt=""><figcaption></figcaption></figure>

With the Event Manager, you are able to set up numerous events such as:

* Message Player
* Run a command for the Player
* Send a title to player
* Close Open Inventory
* Give Money
* Remove Money
* Set Money
* Chat Fetcher
* Player Picker Command Executor (with an ability to attach a command)
* Give custom item to player
* Save information per player
* Offline Player Picker Command Executor (with an ability to attach a command)

A perfect example is Run a command for the player, where the scenes feature makes opening any menu (in our example a shop menu) extraordinary.

<div data-full-width="true"><figure><img src="https://68941692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY5GIjG4eZ0A7OJ93YeYo%2Fuploads%2FHCH0JDQYX4naSDCpbjZC%2Fshop.gif?alt=media&#x26;token=b4af8ea4-e8e1-4127-8aec-8c8eb527944e" alt=""><figcaption></figcaption></figure></div>
