Traveler | Platformer

Instructions: DOUBLE CLICK FLAG!!! or enjoy lag\nA classic platformer.\nYou need to save the village from the volcano,\nIt's surprisingly easy. Buy things from the desert shop!\nCollect the numbers!\nYou get 1 mana every 10 seconds or level finished

@Stage\n\nwhen flag clicked\nswitch backdrop to (blue sky 2  v)\nwait until <([costume # v] of [ground v]) = [30]>\nswitch backdrop to (blue sky 2 2 v)\nwait until <([costume # v] of [ground v]) = [35]>\nswitch backdrop to (blue sky 2 3 v)\n\nwhen I receive [game done v]\nswitch backdrop to (blue sky 2  v)\n\n@Ground\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [start v]\nswitch costume to (level 1 v)\nshow\n\nwhen flag clicked\nwait until <(costume [number v]) = [16]>\nbroadcast (Desert v)\nwait until <(costume [number v]) = [22]>\nbroadcast (Desert village v)\n\nwait until <(costume [number v]) = [22]>\nbroadcast (Desert village v)\n\nwhen I receive [game done v]\nbroadcast (next v)\n\n@Player\n\nwhen flag clicked\nswitch costume to (black v)\nhide\n\nwhen I receive [start v]\nset size to (80) %\nshow\ngo to x: (-190) y: (0)\nset [x v] to [0]\nset [y v] to [0]\ngo to [front v] layer\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (0.7)\n        switch costume to (right arrow v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-0.7)\n        switch costume to (right arrow2 v)\n    end\n    if <<(Power 2) = [1]> and <key (2 v) pressed?>> then\n        set [x v] to ((x) * (0.95))\n    else\n        set [x v] to ((x) * (0.9))\n    end\n    change x by (x)\n    if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n        change y by (1)\n        if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n            change y by (1)\n            if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                change y by (1)\n                if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                    change y by (1)\n                    if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                        change y by (1)\n                        if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                            change y by (1)\n                            if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                                change y by (1)\n                                if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n                                    change x by ((x) * (-1))\n                                    change y by (-7)\n                                    if <key (up arrow v) pressed?> then\n                                        if <(x) > [0]> then\n                                            set [x v] to [-4]\n                                        else\n                                            set [x v] to [4]\n                                        end\n                                        set [y v] to [8]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [13]\n        end\n        if <<(Power 1) = [1]> and <key (1 v) pressed?>> then\n            if <<(Mana) > [1]> or <(Mana) = [1]>> then\n                set [y v] to [20]\n                change [mana v] by (-1)\n            end\n        end\n    end\n    change y by (1)\n    if <key (down arrow v) pressed?> then\n    if <key (up arrow v) pressed?> then\n        change [y v] by (-0.7)\n        if <<touching color (#afeaff)?> or <touching color (#99e3ff)?>> then\n            change [y v] by (1)\n        end\n    else\n        change [y v] by (-1)\n        if <<touching color (#afeaff)?> or <touching color (#99e3ff)?>> then\n            change [y v] by (1)\n        end\n    end\n    set [y v] to ((y) * (1))\n    change y by (y)\n    if <<touching color (#b0f68d)?> or <<touching color (#7de55a)?> or <<touching color (#54c836)?> or <<touching color (#d49560)?> or <<touching color (#c08656)?> or <<touching color (#c08656)?> or <<touching color (#fff300)?> or <<touching color (#d8cf31)?> or <<touching color (#baa74a)?> or <<touching color (#bbb54a)?> or <<touching color (#ba9b00)?> or <<touching color (#947b00)?> or <touching color (#350000)?>>>>>>>>>>>>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <<touching color (#afeaff)?> or <touching color (#99e3ff)?>> then\n        change [y v] by (0.5)\n        if <(y) < [-2]> then\n            set [y v] to [-2]\n            change [y v] by (0.1)\n        end\n    end\n    if <<touching color (#afeaff)?> or <touching color (#99e3ff)?>> then\n        if <key (up arrow v) pressed?> then\n            change [y v] by (-0.1)\n        end\n    end\n    if <<touching color (#afeaff)?> or <touching color (#99e3ff)?>> then\n        if <key (down arrow v) pressed?> then\n            change [y v] by (-1.5)\n        end\n    end\n    if <<[-178] > (y position)> and <not <([costume # v] of [ground v]) = [34]>>> then\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [1]\n        broadcast (dadeath v)\n    else\n        if <<([costume # v] of [ground v]) = [34]> and <[-178] > (y position)>> then\n            go to x: (-190) y: (190)\n            set [x v] to [0]\n            set [y v] to [1]\n            broadcast (next v)\n        end\n    end\n    if <(x position) > [238]> then\n        broadcast (next v)\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <<touching color (#ff4444)?> or <touching color (#ff7979)?>> then\n        broadcast (dadeath v)\n        start sound [Bonk v]\n        glide (0.5) secs to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <<touching color (#a8d7ff)?> and <touching (powers v)?>> then\n        set [power 1 v] to [1]\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        broadcast (next v)\n        start sound [Collect v]\n    end\n    if <<touching color (#f5a59a)?> and <touching (powers v)?>> then\n        set [power 2 v] to [1]\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        start sound [Collect v]\n        broadcast (next v)\n    end\n    if <<touching color (#a5fda6)?> and <touching (powers v)?>> then\n        set [power 3 v] to [1]\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        start sound [Collect v]\n        broadcast (next v)\n    end\n    if <<touching color (#8e7700)?> and <touching (ground v)?>> then\n        broadcast (Open da shop v)\n        go to x: (-190) y: (0)\n        set [x v] to [0]\n        set [y v] to [0]\n    end\nend\n\nwhen flag clicked\nset [power 1 v] to [0]\nset [power 2 v] to [0]\nset [power 3 v] to [0]\n\nwhen flag clicked\nplay sound [Collect v] until done\nstart sound [Collect v]\nwait (1) seconds\nstart sound [Pop v]\n\nwhen I receive [start v]\nforever\n    play sound [Elektronomia - Sky High \[NCS Release\].mp3 v] until done\nend\n\nstop all sounds\n\nstop all sounds\n\nset [power 1 v] to [1]\n\nset [power 2 v] to [1]\n\nwhen flag clicked\nset [score v] to [0]\n\nwhen I receive [dadeath v]\nif <not <([costume # v] of [ground v]) = [22]>> then\n    change [score v] by (-1)\n    hide\n    wait (0.2) seconds\n    show\nend\n\nwhen I receive [close da shop v]\ngo to x: (-190) y: (0)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nswitch costume to (black v)\n\nwhen [s v] key pressed\nswitch costume to (black v)\n\nwhen [o v] key pressed\nif <(Can youchangeskintoorange) = [1]> then\n    switch costume to (orange v)\nend\n\nwhen [b v] key pressed\nif <(Canyouchangeskintoblue) = [1]> then\n    switch costume to (blue v)\nend\n\nbroadcast (next v)\n\nwhen I receive [open da shop v]\nhide\n\nwhen I receive [close da shop v]\nshow\n\nset [power 2 v] to [1]\nbroadcast (next v)\n\nwhen [3 v] key pressed\nif <<(Power 3) = [1]> and <(Mana) > [1.9]>> then\n    change [mana v] by (-2)\n    set size to (30) %\n    wait (5) seconds\n    set size to (80) %\n    wait (1) seconds\n    if <<touching color (#fff300)?> or <touching color (#350000)?>> then\n        go to x: (-180) y: (0)\n    end\nend\n\nwhen I receive [next v]\nchange [score v] by (10)\n\n@Water+Lava\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to ([costume # v] of [ground v])\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (10)\n        change y by (-1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\nend\n\n@Water+Lava: Layer\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to ([costume # v] of [ground v])\nend\n\nwhen flag clicked\nwait (1) seconds\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (10)\n        change y by (-1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\nend\n\n@Intro\n\nwhen flag clicked\nhide\nwait (2) seconds\nshow\nswitch costume to (1 v)\nwait (1) seconds\nrepeat (6)\n    next costume\nend\nwait (1) seconds\nrepeat (6)\n    next costume\nend\nwait (1) seconds\nstart sound [Throw v]\nrepeat (9)\n    next costume\nend\nrepeat (4)\n    wait (0.1) seconds\n    next costume\nend\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1) seconds\nrepeat (3)\n    wait (0.1) seconds\n    next costume\nend\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1) seconds\nnext costume\nhide\nbroadcast (Start v)\n\n@Powers\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <([costume name v] of [ground v]) = [Level 7]> then\n        go to x: (6) y: (132)\n        switch costume to (costume1 v)\n        show\n    else\n        if <([costume name v] of [ground v]) = [Level 14]> then\n            go to x: (178) y: (121)\n            go to [front v] layer\n            switch costume to (costume2 v)\n            show\n        else\n            if <([costume name v] of [ground v]) = [Level 24]> then\n                go to x: (100) y: (135)\n                switch costume to (costume3 v)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    repeat (10)\n        turn right (15) degrees\n    end\n    wait (0) seconds\n    repeat (10)\n        turn right (-15) degrees\n    end\n    wait (0) seconds\n    if <touching (player v)?> then\n        hide\n    end\nend\n\ngo to x: (100) y: (135)\n\n@Powers:layer\n\nwhen flag clicked\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <([costume name v] of [ground v]) = [Level 7]> then\n        go to x: (6) y: (132)\n        switch costume to (costume1 v)\n        show\n    else\n        if <([costume name v] of [ground v]) = [Level 14]> then\n            go to x: (178) y: (121)\n            switch costume to (costume2 v)\n            show\n        else\n            if <([costume name v] of [ground v]) = [Level 24]> then\n                go to x: (100) y: (135)\n                switch costume to (costume3 v)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nwait (1) seconds\nforever\n    repeat (10)\n        turn right (15) degrees\n    end\n    wait (0) seconds\n    repeat (10)\n        turn right (-15) degrees\n    end\n    wait (0) seconds\n    if <touching (player v)?> then\n        hide\n    end\nend\n\n@Info\n\nwhen flag clicked\nhide\nforever\n    if <([costume name v] of [ground v]) = [Level 7]> then\n        go to [front v] layer\n        go to x: (-150) y: (50)\n        switch costume to (costume1 v)\n        show\n        wait (3) seconds\n        switch costume to (costume2 v)\n        wait (2) seconds\n        hide\n        stop [this script v]\n    end\nend\n\nhide\n\nwhen flag clicked\nhide\nforever\n    if <([costume name v] of [ground v]) = [Level 14]> then\n        go to [front v] layer\n        go to x: (18) y: (42)\n        switch costume to (costume3 v)\n        show\n        wait (3) seconds\n        switch costume to (costume4 v)\n        wait (2) seconds\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <([costume name v] of [ground v]) = [Level 24]> then\n        go to [front v] layer\n        go to x: (18) y: (42)\n        switch costume to (costume5 v)\n        show\n        wait (3) seconds\n        switch costume to (costume6 v)\n        wait (2) seconds\n        hide\n        stop [this script v]\n    end\nend\n\n@Mana\n\nwhen flag clicked\nset [mana v] to [0]\nhide\nwait until <(Power 1) = [1]>\nset [mana v] to [1]\nshow\n\nwhen flag clicked\nset [manamax v] to [10]\nforever\n    wait (7) seconds\n    change [mana v] by (1)\n    if <(Mana) > ((Manamax) + (0.1))> then\n        start sound [Collect v]\n        broadcast (Cap reached! v)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to ((Mana) + (1))\n    if <(Mana) > (Manamax)> then\n        set [mana v] to (Manamax)\n    end\nend\n\nwhen I receive [next v]\nchange [mana v] by (1)\nstart sound [switch-sound v]\n\nwhen I receive [game done v]\nhide\n\n@Floatingsinetext\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nswitch costume to (1 v)\nshow\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [next v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nset [sine v] to [0]\npoint in direction (90)\nrepeat (400)\n    go to [front v] layer\n    show\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\nend\nhide\nset [sine v] to [0]\npoint in direction (90)\n\nwhen I receive [desert v]\nset [ghost v] effect to (0)\nswitch costume to (2 v)\nshow\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [desert v]\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nset [sine v] to [0]\npoint in direction (90)\nrepeat (400)\n    go to [front v] layer\n    show\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\nend\nhide\nset [sine v] to [0]\npoint in direction (90)\n\nwhen I receive [desert village v]\nset [ghost v] effect to (0)\nswitch costume to (3 v)\nshow\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [desert village v]\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nset [sine v] to [0]\npoint in direction (90)\nrepeat (400)\n    go to [front v] layer\n    show\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\nend\nhide\nset [sine v] to [0]\npoint in direction (90)\n\nwhen I receive [game done v]\nset [ghost v] effect to (0)\nswitch costume to (4 v)\nshow\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [game done v]\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nset [sine v] to [0]\npoint in direction (90)\nrepeat (400)\n    go to [front v] layer\n    show\n    change [sine v] by (7.5)\n    point in direction ((([sin v] of (sine) ) * (15)) + (90))\nend\nhide\nset [sine v] to [0]\npoint in direction (90)\n\n@Shopmenu\n\nwhen I receive [close da shop v]\nhide variable [score v]\nhide\n\nwhen I receive [open da shop v]\nshow variable [score v]\nshow\n\n@Buy button1\n\nwhen I receive [close da shop v]\nhide\n\nwhen I receive [open da shop v]\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nif <(Score) > [9.99]> then\n    start sound [pop v]\n    change [score v] by (-10)\n    change [manamax v] by (1)\nend\n\nbroadcast (next v)\n\n@Buy button3\n\nwhen I receive [open da shop v]\ngo to [front v] layer\nif <(Orangebought?) = [0]> then\n    show\nend\n\nwhen I receive [close da shop v]\nhide\n\nwhen this sprite clicked\nif <(Score) > [19.99]> then\n    change [score v] by (-20)\n    set [can youchangeskintoorange v] to [1]\n    start sound [pop v]\n    set [orangebought? v] to [1]\n    hide\nend\n\nwhen flag clicked\nset [orangebought? v] to [0]\n\n@Buy button 2\n\nwhen I receive [close da shop v]\nhide\n\nwhen I receive [open da shop v]\ngo to [front v] layer\nif <(Bluebought?) = [0]> then\n    show\nend\n\nwhen this sprite clicked\nif <(Score) > [9.99]> then\n    start sound [pop v]\n    change [score v] by (-10)\n    set [canyouchangeskintoblue v] to [1]\n    set [bluebought? v] to [1]\n    hide\nend\n\nwhen flag clicked\nset [can youchangeskintoorange v] to [0]\nset [canyouchangeskintoblue v] to [0]\nset [bluebought? v] to [0]\n\n@Exitbutton\n\nwhen I receive [open da shop v]\ngo to [front v] layer\nshow\n\nwhen I receive [close da shop v]\nhide\n\nwhen this sprite clicked\nbroadcast (Close da shop v)\n\n@Spriteyeet\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (pick random (50) to (100))\n    if <(Mana) = [31]> then\n        set [color v] effect to (pick random (1) to (1000))\n        point in direction (pick random (1) to (1000))\n        go to x: (-165) y: (144)\n        change x by (pick random (-20) to (20))\n        change y by (pick random (-20) to (20))\n        wait (1) seconds\n        switch costume to (pick random (1) to (5))\n        show\n        wait (0.1) seconds\n        hide\n    end\nend\n\nchange x by (10)\n\n@Spriteteet111\n\nwhen flag clicked\nhide\nwait until <([costume # v] of [ground v]) = [30]>\nrepeat until <([costume # v] of [ground v]) > [34]>\n    go to [back v] layer\n    go to (random position v)\n    change y by (40)\n    set y to (40)\n    point in direction (pick random (90) to (95))\n    wait (pick random (2) to (3)) seconds\n    broadcast (Lightning v)\n    show\n    wait (0.1) seconds\n    hide\nend\n\n@lightning effect\n\nwhen I receive [lightning v]\ngo to [back v] layer\nshow\nwait (0.1) seconds\nhide\n\nwhen flag clicked\nhide\n\n@Eruption\n\nwhen flag clicked\nhide\nwait until <([costume # v] of [ground v]) = [36]>\nshow\ngo to [back v] layer\nswitch costume to (costume1 v)\nrepeat until <touching (block v)?>\n    repeat (16)\n        next costume\n        wait (0.05) seconds\n    end\n    switch costume to (costume1 v)\nend\nhide\n\nwhen flag clicked\nforever\n    if <touching (block v)?> then\n        hide\n        stop [other scripts in sprite v]\n        broadcast (Game done v)\n        stop [this script v]\n    end\nend\n\n@Block\n\nwhen flag clicked\nhide\nwait until <([costume # v] of [ground v]) = [36]>\nshow\nset drag mode [draggable v]\ngo to x: (-12) y: (-29)\n\nwhen I receive [game done v]\nhide\n\n@TN\n\nwhen flag clicked\nhide\n\n