Sky Jump! [Platformer]

Instructions: -----Instructions-------------------------------------------------------\nUse arrow keys or wasd to move or space key to jump.\n\n----- Recent Update--------------------------------------------------\n\nLowered prices in shop\n\n-----Future updates---------------------------------------------------\n\nMore levels \nmore items and/or power-ups

@Stage\n\nwhen flag clicked\nset [music v] to [1]\nset [volume v] to [20]\n\nwhen flag clicked\nshow variable [volume v]\nforever\n    set volume to (Volume) %\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [1]> then\n        stop all sounds\n        play sound [Vexento - Happy Robot v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [2]> then\n        stop all sounds\n        play sound [Vexento - Floating With You v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [0]> then\n        stop all sounds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [3]> then\n        stop all sounds\n        play sound [Xaf - Inferno v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [4]> then\n        stop all sounds\n        play sound [Xaf - Sunshine v] until done\n    end\nend\n\n@less lag\n\n@Player\n\nwhen flag clicked\nforever\n    change [yv v] by (-1)\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    set [xv v] to ((XV) * (0.9))\n    change x by (XV)\n    if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n        change y by (1)\n        if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n            change y by (1)\n            if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n                change y by (1)\n                if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n                    change y by (1)\n                    if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n                        change y by (1)\n                    end\n                end\n            end\n        end\n    end\n    if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n        change y by (-5)\n        change x by ((XV) * (-1))\n        set [xv v] to [0]\n    end\n    change y by (YV)\n    if <<<touching (levels v)?> or <touching (breakaway platform v)?>> or <touching (moving platform v)?>> then\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n        if <<touching (levels v)?> or <<touching (breakaway platform v)?> or <touching (moving platform v)?>>> then\n            set [yv v] to [15]\n            switch costume to (player ^ v)\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [184]> then\n        change [level v] by (1)\n        set y to (-160)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [-182]> then\n        set y to (160)\n        change [level v] by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(HP) = [0]> then\n        broadcast (Game over v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (damage  v)?> then\n        broadcast (Dmg v)\n        change [hp v] by (-1)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (heart v)?> then\n        change [hp v] by (1)\n        play sound [pop v] until done\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nset [hp v] to [3]\nset [level v] to [1]\nset [money v] to [0]\nshow variable [level v]\nshow variable [money v]\nhide variable [accessories v]\nhide variable [body color v]\nhide variable [a v]\nshow variable [music v]\nswitch backdrop to (backdrop1 v)\nswitch costume to (player v)\nset size to (100) %\ngo to x: (0) y: (-120)\nset [xv v] to [0]\nset [yv v] to [0]\nshow\n\nwhen flag clicked\nforever\n    if <touching (coin v)?> then\n        change [money v] by (1)\n        play sound [magic spell v] until done\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [invincibility v]\nforever\n    if <(lasts for) < [60]> then\n        if <touching (damage  v)?> then\n            broadcast (Inv v)\n            change [hp v] by (1)\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (player >>> v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (player <<< v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (right arrow v) pressed?> and <key (up arrow v) pressed?>> or <<key (d v) pressed?> and <key (w v) pressed?>>> then\n        switch costume to (player >>> ^ v)\n    end\n    if <<<key (left arrow v) pressed?> and <key (up arrow v) pressed?>> or <<key (a v) pressed?> and <key (w v) pressed?>>> then\n        switch costume to (player <<< ^ v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<(YV) < [0]> and <key (right arrow v) pressed?>> or <<(YV) < [0]> and <key (d v) pressed?>>> then\n        switch costume to (player >>> v v)\n    end\n    if <<<(YV) < [0]> and <key (left arrow v) pressed?>> or <<(YV) < [0]> and <key (a v) pressed?>>> then\n        switch costume to (player <<< v v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<<(YV) < [0]> and <not <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> or <key (down arrow v) pressed?>> or <key (s v) pressed?>> then\n        switch costume to (player v v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(YV) = [0]> and <not <<<<key (left arrow v) pressed?> or <<key (right arrow v) pressed?> or <key (up arrow v) pressed?>>> or <key (down arrow v) pressed?>> or <<<<<key (space v) pressed?> or <key (w v) pressed?>> or <key (a v) pressed?>> or <key (d v) pressed?>> or <key (s v) pressed?>>>>> then\n        switch costume to (player v)\n    end\nend\n\nwhen flag clicked\nforever\n    set [color v] effect to (Body color)\nend\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\nwhen flag clicked\nforever\n    if <touching (breakaway hit v)?> then\n        broadcast (345 v)\n    end\n    wait until <not <touching (breakaway hit v)?>>\nend\n\n@Levels\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (level1 v)\nshow\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [1]> or <<(costume [number v]) = [2]> or <<(costume [number v]) = [4]> or >>> then\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nforever\n    if <<(costume [number v]) = [1]> or <<(costume [number v]) = [2]> or <<(costume [number v]) = [4]> or >>> then\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to (level)\n    switch backdrop to (level)\nend\n\n@Heart\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nforever\n    if <<(level) = [5]> or <<(level) = [7]> or <<(level) = [8]> or <<(level) = [10]> or <<(level) = []> or <<(level) = []> or <<(level) = []> or >>>>>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        go to x: (35) y: (-77)\n        show\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        go to x: (215) y: (0)\n        show\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\n@Coin\n\nwhen flag clicked\nhide\n\ngo to (random position v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nif <(level) = [1]> then\n    if <(pick random (1) to (6)) = [2]> then\n        forever\n            go to x: (60) y: (0)\n            show\n            if <not <(level) = [1]>> then\n                hide\n            end\n            if <touching (player v)?> then\n                hide\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        broadcast (2 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [2 v]\nhide\nif <(pick random (1) to (5)) = [2]> then\n    forever\n        go to x: (-55) y: (-5)\n        show\n        if <not <(level) = [2]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [3]> then\n        broadcast (3 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [3 v]\nhide\nif <(pick random (1) to (4)) = [2]> then\n    forever\n        go to x: (5) y: (70)\n        show\n        if <not <(level) = [3]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        broadcast (4 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [4 v]\nhide\nif <(pick random (1) to (4)) = [2]> then\n    forever\n        go to x: (-153) y: (15)\n        show\n        if <not <(level) = [4]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [5]> then\n        broadcast (5 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [5 v]\nhide\nif <(pick random (1) to (4)) = [2]> then\n    forever\n        go to x: (-63) y: (-133)\n        show\n        if <not <(level) = [5]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        broadcast (6 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [6 v]\nhide\nif <(pick random (1) to (4)) = [2]> then\n    forever\n        go to x: (213) y: (65)\n        show\n        if <not <(level) = [6]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        broadcast (7 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [7 v]\nhide\nif <(pick random (1) to (4)) = [2]> then\n    forever\n        go to x: (41) y: (60)\n        show\n        if <not <(level) = [7]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        broadcast (8 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [8 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (83) y: (-13)\n        show\n        if <not <(level) = [8]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        broadcast (9 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [9 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (-20) y: (-105)\n        show\n        if <not <(level) = [9]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        broadcast (10 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [10 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (115) y: (35)\n        show\n        if <not <(level) = [10]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [11 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (59) y: (-25)\n        show\n        if <not <(level) = [11]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        broadcast (11 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [12 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (68) y: (118)\n        show\n        if <not <(level) = [12]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        broadcast (12 v)\n        wait (30) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        broadcast (13 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [13 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (-205) y: (20)\n        show\n        if <not <(level) = [13]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [14 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (191) y: (29)\n        show\n        if <not <(level) = [14]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        broadcast (14 v)\n        wait (30) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        broadcast (15 v)\n        wait (30) seconds\n    end\nend\n\nwhen I receive [15 v]\nhide\nif <(pick random (1) to (3)) = [2]> then\n    forever\n        go to x: (191) y: (29)\n        show\n        if <not <(level) = [15]>> then\n            hide\n        end\n        if <touching (player v)?> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\n@ded\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nswitch costume to (ded v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nstop [all v]\n\nwhen I receive [dmg v]\nif <(lasts for) = [60]> then\n    switch costume to (dmg v)\n    show\n    wait (0.05) seconds\n    hide\nend\n\nwhen I receive [invincibility v]\nif <(lasts for) = [60]> then\n    set [lasts for v] to [60]\nend\nshow variable [lasts for v]\nrepeat (600)\n    change [lasts for v] by (-0.1)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset [lasts for v] to [60]\nhide variable [lasts for v]\n\nwhen I receive [inv v]\nif <(lasts for) < [60]> then\n    switch costume to (inv v)\n    show\n    wait (0.07) seconds\n    hide\nend\n\n@HP\n\nwhen flag clicked\nforever\n    if <(HP) = [1]> then\n        switch costume to (hp1 v)\n    end\n    if <(HP) = [2]> then\n        switch costume to (hp2 v)\n    end\n    if <(HP) = [3]> then\n        switch costume to (hp3 v)\n    end\n    if <(HP) = [4]> then\n        switch costume to (hp4 v)\n    end\n    if <(HP) = [5]> then\n        switch costume to (hp5 v)\n    end\n    if <(HP) = [6]> then\n        switch costume to (hp6 v)\n    end\n    if <(HP) = [7]> then\n        switch costume to (hp7 v)\n    end\n    if <(HP) = [8]> then\n        switch costume to (hp8 v)\n    end\n    if <(HP) = [9]> then\n        switch costume to (max hp9 v)\n    end\n    if <(HP) = [5]> then\n        if <(Max HP) = [5]> then\n            switch costume to (max hp5 v)\n        end\n    end\n    if <(HP) = [6]> then\n        if <(Max HP) = [6]> then\n            switch costume to (max hp6 v)\n        end\n    end\n    if <(HP) = [7]> then\n        if <(Max HP) = [7]> then\n            switch costume to (max hp7 v)\n        end\n    end\n    if <(HP) = [8]> then\n        if <(Max HP) = [8]> then\n            switch costume to (max hp8 v)\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (160) y: (170)\ngo to [front v] layer\nshow\n\nwhen flag clicked\nforever\n    if <(HP) > [9]> then\n        set [hp v] to [9]\n    end\nend\n\nwhen flag clicked\nset [max hp v] to [5]\n\nwhen flag clicked\nforever\n    if <(Max HP) = [8]> then\n        if <(HP) > [8]> then\n            set [hp v] to [8]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Max HP) = [7]> then\n        if <(HP) > [7]> then\n            set [hp v] to [7]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Max HP) = [6]> then\n        if <(HP) > [6]> then\n            set [hp v] to [6]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Max HP) = [5]> then\n        if <(HP) > [5]> then\n            set [hp v] to [5]\n        end\n    end\nend\n\nwhen I receive [open shop v]\nwait (0.1) seconds\ngo to [front v] layer\n\n@Breakaway platform\n\nwhen flag clicked\nswitch costume to (coin v)\nhide\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [2]> or <(costume [number v]) = [3]>> then\n        broadcast (hide B v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <<(level) = [4]> or <<(level) = [5]> or <<(level) = [6]> or <<(level) = [7]> or <<(level) = [8]> or <<(level) = []> or <<(level) = []> or <<(level) = []> or <<(level) = []> or <<(level) = []> or <<(level) = []> or <<(level) = []> or >>>>>>>>>>>>>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        go to x: (-145) y: (-120)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        go to x: (55) y: (-120)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        go to x: (60) y: (-40)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        go to x: (-20) y: (-120)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        go to x: (30) y: (-140)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        go to x: (-200) y: (-90)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        go to x: (0) y: (-65)\n        show\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [16]> then\n        show\n        go to x: (0) y: (60)\n        set x to (([sin v] of ((timer) * (100)) ) * (100))\n        if <(costume [number v]) = [1]> then\n            broadcast (show B v)\n        end\n    end\nend\n\nwhen I receive [345 v]\nswitch costume to (coin v)\nwait (0.2) seconds\nswitch costume to (coin2 v)\nwait (0.2) seconds\nswitch costume to (coin3 v)\nwait (3) seconds\nswitch costume to (coin2 v)\nwait (0.1) seconds\nswitch costume to (coin v)\n\n@Breakaway hit\n\nwhen flag clicked\nhide\n\nwhen I receive [go to breakaway  v]\nforever\n    go to (breakaway platform v)\n    stop [this script v]\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    broadcast (Go to Breakaway  v)\nend\n\nwhen I receive [show b v]\nshow\n\nwhen I receive [hide b v]\nhide\n\nwhen I receive [345 v]\ngo to (breakaway platform v)\n\n@Moving platform\n\nwhen flag clicked\nforever\n    if <(level) = [4]> then\n        show\n        go to x: (0) y: (50)\n        set x to (([sin v] of ((timer) * (70)) ) * (80))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        show\n        go to x: (-20) y: (-60)\n        set x to (([sin v] of ((timer) * (70)) ) * (100))\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(level) = [1]> or <<(level) = [2]> or <<(level) = [3]> or <<(level) = [5]> or <<(level) = [6]> or <<(level) = [7]> or <<(level) = [8]> or <<(level) = [9]> or <<(level) = [10]> or <<(level) = [11]> or <<(level) = [12]> or <<(level) = [16]> or <<(level) = []> or <<(level) = []> or <<(level) = []> or >>>>>>>>>>>>>>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        show\n        go to x: (60) y: (-40)\n        set x to (([sin v] of ((timer) * (70)) ) * (70))\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [15]> then\n        show\n        go to x: (0) y: (60)\n        set x to (([sin v] of ((timer) * (50)) ) * (200))\n    end\nend\n\n@Shop\n\nwhen flag clicked\nswitch costume to (shop v)\ngo to x: (202) y: (-160)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (back v)\n    go to x: (202) y: (-160)\n    broadcast (Open Shop v)\n    wait (0.1) seconds\n    go to [front v] layer\n    show\nelse\n    if <(costume [number v]) = [2]> then\n        switch costume to (shop v)\n        go to x: (202) y: (-160)\n        broadcast (Close Shop v)\n    end\nend\n\n@Shop menu\n\nwhen flag clicked\nhide\n\nwhen I receive [open shop v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [close shop v]\nhide\n\n@Plus 1 max HP\n\nwhen flag clicked\nhide\n\nwhen I receive [open shop v]\nswitch costume to (shop v)\nset size to (60) %\ngo to x: (180) y: (90)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen I receive [close shop v]\nhide\n\nwhen this sprite clicked\nif <(Money) > [0]> then\n    change [money v] by (-1)\n    change [max hp v] by (1)\nend\n\nwhen this sprite clicked\nif <(Max HP) > [9]> then\n    set [max hp v] to [9]\n    change [money v] by (3)\nend\n\nwhen this sprite clicked\nif <(Money) < [1]> then\n    switch costume to (shop4 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen this sprite clicked\nif <(Max HP) > [8]> then\n    switch costume to (shop2 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen this sprite clicked\nplay sound [pop v] until done\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\n@Plus 1 HP\n\nwhen flag clicked\nhide\n\nwhen I receive [open shop v]\nswitch costume to (shop v)\nset size to (60) %\ngo to x: (180) y: (30)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen I receive [close shop v]\nhide\n\nwhen this sprite clicked\nwait (0.1) seconds\nif <(Max HP) > (HP)> then\n    if <(Money) > [0]> then\n        change [money v] by (-1)\n        change [hp v] by (1)\n    end\nend\n\nwhen this sprite clicked\nif <<(Max HP) < (HP)> or <(Max HP) = (HP)>> then\n    switch costume to (shop2 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen this sprite clicked\nif <(Money) < [1]> then\n    switch costume to (shop4 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen this sprite clicked\nplay sound [pop v] until done\n\nchange volume by (-10)\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\n@Invincibility\n\nwhen flag clicked\nhide\n\nwhen I receive [open shop v]\nswitch costume to (shop v)\nset size to (60) %\ngo to x: (180) y: (-30)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen I receive [close shop v]\nhide\n\nwhen this sprite clicked\nif <(Money) > [5]> then\n    if <(Y) < [2]> then\n        change [y v] by (1)\n        broadcast (Invincibility v)\n        change [money v] by (-6)\n        show variable [lasts for v]\n    end\nend\n\nwhen this sprite clicked\nwait (0.0001) seconds\nif <(Y) = [2]> then\n    switch costume to (shop2 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen flag clicked\nwait (0.5) seconds\nforever\n    if <(lasts for) < [60]> then\n        if <(Y) = [3]> then\n            forever\n                set [y v] to [2]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [y v] to [1]\n\nwhen this sprite clicked\nif <(Money) < [20]> then\n    switch costume to (shop4 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen this sprite clicked\nif <(Money) < [6]> then\n    switch costume to (shop4 v)\n    wait (1) seconds\n    switch costume to (shop v)\nend\n\nwhen flag clicked\nforever\n    if <(lasts for) < [0]> then\n        set [lasts for v] to [60]\n        set [y v] to [1]\n        hide variable [lasts for v]\n    end\nend\n\nwhen this sprite clicked\nplay sound [pop v] until done\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\n@?\n\nwhen I receive [open shop v]\nswitch costume to (shop v)\nset size to (60) %\ngo to x: (180) y: (-30)\nwait (0.1) seconds\ngo to [front v] layer\n\nshow\n\nwhen I receive [close shop v]\nhide\n\nwhen this sprite clicked\nplay sound [pop v] until done\n\nwhen flag clicked\nforever\n    set volume to (Volume) %\nend\n\nwhen flag clicked\nhide\n\n@Shop2\n\nwhen flag clicked\nswitch costume to (accessories  v)\ngo to x: (202) y: (-127)\nwait (0.1) seconds\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (back v)\n    go to x: (202) y: (-127)\n    broadcast (Open accessories  v)\n    show variable [accessories v]\n    show variable [body color v]\n    wait (0.1) seconds\n    go to [front v] layer\n    show\nelse\n    if <(costume [number v]) = [2]> then\n        switch costume to (accessories  v)\n        go to x: (202) y: (-127)\n        broadcast (Close accessories  v)\n        hide variable [accessories v]\n        hide variable [body color v]\n        wait (0.1) seconds\n        go to [front v] layer\n        show\n    end\nend\n\n@ Accessories menu\n\nwhen flag clicked\nhide\n\nwhen I receive [open accessories  v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [close accessories  v]\nhide\n\n@2\n\nwhen flag clicked\nhide\nforever\n    set [color v] effect to (Body color)\nend\n\nwhen I receive [open accessories  v]\nset size to (400) %\ngo to x: (0) y: (35)\nshow\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [close accessories  v]\nhide\n\n@Accessories 2\n\nwhen flag clicked\nshow\ngo to (2 v)\n\nwhen flag clicked\nforever\n    switch costume to (Accessories)\nend\n\nwhen I receive [close accessories  v]\nhide\n\nwhen I receive [open accessories  v]\nset size to (400) %\ngo to x: (0) y: (35)\nshow\nwait (0.5) seconds\ngo to [front v] layer\n\nwhen flag clicked\nset [accessories v] to [0]\nset [body color v] to [14]\n\nwhen flag clicked\n\n@Thumbnail\n\ngo to x: (0) y: (0)\nset size to (100) %\ngo to [front v] layer\nshow\nhide variable [level v]\nhide variable [money v]\nhide variable [max hp v]\nhide variable [volume v]\nhide variable [body color v]\nhide variable [accessories v]\nhide variable [music v]\n\nwhen flag clicked\nhide\n\n@Aim here \n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        show\n        go to x: (-95) y: (130)\n        wait (20) seconds\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        hide\n    end\nend\n\n@Accessories \n\nwhen flag clicked\nset [accessories v] to [0]\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nshow\nforever\n    go to (player v)\nend\n\nwhen flag clicked\nforever\n    switch costume to (Accessories)\nend\n\nforever\n    if <(Accessories) = [3]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (ninja >>> v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (ninja  v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (go to player v)\nend\n\nstop [this script v]\n\nwhen I receive [go to player v]\nshow\nforever\n    go to (player v)\n    stop [this script v]\nend\n\n@Damage \n\nwhen flag clicked\nswitch costume to (1 v)\nshow\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nforever\n    if <(level) < [1]> then\n        set [level v] to [1]\n    end\nend\n\n@Hide\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    show variable [volume v]\n    show variable [music v]\n    broadcast (show v)\n    switch costume to (hide variable v)\n    go to x: (-80) y: (-163)\nelse\n    if <(costume [number v]) = [2]> then\n        hide variable [volume v]\n        hide variable [music v]\n        broadcast (hide v)\n        switch costume to ( show variable v)\n        go to x: (-220) y: (-163)\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (hide variable v)\ngo to x: (-80) y: (-163)\nshow\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [close shop v]\nshow variable [volume v]\nshow variable [music v]\nshow\n\nwhen I receive [open shop v]\nhide variable [volume v]\nhide variable [music v]\nhide\n\nwhen I receive [close shop v]\nif <(costume [number v]) = [1]> then\n    hide variable [volume v]\n    hide variable [music v]\nend\n\nwhen I receive [close accessories  v]\nshow variable [volume v]\nshow variable [music v]\nshow\n\nwhen I receive [open accessories  v]\nhide variable [volume v]\nhide variable [music v]\nhide\n\nwhen I receive [close accessories  v]\nif <(costume [number v]) = [1]> then\n    hide variable [volume v]\n    hide variable [music v]\nend\n\n@Music\n\nwhen flag clicked\nshow\nforever\n    switch costume to (Music)\nend\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [show v]\nshow\n\n@Instructions \n\nwhen flag clicked\nshow\nswitch costume to (1 v)\n\nwhen this sprite clicked\ngo to [front v] layer\nif <(costume [number v]) = [1]> then\n    switch costume to (2 v)\nelse\n    if <(costume [number v]) = [2]> then\n        switch costume to (1 v)\n    end\nend\n\nwhen flag clicked\nforever\n\nwhen I receive [2 v]\n\n