Unicherry: Platformer Game

Instructions: Arrows or WASD to jump and move\nX or O to use your spin attack\nZ or P to use your other spin attack (Powerup only)\nUse mouse to click on buttons

@Stage\n\nwhen flag clicked\nforever\n    if <(Level) = [1.5]> then\n        change [color v] effect by (1)\n    else\n        set [color v] effect to (0)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nset [spinmove v] to [0]\n\nwhen flag clicked\nforever\n    if <(Menu) = [Main Menu]> then\n        stop all sounds\n        play sound [funny-accompanying-background-music-for-video-vlogs-one-day-baby-154587 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        stop all sounds\n        play sound [october-rose-27659 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Menu) = [Map]> then\n        stop all sounds\n        play sound [funny-accompanying-background-music-for-video-vlogs-one-day-baby-154587 v] until done\n    end\nend\n\nwhen flag clicked\nset [costume v] to [0]\n\nwhen flag clicked\nforever\n    if <<<(Menu) = [Main Menu]> or <(Menu) = [Shop]>> or <<<<(Level) = [1]> or <(Level) = [1.5]>> or <(Level) = [3]>> or <<(Menu) = [Map]> or <<<<(Level) = [2]> or <(Level) = [4]>> and <<(ScreenY) = [6]> or <(ScreenY) = [0]>>> or <<(Level) = [5]> and <<<(ScreenY) = [6]> or <(ScreenY) = [0]>> or <[4] < (ScreenX)>>>>>>> then\n        switch backdrop to (1 v)\n    else\n        if <(Level) = [6]> then\n            switch backdrop to (3 v)\n        else\n            switch backdrop to (2 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        stop all sounds\n        play sound [savfk-the-travelling-symphony v] until done\n    end\nend\n\nwhen I receive [levelcomplete v]\nstop all sounds\nwait (.01) seconds\nplay sound [tadaa-47995 v] until done\nplay sound [level-win-6416 v] until done\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        stop all sounds\n        play sound [savfk-the-travelling-symphony v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        stop all sounds\n        play sound [october-rose-27659 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1.5]> then\n        stop all sounds\n        play sound [silver-sparkles-150619 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1.8]> then\n        stop all sounds\n        play sound [silver-sparkles-150619 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        stop all sounds\n        play sound [epic-dramatic-action-trailer-99525 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        stop all sounds\n        play sound [reflected-light-147979 v] until done\n    end\nend\n\n@PlayerPhysics\n\ndefine Set Costume\n\nwhen flag clicked\nshow\nset size to (390) %\nforever\n    if <<(speed y) < [4]> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        change [speed y v] by (-1)\n    else\n        change [speed y v] by (-2)\n    end\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <<(Title) > [0]> and <(Full) < [9.2]>> then\n        if <(Stop) = [0]> then\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                Walk (-90) (-6)\n            else\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    Walk (90) (6)\n                else\n                    set [frame v] to [0]\n                end\n            end\n        end\n    else\n        if <(wall jump) > [0]> then\n            change [wall jump v] by (-1)\n        else\n            if <(Stop) = [0]> then\n                if <not <(POWERUP) = [3]>> then\n                    set [speed x v] to ((speed x) * (.6))\n                else\n                    set [speed x v] to ((speed x) * (.7))\n                end\n                if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                    change [speed x v] by (-2)\n                end\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    change [speed x v] by (2)\n                end\n            end\n        end\n        if <(Stop) = [0]> then\n            if <(speed x) < [-0.5]> then\n                Walk (-90) (speed x)\n            else\n                if <(speed x) > [0.5]> then\n                    Walk (90) (speed x)\n                else\n                    set [frame v] to [0]\n                end\n            end\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(SpinMove) = [0]> then\n            if <(Stop) = [0]> then\n                if <<(jump key) = [0]> and <(falling?) < [3]>> then\n                    start sound [cartoon-jump-6462 v]\n                    if <not <(POWERUP) = [3]>> then\n                        set [speed y v] to [15]\n                        set [falling? v] to [6]\n                        set [jump key v] to [1]\n                    else\n                        set [speed y v] to [17]\n                        set [falling? v] to [6]\n                        set [jump key v] to [1]\n                    end\n                end\n            end\n        end\n    else\n        set [jump key v] to [0]\n    end\n    Set Costume\n    broadcast (tick v) and wait\nend\n\ndefine Touch Ground <up?>\nif <not <(Flying) = [2]>> then\n    change [falling? v] by (1)\n    Get Touching <not <up?>>\n    if <<(speed y) = [0]> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    else\n        if <(touch) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    end\n    repeat until <(touch) < (in platforrm)>\n        if <up?> then\n            change y by (-1)\n        else\n            change y by (1)\n            set [falling? v] to [0]\n        end\n        set [speed y v] to [0]\n        Get Touching <not <up?>>\n    end\nend\n\ndefine Get Touching <check platform?>\nif <not <(Flying) = [2]>> then\n    if <<<<touching color (#424242)?> and <(Stop) = [0]>> and <<(SpinMove) = [0]> or <(SpinMove) = [-1]>>> or <touching (level v)?>> then\n        set [downward v] to [0]\n        set [touch v] to [9]\n    else\n        if <<check platform?> and <<touching (level v)?> or <<<touching color (#424242)?> and <(Stop) = [0]>> and <<(SpinMove) = [0]> or <(SpinMove) = [-1]>>>>> then\n            set [downward v] to [0]\n            set [touch v] to [1]\n        else\n            set [touch v] to [0]\n        end\n    end\nend\n\ndefine Walk (direction) (speed)\nif <not <(Flying) = [2]>> then\n    point in direction (direction)\n    set [direction v] to (direction)\n    change x by (speed)\n    set [slope v] to [0]\n    Get Touching <>\n    repeat until <<(slope) = [8]> or <(touch) = [0]>>\n        change y by (1)\n        change [slope v] by (1)\n        Get Touching <>\n    end\n    if <(slope) = [8]> then\n        change x by ((0) - (speed))\n        change y by ((0) - (slope))\n        if <(Full) > [11.1]> then\n            if <<key (up arrow v) pressed?> and <([abs v] of (speed) ) > [3]>> then\n                if <(wall jump) = [0]> then\n                    set [speed x v] to ((-1.2) * (speed))\n                    set [speed y v] to [12]\n                    set [falling? v] to [6]\n                    set [wall jump v] to [15]\n                end\n            else\n                set [speed x v] to [0]\n            end\n        end\n    end\n    if <<(Title) > [0]> and <(Full) < [9.3]>> then\n        change [frame v] by (0.5)\n    else\n        if <(speed) < [0]> then\n            change [frame v] by ((speed) / (-8))\n        else\n            change [frame v] by ((speed) / (8))\n        end\n    end\nend\n\nwhen flag clicked\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [stop v] to [0]\nset [slide v] to [0]\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    if <(CELEBRATION) = [0]> then\n        if <<(GameOver) = [0]> or <(GameOver) = [2]>> then\n            if <<(SpinMove) = [0]> or <(SpinMove) = [-1]>> then\n                if <<(speed y) = [0]> and <(falling?) = [0]>> then\n                    if <([abs v] of (speed x) ) < [1]> then\n                        set [motion v] to [Idel]\n                    else\n                        set [motion v] to [Walk]\n                    end\n                else\n                    if <[0] < (speed y)> then\n                        set [motion v] to [Jump]\n                    else\n                        set [motion v] to [Fall]\n                    end\n                end\n            else\n                set [motion v] to [Spin]\n            end\n        else\n            set [motion v] to [GameOver]\n        end\n    else\n        set [motion v] to [Win]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(x position) = [-240]> then\n        if <not <<(ScreenX) = [1]> or <(ScreenX) = [8]>>> then\n            set [stop v] to [1]\n            set [slide v] to [L]\n            glide (.9) secs to x: (239) y: (y position)\n            set [stop v] to [0]\n        end\n        if <(ScreenX) = [8]> then\n            broadcast (LastLevelPart v)\n            wait until <not <(ScreenX) = [8]>>\n        end\n    end\n    if <(x position) = [240]> then\n        if <not <<(ScreenX) = [7]> or <(ScreenX) = [14]>>> then\n            set [stop v] to [1]\n            set [slide v] to [R]\n            glide (.9) secs to x: (-239) y: (y position)\n            set [stop v] to [0]\n        end\n        if <(ScreenX) = [7]> then\n            broadcast (NextLevelPart v)\n            wait until <not <(ScreenX) = [7]>>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(SLIDE) = [L]> or <(SLIDE) = [R]>> then\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\ngo to x: (-204) y: (178)\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <not <(speed y) = [0]>> then\n        if <(BounceMove) = [0]> then\n            if <<key (x v) pressed?> or <key (o v) pressed?>> then\n                start sound [whoosh-6316 v]\n                set [spinmove v] to [1]\n                wait until <(falling?) = [0]>\n                set [spinmove v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        change [speed y v] by (-2)\n    end\nend\n\nwhen I receive [gameover2 v]\nif <(EASYMode) = [0]> then\n    set [motion v] to [GameOver]\n    go to x: (CheckpointPosX) y: ((CheckpointPosY) + (0))\n    point in direction (90)\n    set [speed y v] to [0]\n    set [falling? v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <[180] < (y position)> then\n        if <(ScreenY) < [6]> then\n            if <<(Level) = [2]> or <<(Level) = [4]> or <<(Level) = [5]> or >>> then\n                set [stop v] to [1]\n                set [slide v] to [U]\n                glide (.9) secs to x: (x position) y: (-148)\n                set [bounce v] to [1]\n                set [stop v] to [0]\n            end\n        end\n    end\n    if <(y position) < [-180]> then\n        if <[0] < (ScreenY)> then\n            if <[0] < (Level)> then\n                set [stop v] to [1]\n                set [slide v] to [D]\n                glide (.9) secs to x: (x position) y: (180)\n                set [stop v] to [0]\n            end\n        end\n        if <<not <(ScreenX) = [1]>> and <(ScreenY) = [0]>> then\n            if <(EASYMode) = [0]> then\n                set [gameover v] to [1]\n                wait until <(GameOver) = [0]>\n            else\n                set [bounce v] to [2]\n            end\n        end\n    end\nend\n\nwhen I receive [nextlevelpart2 v]\ngo to x: (-239) y: (y position)\npoint in direction (90)\n\nwhen I receive [lastlevelpart2 v]\ngo to x: (239) y: (y position)\npoint in direction (-90)\n\nwhen flag clicked\nset [bounce v] to [0]\nforever\n    if <(Bounce) = [1]> then\n        set [speed y v] to [15]\n        set [bounce v] to [0]\n    end\nend\n\nwhen flag clicked\nset [menu v] to [Main Menu]\nforever\n    if <[0] < (Level)> then\n        show\n    else\n        hide\n        set [stop v] to [1]\n    end\nend\n\nwhen I receive [startlevel2 v]\nset [menu v] to [0]\nset [level v] to [1]\nwait (2) seconds\nset [speed y v] to [0]\nset [falling? v] to [0]\ngo to x: (-204) y: (178)\npoint in direction (90)\nshow\nset [screenx v] to [1]\nset [checkpointx v] to [1]\n\nwhen I receive [characterreset v]\nwait (.01) seconds\nset [speed y v] to [0]\nset [falling? v] to [0]\nif <(Level) = [1.5]> then\n    go to x: (-204) y: (-30)\nelse\n    go to x: (-204) y: (180)\nend\npoint in direction (90)\nshow\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        set [speed y v] to [0]\n        set [falling? v] to [0]\n        go to x: (-204) y: (178)\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    if <(SLIDE) = [D]> then\n        set [speed y v] to [0]\n        set [falling? v] to [0]\n    end\nend\n\nwhen I receive [gameover2 v]\nif <(EASYMode) = [0]> then\n    repeat until <(GameOver) = [1]>\n        go to x: (CheckpointPosX) y: (CheckpointPosY)\n        point in direction (90)\n        set [speed y v] to [0]\n        set [falling? v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [2]> then\n        if <<key (z v) pressed?> or <key (p v) pressed?>> then\n            start sound [whoosh-2 v]\n            set [spinmove v] to [2]\n            set [speed y v] to [16]\n            wait (.01) seconds\n            wait until <(falling?) = [0]>\n            set [spinmove v] to [0]\n            wait until <not <<key (z v) pressed?> or <key (p v) pressed?>>>\n        end\n    end\n    if <(POWERUP) = [1]> then\n        if <<key (z v) pressed?> or <key (p v) pressed?>> then\n            start sound [whoosh-2 v]\n            if <(direction) = [90]> then\n                set [spinmove v] to [2]\n                if <(falling?) = [0]> then\n                    repeat (6)\n                        set [speed x v] to [24]\n                        set [speed y v] to [0]\n                    end\n                else\n                    repeat (6)\n                        set [speed x v] to [24]\n                        set [speed y v] to [2]\n                    end\n                end\n                if <(falling?) = [0]> then\n                    set [spinmove v] to [0]\n                    wait until <not <<key (z v) pressed?> or <key (p v) pressed?>>>\n                else\n                    wait until <(falling?) = [0]>\n                    set [spinmove v] to [0]\n                end\n            else\n                set [spinmove v] to [2]\n                if <(falling?) = [0]> then\n                    repeat (6)\n                        set [speed x v] to [-24]\n                        set [speed y v] to [0]\n                    end\n                else\n                    repeat (6)\n                        set [speed x v] to [-24]\n                        set [speed y v] to [2]\n                    end\n                end\n                if <(falling?) = [0]> then\n                    set [spinmove v] to [0]\n                    wait until <not <<key (z v) pressed?> or <key (p v) pressed?>>>\n                else\n                    wait until <(falling?) = [0]>\n                    set [spinmove v] to [0]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [bounce v] to [0]\nforever\n    if <(Bounce) = [2]> then\n        set [speed y v] to [20]\n        set [bounce v] to [0]\n    end\nend\n\n@Level\n\nwhen flag clicked\nforever\n    if <[0] < (Level)> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (level 1-1 v)\ngo to x: (1440) y: (932)\nset [screenx v] to [1]\nset [screeny v] to [0]\nforever\n    if <(SLIDE) = [L]> then\n        glide (.9) secs to x: ((x position) + (480)) y: (y position)\n        change [screenx v] by (-1)\n        set [slide v] to [0]\n    end\n    if <(SLIDE) = [R]> then\n        glide (.9) secs to x: ((x position) - (480)) y: (y position)\n        change [screenx v] by (1)\n        set [slide v] to [0]\n    end\n    if <(SLIDE) = [U]> then\n        if <[0] < (Level)> then\n            glide (.9) secs to x: (x position) y: ((y position) - (360))\n            change [screeny v] by (1)\n            set [slide v] to [0]\n        end\n    end\n    if <(SLIDE) = [D]> then\n        if <[0] < (Level)> then\n            glide (.9) secs to x: (x position) y: ((y position) - (-360))\n            change [screeny v] by (-1)\n            set [slide v] to [0]\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nif <<[7] < (ScreenX)> and <(CheckpointX) < [8]>> then\n    switch costume to ((costume [number v]) - (1))\nend\nif <<(ScreenX) < [8]> and <[7] < (CheckpointX)>> then\n    next costume\nend\nset [screenx v] to (CheckpointX)\nset [screeny v] to (CheckpointY)\nif <(ScreenX) < [8]> then\n    set x to ((-480) * ((ScreenX) - (4)))\nelse\n    set x to ((-480) * ((ScreenX) - (11)))\nend\nset y to ((932) + ((-360) * (ScreenY)))\n\nwhen I receive [nextlevelpart2 v]\nset [screenx v] to [8]\ngo to x: (1440) y: (y position)\nnext costume\n\nwhen I receive [lastlevelpart2 v]\nset [screenx v] to [7]\ngo to x: (-1440) y: (y position)\nswitch costume to ((costume [number v]) - (1))\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch costume to (level 1-1 v)\n        go to x: (1440) y: (932)\n        set [screenx v] to [1]\n        set [screeny v] to [0]\n        wait until <not <(Level) = [1]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        switch costume to (level 2 v)\n        go to x: (1440) y: (-1228)\n        set [screenx v] to [1]\n        set [screeny v] to [6]\n        wait until <not <(Level) = [2]>>\n    end\nend\n\nset [screeny v] to [3]\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        switch costume to (level 3-1 v)\n        go to x: (1440) y: (932)\n        set [screenx v] to [1]\n        set [screeny v] to [0]\n        wait until <not <(Level) = [3]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch costume to (level 4 v)\n        go to x: (1440) y: (-1228)\n        set [screenx v] to [1]\n        set [screeny v] to [6]\n        wait until <not <(Level) = [4]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1.5]> then\n        switch costume to (gemroom v)\n        go to x: (1440) y: (932)\n        set [screenx v] to [1]\n        set [screeny v] to [0]\n        wait until <not <(Level) = [1.5]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> or <(Level) = [1.8]>> then\n        change [color v] effect by (1)\n    else\n        set [color v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch costume to (level 5 v)\n        go to x: (1440) y: (-1228)\n        set [screenx v] to [1]\n        set [screeny v] to [6]\n        wait until <not <(Level) = [5]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1.8]> then\n        switch costume to (item room v)\n        go to x: (1440) y: (932)\n        set [screenx v] to [1]\n        set [screeny v] to [0]\n        wait until <not <(Level) = [1.5]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch costume to (level castle v)\n        go to x: (1440) y: (932)\n        set [screenx v] to [1]\n        set [screeny v] to [0]\n        wait until <not <(Level) = [6]>>\n    end\nend\n\n@UnicherrySprite\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [0]>> then\n        show\n        set [ghost v] effect to (0)\n        if <<(GameOver) = [1]> and <(EASYMode) = [0]>> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                start sound [short-oww-46070 v]\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        if <[0] < (Level)> then\n            show\n            set [ghost v] effect to (100)\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(SpinMove) = [-1]> then\n        wait until <<(SpinMove) = [0]> or <(SpinMove) = [1]>>\n        if <(SpinMove) = [1]> then\n            set [spinmove v] to [-1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <(POWERUP) = [3]>> and <(Costume) = [0]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        set [brightness v] effect to (10)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(EASYMode) = [1]> then\n        set [gameover v] to [0]\n    end\nend\n\n@Blocks\n\n@WalkingBricks\n\nwhen I start as a clone\nshow\nforever\n    switch costume to (costume1 v)\n    set size to (400) %\n    set [ghost v] effect to (0)\n    if <not <(SLIDE) = [0]>> then\n        delete this clone\n    end\n    if <<<touching (unicherrysprite v)?> and <<(SpinMove) = [1]> or <(SpinMove) = [2]>>> or <<touching (playerphysics v)?> and <<(POWERUP) = [1]> or <(POWERUP) = [2]>>>> then\n        start sound [rock-destroy-6409 v]\n        switch costume to (costume2 v)\n        repeat (10)\n            change size by (25)\n            change [ghost v] effect by (3)\n        end\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [4]> then\n            go to x: (128) y: (20)\n            create clone of (_myself_ v)\n            go to x: (128) y: (-12)\n            create clone of (_myself_ v)\n            go to x: (128) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (128) y: (-76)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [4]>>\n        end\n        if <(ScreenX) = [10]> then\n            go to x: (-96) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (96) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (128) y: (-76)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [10]>>\n        end\n        if <(ScreenX) = [11]> then\n            go to x: (0) y: (16)\n            create clone of (_myself_ v)\n            go to x: (32) y: (16)\n            create clone of (_myself_ v)\n            go to x: (64) y: (16)\n            create clone of (_myself_ v)\n            go to x: (96) y: (16)\n            create clone of (_myself_ v)\n            go to x: (128) y: (16)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [11]>>\n        end\n        if <(ScreenX) = [13]> then\n            go to x: (-32) y: (84)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (20)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (0) y: (84)\n            create clone of (_myself_ v)\n            go to x: (0) y: (20)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (32) y: (84)\n            create clone of (_myself_ v)\n            go to x: (32) y: (20)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-44)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [13]>>\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(Level) = [0]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [5]>> then\n            go to x: (-32) y: (-116)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-116)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-116)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [5]>>>\n        end\n        if <<(ScreenX) = [1]> and <(ScreenY) = [4]>> then\n            go to x: (128) y: (20)\n            create clone of (_myself_ v)\n            go to x: (160) y: (20)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [4]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [3]>> then\n            go to x: (160) y: (28)\n            create clone of (_myself_ v)\n            go to x: (192) y: (28)\n            create clone of (_myself_ v)\n            go to x: (160) y: (-164)\n            create clone of (_myself_ v)\n            go to x: (192) y: (-164)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [3]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [2]>> then\n            go to x: (160) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (192) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (160) y: (-28)\n            create clone of (_myself_ v)\n            go to x: (192) y: (-28)\n            create clone of (_myself_ v)\n            go to x: (160) y: (36)\n            create clone of (_myself_ v)\n            go to x: (192) y: (36)\n            create clone of (_myself_ v)\n            go to x: (160) y: (100)\n            create clone of (_myself_ v)\n            go to x: (192) y: (100)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [2]>>>\n        end\n        if <<(ScreenX) = [1]> and <(ScreenY) = [1]>> then\n            go to x: (-160) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-128) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-128) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (0)\n            create clone of (_myself_ v)\n            go to x: (0) y: (0)\n            create clone of (_myself_ v)\n            go to x: (32) y: (0)\n            create clone of (_myself_ v)\n            go to x: (64) y: (0)\n            create clone of (_myself_ v)\n            go to x: (160) y: (0)\n            create clone of (_myself_ v)\n            go to x: (192) y: (0)\n            create clone of (_myself_ v)\n            go to x: (224) y: (0)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [1]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [1]>> then\n            go to x: (-224) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-192) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (0)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (0)\n            create clone of (_myself_ v)\n            go to x: (32) y: (0)\n            create clone of (_myself_ v)\n            go to x: (64) y: (0)\n            create clone of (_myself_ v)\n            go to x: (160) y: (0)\n            create clone of (_myself_ v)\n            go to x: (192) y: (0)\n            create clone of (_myself_ v)\n            go to x: (160) y: (-164)\n            create clone of (_myself_ v)\n            go to x: (192) y: (-164)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [1]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [0]>> then\n            go to x: (160) y: (-12)\n            create clone of (_myself_ v)\n            go to x: (192) y: (-12)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [0]>>>\n        end\n        if <<(ScreenX) = [1]> and <(ScreenY) = [0]>> then\n            go to x: (-32) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-12)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (20)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [0]>>>\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [3]> then\n        if <(ScreenX) = [5]> then\n            go to x: (0) y: (-140)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-12)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-140)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-76)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-12)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-172)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-172)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [5]>>\n        end\n        if <(ScreenX) = [9]> then\n            go to x: (64) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-140)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (-140)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [9]>>\n        end\n        if <(ScreenX) = [13]> then\n            go to x: (-68) y: (-140)\n            create clone of (_myself_ v)\n            go to x: (-36) y: (-140)\n            create clone of (_myself_ v)\n            go to x: (-4) y: (-140)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [13]>>\n        end\n        if <(ScreenX) = [10]> then\n            go to x: (-64) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (52)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (52)\n            create clone of (_myself_ v)\n            go to x: (0) y: (52)\n            create clone of (_myself_ v)\n            go to x: (32) y: (52)\n            create clone of (_myself_ v)\n            go to x: (64) y: (52)\n            create clone of (_myself_ v)\n            wait until <not <(ScreenX) = [10]>>\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [6]>> then\n            go to x: (-64) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-92)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (-60)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-60)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-60)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-60)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-60)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [6]>>>\n        end\n        if <<(ScreenX) = [1]> and <(ScreenY) = [5]>> then\n            go to x: (-32) y: (-52)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-52)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-52)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [5]>>>\n        end\n        if <<(ScreenX) = [1]> and <(ScreenY) = [4]>> then\n            go to x: (-160) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (-192) y: (-44)\n            create clone of (_myself_ v)\n            go to x: (-160) y: (52)\n            create clone of (_myself_ v)\n            go to x: (-192) y: (52)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [4]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [2]>> then\n            go to x: (-98) y: (4)\n            create clone of (_myself_ v)\n            go to x: (130) y: (4)\n            create clone of (_myself_ v)\n            go to x: (-98) y: (-28)\n            create clone of (_myself_ v)\n            go to x: (130) y: (-28)\n            create clone of (_myself_ v)\n            go to x: (16) y: (4)\n            create clone of (_myself_ v)\n            go to x: (16) y: (-28)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [2]>>>\n        end\n        if <<(ScreenX) = [4]> and <(ScreenY) = [5]>> then\n            go to x: (64) y: (108)\n            create clone of (_myself_ v)\n            go to x: (64) y: (140)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [4]> and <(ScreenY) = [5]>>>\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [5]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [5]>> then\n            go to x: (-32) y: (-20)\n            create clone of (_myself_ v)\n            go to x: (-64) y: (-20)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (-20)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [5]>>>\n        end\n        if <<(ScreenX) = [3]> and <(ScreenY) = [4]>> then\n            go to x: (0) y: (-108)\n            create clone of (_myself_ v)\n            go to x: (-164) y: (20)\n            create clone of (_myself_ v)\n            go to x: (-196) y: (20)\n            create clone of (_myself_ v)\n            go to x: (160) y: (20)\n            create clone of (_myself_ v)\n            go to x: (192) y: (20)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [3]> and <(ScreenY) = [4]>>>\n        end\n        if <<(ScreenX) = [2]> and <(ScreenY) = [3]>> then\n            go to x: (64) y: (-100)\n            create clone of (_myself_ v)\n            go to x: (96) y: (-100)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [2]> and <(ScreenY) = [3]>>>\n        end\n        if <<(ScreenX) = [4]> and <(ScreenY) = [3]>> then\n            go to x: (-64) y: (-100)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (-100)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [4]> and <(ScreenY) = [3]>>>\n        end\n        if <<(ScreenX) = [4]> and <(ScreenY) = [0]>> then\n            go to x: (32) y: (-16)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-16)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-16)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [4]> and <(ScreenY) = [0]>>>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        set [screenx v] to [0]\n        set [screenx v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [6]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [0]>> then\n            go to x: (0) y: (-108)\n            repeat (8)\n                create clone of (_myself_ v)\n                change y by (32)\n            end\n            go to x: (32) y: (-108)\n            repeat (8)\n                create clone of (_myself_ v)\n                change y by (32)\n            end\n            go to x: (64) y: (-108)\n            repeat (8)\n                create clone of (_myself_ v)\n                change y by (32)\n            end\n            wait until <not <<(ScreenX) = [1]> and <(ScreenY) = [0]>>>\n        end\n        if <<(ScreenX) = [3]> and <(ScreenY) = [0]>> then\n            go to x: (-32) y: (116)\n            repeat (4)\n                create clone of (_myself_ v)\n                change y by (-32)\n            end\n            go to x: (0) y: (116)\n            repeat (4)\n                create clone of (_myself_ v)\n                change y by (-32)\n            end\n            go to x: (32) y: (116)\n            repeat (4)\n                create clone of (_myself_ v)\n                change y by (-32)\n            end\n            go to x: (64) y: (116)\n            repeat (4)\n                create clone of (_myself_ v)\n                change y by (-32)\n            end\n            wait until <not <<(ScreenX) = [3]> and <(ScreenY) = [0]>>>\n        end\n        if <<(ScreenX) = [6]> and <(ScreenY) = [3]>> then\n            go to x: (32) y: (-68)\n            create clone of (_myself_ v)\n            go to x: (32) y: (-36)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-68)\n            create clone of (_myself_ v)\n            go to x: (64) y: (-36)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (28)\n            create clone of (_myself_ v)\n            go to x: (-32) y: (-4)\n            create clone of (_myself_ v)\n            go to x: (0) y: (28)\n            create clone of (_myself_ v)\n            go to x: (0) y: (-4)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [6]> and <(ScreenY) = [3]>>>\n        end\n        if <<(ScreenX) = [4]> and <(ScreenY) = [0]>> then\n            go to x: (-128) y: (116)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (116)\n            create clone of (_myself_ v)\n            go to x: (-128) y: (84)\n            create clone of (_myself_ v)\n            go to x: (-96) y: (84)\n            create clone of (_myself_ v)\n            go to x: (0) y: (116)\n            create clone of (_myself_ v)\n            go to x: (32) y: (116)\n            create clone of (_myself_ v)\n            go to x: (0) y: (84)\n            create clone of (_myself_ v)\n            go to x: (32) y: (84)\n            create clone of (_myself_ v)\n            go to x: (128) y: (116)\n            create clone of (_myself_ v)\n            go to x: (160) y: (116)\n            create clone of (_myself_ v)\n            go to x: (128) y: (84)\n            create clone of (_myself_ v)\n            go to x: (160) y: (84)\n            create clone of (_myself_ v)\n            wait until <not <<(ScreenX) = [4]> and <(ScreenY) = [0]>>>\n        end\n    end\nend\n\n@Purple Gem1\n\nwhen flag clicked\nhide\ndelete all of [levels with gem collected v]\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [2]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (160) y: (-139)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L1G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (10)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [3]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (176) y: (92)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L2G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        if <(ScreenX) = [5]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (32) y: (52)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L3G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [6]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-96) y: (64)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L4G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        if <<(ScreenX) = [3]> and <(ScreenY) = [5]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (76)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L5G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        if <<(ScreenX) = [4]> and <(ScreenY) = [1]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-156) y: (92)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem1 v)\n                        add [L6G1] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Purple Gem2\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [1]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (176) y: (64)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L2G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [10]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (16) y: (-139)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L1G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (10)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [3]> then\n        if <(ScreenX) = [10]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (148)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L3G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [4]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-192) y: (-108)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L4G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        if <<(ScreenX) = [3]> and <(ScreenY) = [1]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (124)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L5G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        if <<(ScreenX) = [5]> and <(ScreenY) = [0]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-176) y: (-140)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem2 v)\n                        add [L6G2] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Purple Gem3\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [0]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-112) y: (-12)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L2G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [13]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (116)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L1G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (10)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [6]>> then\n            hide\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [3]> then\n        if <(ScreenX) = [13]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (92) y: (-124)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L3G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [5]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (80) y: (44)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L4G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [5]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [0]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (16) y: (-80)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L5G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [6]> then\n        if <<(ScreenX) = [5]> and <(ScreenY) = [1]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (160) y: (-20)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (Gem3 v)\n                        add [L6G3] to [levels with gem collected v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\n@YellowGems1\n\nwhen flag clicked\nset [gemcount v] to [0]\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [3]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (0)\n                if <touching (unicherrysprite v)?> then\n                    hide\n                    broadcast (YGem1 v)\n                    change [gemcount v] by (1)\n                    play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [10]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-96) y: (-139)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [12]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (-8)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(length of (GemCount)) < [3]> then\n        set [gemcount v] to (join [0] (GemCount))\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-176) y: (-116)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-112) y: (36)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-168) y: (-148)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (0) y: (58)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [3]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (0) y: (-84)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [4]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-16) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [9]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-32) y: (-140)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [11]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-64) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [5]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (32) y: (-44)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [6]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (96) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-180) y: (-100)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [4]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (112) y: (110)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-112) y: (-52)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [3]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-48) y: (-52)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-40) y: (-12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [1]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-16) y: (-36)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [2]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (-36)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (-84)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [3]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (-134)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (0)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (0)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (80)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (52)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [2]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-48) y: (-12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (20)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-4) y: (52)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (4)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-128) y: (-60)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem1 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@YellowGems2\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (176) y: (-116)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [10]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-64) y: (-139)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [gemcount v] to [0]\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [3]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (32) y: (0)\n                if <touching (unicherrysprite v)?> then\n                    hide\n                    broadcast (YGem2 v)\n                    change [gemcount v] by (1)\n                    play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [12]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-48) y: (-8)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (-28)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (48) y: (-148)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (32) y: (58)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [3]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (128) y: (-84)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [4]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [9]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (32) y: (-140)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [11]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (96) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [5]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (32) y: (-108)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [6]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-96) y: (-76)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (180) y: (-100)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [4]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (112) y: (142)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [3]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (72) y: (-12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [1]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-80) y: (60)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [2]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (60)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-112) y: (-148)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (48) y: (80)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (116)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [2]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (20) y: (-12)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-48) y: (20)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (160) y: (114)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (16) y: (132)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [2]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-128) y: (4)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem2 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@YellowGems3\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [10]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (96) y: (-139)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem3 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [gemcount v] to [0]\nhide\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [3]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (64) y: (0)\n                if <touching (unicherrysprite v)?> then\n                    hide\n                    broadcast (YGem3 v)\n                    change [gemcount v] by (1)\n                    play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [12]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (80) y: (-8)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem3 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nif <(SLIDE) = [0]> then\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nset [gemcount v] to [0]\nhide\nforever\n    if <(Level) = [1.5]> then\n        if <(ScreenX) = [1]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-144) y: (156)\n                if <touching (unicherrysprite v)?> then\n                    hide\n                    broadcast (YGem3 v)\n                    change [gemcount v] by (1)\n                    play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [gemcount v] to [0]\nhide\nforever\n    if <(Level) = [1.5]> then\n        if <(ScreenX) = [2]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (144) y: (156)\n                if <touching (unicherrysprite v)?> then\n                    hide\n                    broadcast (YGem3 v)\n                    change [gemcount v] by (1)\n                    play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [5]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (144) y: (-148)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem3 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@YellowGems4\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [10]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (128) y: (-139)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem4 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [1]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (112) y: (156)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem4 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [2]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-112) y: (156)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem4 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@GameOverScreen\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [gameover v]\nwait (.5) seconds\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (GameOver2 v)\nwait (.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (FallCancel v)\nwait (.01) seconds\nhide\nset [stop v] to [0]\nset [gameover v] to [0]\n\nwhen I receive [nextlevelpart v]\nset [stop v] to [1]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (NextLevelPart2 v)\nwait (.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [stop v] to [0]\n\nwhen I receive [lastlevelpart v]\nset [stop v] to [1]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (LastLevelPart2 v)\nwait (.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [stop v] to [0]\n\nwhen I receive [startlevel v]\nset [stop v] to [1]\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (StartLevel2 v)\nwait (.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [stop v] to [0]\n\nwhen I receive [levelcomplete2 v]\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nif <(Level) = [1]> then\n    if <not <[levelscompleted v] contains [1]?>> then\n        add [1] to [levelscompleted v]\n    end\nend\nif <(Level) = [2]> then\n    if <not <[levelscompleted v] contains [2]?>> then\n        add [2] to [levelscompleted v]\n    end\nend\nif <(Level) = [3]> then\n    if <not <[levelscompleted v] contains [3]?>> then\n        add [3] to [levelscompleted v]\n    end\nend\nif <(Level) = [4]> then\n    if <not <[levelscompleted v] contains [4]?>> then\n        add [4] to [levelscompleted v]\n    end\nend\nif <(Level) = [5]> then\n    if <not <[levelscompleted v] contains [5]?>> then\n        add [5] to [levelscompleted v]\n    end\nend\nset [level v] to [0]\nset [menu v] to [Map]\nset [celebration v] to [0]\nwait (.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Checkpoint\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [checkpointx v] to [1]\nset [checkpointy v] to [0]\nset [checkpointposx v] to [-204]\nset [checkpointposy v] to [-136]\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        if <(ScreenX) = [5]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (32) y: (-100)\n            end\n        else\n            if <(ScreenX) = [8]> then\n                if <(SLIDE) = [0]> then\n                    show\n                    go to x: (112) y: (-64)\n                end\n            else\n                hide\n            end\n        end\n    end\n    if <(Level) = [2]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [2]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (32)\n            end\n        else\n            if <<(ScreenX) = [3]> and <(ScreenY) = [0]>> then\n                if <(SLIDE) = [0]> then\n                    show\n                    go to x: (124) y: (0)\n                end\n            else\n                hide\n            end\n        end\n    end\n    if <(Level) = [3]> then\n        if <(ScreenX) = [8]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (16) y: (0)\n            end\n        else\n            hide\n        end\n    end\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [1]> and <(ScreenY) = [1]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (48) y: (-100)\n            end\n        else\n            if <<(ScreenX) = [1]> and <(ScreenY) = [2]>> then\n                if <(SLIDE) = [0]> then\n                    show\n                    go to x: (132) y: (-108)\n                end\n            else\n                if <<(ScreenX) = [1]> and <(ScreenY) = [3]>> then\n                    if <(SLIDE) = [0]> then\n                        show\n                        go to x: (208) y: (-118)\n                    end\n                else\n                    hide\n                end\n            end\n        end\n    end\n    if <(Level) = [5]> then\n        if <<(ScreenX) = [3]> and <(ScreenY) = [3]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (0) y: (44)\n            end\n        else\n            hide\n        end\n    end\n    if <(Level) = [6]> then\n        if <<(ScreenX) = [6]> and <(ScreenY) = [0]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (-8) y: (-124)\n            end\n        else\n            if <<(ScreenX) = [4]> and <(ScreenY) = [2]>> then\n                if <(SLIDE) = [0]> then\n                    show\n                    go to x: (0) y: (-64)\n                end\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(ScreenX) = (CheckpointX)> and <(ScreenY) = (CheckpointY)>> then\n        switch costume to (5 v)\n    else\n        switch costume to (1 v)\n        if <<touching (unicherrysprite v)?> and <(HardMode) = [0]>> then\n            start sound [sound-effect-twinklesparkle-115095 v]\n            set [checkpointx v] to (ScreenX)\n            set [checkpointy v] to (ScreenY)\n            set [checkpointposx v] to (x position)\n            set [checkpointposy v] to (y position)\n            switch costume to (2 v)\n            wait (.1) seconds\n            switch costume to (3 v)\n            wait (.1) seconds\n            switch costume to (4 v)\n            wait (.1) seconds\n            switch costume to (5 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\n@AppleGrunt\n\nwhen flag clicked\nforever\n    next costume\n    wait (.2) seconds\nend\n\nwhen flag clicked\nforever\n    repeat until <<not <<touching (level v)?> or <touching (walkingbricks v)?>>> or <touching (_edge_ v)?>>\n        change x by (-2)\n    end\n    change x by (5)\n    repeat until <<not <<touching (level v)?> or <touching (walkingbricks v)?>>> or <touching (_edge_ v)?>>\n        change x by (2)\n    end\n    change x by (-5)\nend\n\nwhen flag clicked\nforever\n    hide\n    if <<(Level) = [1]> and <(ScreenX) = [9]>> then\n        go to x: (80) y: (-82)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [1]> and <(ScreenX) = [9]>>>\n    end\n    if <<(Level) = [1]> and <(ScreenX) = [11]>> then\n        go to x: (80) y: (46)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [1]> and <(ScreenX) = [11]>>>\n    end\n    if <<(Level) = [1]> and <(ScreenX) = [12]>> then\n        go to x: (0) y: (-50)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [1]> and <(ScreenX) = [12]>>>\n    end\n    if <<(Level) = [1]> and <(ScreenX) = [14]>> then\n        go to x: (0) y: (-114)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [1]> and <(ScreenX) = [14]>>>\n    end\n    if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        go to x: (0) y: (-88)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>>>\n    end\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>> then\n        go to x: (0) y: (-105)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>>>\n    end\n    if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        go to x: (0) y: (-122)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>>>\n    end\n    if <<(Level) = [2]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        go to x: (0) y: (-114)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [2]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>>>\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [9]>> then\n        go to x: (0) y: (-48)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [9]>>>\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [11]>> then\n        go to x: (-64) y: (-112)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [11]>>>\n    end\n    if <<(Level) = [4]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n        go to x: (0) y: (-22)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [4]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>>>\n    end\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n        go to x: (0) y: (78)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>>>\n    end\n    if <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [5]>>> then\n        go to x: (-120) y: (41)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [5]>>>>\n    end\n    if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [4]>>> then\n        go to x: (0) y: (-80)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [4]>>>>\n    end\n    if <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n        go to x: (0) y: (-82)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>>>\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [2]> and <(ScreenY) = [0]>>> then\n        go to x: (0) y: (-50)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [2]> and <(ScreenY) = [0]>>>>\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [0]>>> then\n        go to x: (0) y: (-50)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [0]>>>>\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [1]>>> then\n        go to x: (-100) y: (-58)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [1]>>>>\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [5]> and <(ScreenY) = [3]>>> then\n        go to x: (100) y: (-72)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [5]> and <(ScreenY) = [3]>>>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (playerphysics v)?> and <(SpinMove) = [0]>> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n        create clone of (_myself_ v)\n        wait (1) seconds\n    end\n    if <touching (walkingbricks v)?> then\n        wait until <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>>\n        wait (.1) seconds\n        if <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>> then\n            if <(SLIDE) = [0]> then\n                hide\n                create clone of (_myself_ v)\n                wait (1) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nstart sound [punch-41105 v]\nturn right (180) degrees\nshow\nrepeat until <(y position) < [-180]>\n    change y by (-8)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    next costume\n    wait (.2) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\ncreate clone of (_myself_ v)\n\n@Finish Goal\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    hide\n    if <<(Level) = [1]> and <(ScreenX) = [14]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (184) y: (-8)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [1]>>\n            end\n        end\n    end\n    if <<(Level) = [2]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (160) y: (-32)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [2]>>\n            end\n        end\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [14]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (164) y: (32)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [3]>>\n            end\n        end\n    end\n    if <<(Level) = [4]> and <<(ScreenX) = [5]> and <(ScreenY) = [6]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (84) y: (-20)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [4]>>\n            end\n        end\n    end\n    if <<(Level) = [5]> and <<(ScreenX) = [7]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (100) y: (28)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [5]>>\n            end\n        end\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (0) y: (20)\n            if <touching (unicherrysprite v)?> then\n                set [gamefinished v] to [1]\n                hide\n                broadcast (LevelComplete v)\n                wait until <not <(Level) = [6]>>\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (10)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [gamefinished v] to [0]\nforever\n    if <(Level) = [6]> then\n        change [color v] effect by (5)\n    else\n        set [color v] effect to (0)\n    end\nend\n\n@PurpleGemGlow\n\nwhen I receive [gem1 v]\ngo to (purple gem1 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (50)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [gem2 v]\ngo to (purple gem2 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (50)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [gem3 v]\ngo to (purple gem3 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (50)\n    change [ghost v] effect by (5)\nend\nhide\n\n@YellowGemGlow1\n\nwhen I receive [ygem1 v]\ngo to (yellowgems1 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@YellowGemGlow2\n\nwhen I receive [ygem2 v]\ngo to (yellowgems2 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@YellowGemGlow3\n\nwhen I receive [ygem3 v]\ngo to (yellowgems3 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@YellowGemGlow4\n\nwhen I receive [ygem4 v]\ngo to (yellowgems4 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Logo\n\nwhen flag clicked\ngo to x: (-100) y: (140)\nforever\n    if <(Menu) = [Main Menu]> then\n        show\n    else\n        hide\n    end\nend\n\n@NewGameButton\n\nwhen flag clicked\ngo to x: (-160) y: (60)\nset [easymode v] to [0]\nforever\n    if <(Menu) = [Main Menu]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n            if <mouse down?> then\n                broadcast (CharacterReset v)\n                wait (.01) seconds\n                set [easymode v] to [0]\n                set [level v] to [1]\n                set [screenx v] to [1]\n                set [screeny v] to [0]\n                set [checkpointx v] to [1]\n                set [checkpointy v] to [0]\n                set [checkpointposx v] to [-204]\n                set [checkpointposy v] to [-140]\n                set [menu v] to [0]\n                set [stop v] to [0]\n            end\n        else\n            switch costume to (1 v)\n        end\n    else\n        hide\n    end\nend\n\n@PurpeGemCounter\n\nwhen flag clicked\ngo to x: (180) y: (160)\nset [ghost v] effect to (15)\nforever\n    if <<[0] < (Level)> and <not <(Level) = [1.5]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <[levels with gem collected v] contains (join [L] (join (Level) [G1]))?> then\n        if <[levels with gem collected v] contains (join [L] (join (Level) [G2]))?> then\n            if <[levels with gem collected v] contains (join [L] (join (Level) [G3]))?> then\n                switch costume to (123 v)\n            else\n                switch costume to (12 v)\n            end\n        else\n            if <[levels with gem collected v] contains (join [L] (join (Level) [G3]))?> then\n                switch costume to (13 v)\n            else\n                switch costume to (1 v)\n            end\n        end\n    else\n        if <[levels with gem collected v] contains (join [L] (join (Level) [G2]))?> then\n            if <[levels with gem collected v] contains (join [L] (join (Level) [G3]))?> then\n                switch costume to (23 v)\n            else\n                switch costume to (2 v)\n            end\n        else\n            if <[levels with gem collected v] contains (join [L] (join (Level) [G3]))?> then\n                switch costume to (3 v)\n            else\n                switch costume to (0 v)\n            end\n        end\n    end\nend\n\n@Coin Digit 1\n\nwhen flag clicked\nforever\n    if <<[0] < (Level)> or <<(Menu) = [Map]> or <(Menu) = [Shop]>>> then\n        go to x: (-200) y: (168)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (letter (1) of (GemCount))\nend\n\n@Coin Digit 2\n\nwhen flag clicked\nforever\n    switch costume to (letter (2) of (GemCount))\nend\n\nwhen flag clicked\nforever\n    go to x: (-205) y: (168)\n    if <<[0] < (Level)> or <<(Menu) = [Map]> or <(Menu) = [Shop]>>> then\n        show\n    else\n        hide\n    end\nend\n\n@Coin Digit 3\n\nwhen flag clicked\nforever\n    if <<(Menu) = [Shop]> or <<[0] < (Level)> or <(Menu) = [Map]>>> then\n        go to x: (-190) y: (168)\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (letter (3) of (GemCount))\nend\n\n@Level Complete\n\nwhen flag clicked\nhide\nset [celebration v] to [0]\n\nwhen I receive [levelcomplete v]\ngo to x: (0) y: (132)\nset [stop v] to [1]\nwait (.5) seconds\nset [celebration v] to [1]\nshow\nset size to (10) %\nset [color v] effect to (0)\nrepeat (58)\n    change size by (5)\n    change [color v] effect by (15)\nend\nrepeat (100)\n    change [color v] effect by (15)\nend\nbroadcast (LevelComplete2 v)\nrepeat (30)\n    change [color v] effect by (15)\nend\nhide\n\n@WorldMap\n\nwhen flag clicked\ndelete all of [levelscompleted v]\n\nwhen flag clicked\nforever\n    if <(Menu) = [Map]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [world v] to [1]\nforever\n    if <[levelscompleted v] contains [1]?> then\n        if <[levelscompleted v] contains [2]?> then\n            if <[levelscompleted v] contains [3]?> then\n                if <[levelscompleted v] contains [4]?> then\n                    if <[levelscompleted v] contains [5]?> then\n                        switch costume to (world1:11111 v)\n                    else\n                        switch costume to (world1:11110 v)\n                    end\n                else\n                    if <[levelscompleted v] contains [5]?> then\n                        switch costume to (world1:11101 v)\n                    else\n                        switch costume to (world1:11100 v)\n                    end\n                end\n            else\n                if <[levelscompleted v] contains [4]?> then\n                    if <[levelscompleted v] contains [5]?> then\n                        switch costume to (world1:11011 v)\n                    else\n                        switch costume to (world1:11010 v)\n                    end\n                else\n                    switch costume to (world1:11000 v)\n                end\n            end\n        else\n            switch costume to (world1:10000 v)\n        end\n    else\n        switch costume to (world1:00000 v)\n    end\nend\n\n@Map\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        change [color v] effect by (5)\n        set [brightness v] effect to (5)\n    else\n        set [color v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ngo to x: (-192) y: (-148)\nforever\n    if <(Menu) = [Map]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(POWERUP) = [0]> or <(POWERUP) = [3]>> then\n        switch costume to (idel v)\n        wait (.3) seconds\n        switch costume to (idel2 v)\n        wait (.3) seconds\n    end\n    if <(POWERUP) = [1]> then\n        switch costume to (sh: idel v)\n        wait (.3) seconds\n        switch costume to (sh: idel2 v)\n        wait (.3) seconds\n    end\n    if <(POWERUP) = [2]> then\n        switch costume to (ah: idel v)\n        wait (.3) seconds\n        switch costume to (ah: idel2 v)\n        wait (.3) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Menu) = [Map]> then\n        if <(World) = [1]> then\n            if <<(x position) = [-192]> and <(y position) = [-148]>> then\n                if <[levelscompleted v] contains [1]?> then\n                    if <key (right arrow v) pressed?> then\n                        repeat (16)\n                            change x by (6)\n                        end\n                    end\n                end\n            end\n            if <<(x position) = [-96]> and <(y position) = [-148]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [-148]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <[levelscompleted v] contains [2]?> then\n                    if <key (up arrow v) pressed?> then\n                        repeat (16)\n                            change y by (6)\n                        end\n                    end\n                    if <key (right arrow v) pressed?> then\n                        repeat (16)\n                            change x by (6)\n                        end\n                    end\n                end\n            end\n            if <<(x position) = [96]> and <(y position) = [-148]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <[levelscompleted v] contains [4]?> then\n                    if <key (up arrow v) pressed?> then\n                        repeat (16)\n                            change y by (6)\n                        end\n                    end\n                    if <key (right arrow v) pressed?> then\n                        repeat (16)\n                            change x by (6)\n                        end\n                    end\n                end\n            end\n            if <<(x position) = [192]> and <(y position) = [-148]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n            end\n            if <<(x position) = [-192]> and <(y position) = [-52]>> then\n                if <key (up arrow v) pressed?> then\n                    repeat (16)\n                        change y by (6)\n                    end\n                end\n                if <[worldkey v] contains [1]?> then\n                    if <key (right arrow v) pressed?> then\n                        repeat (16)\n                            change x by (6)\n                        end\n                    end\n                end\n            end\n            if <<(x position) = [-96]> and <(y position) = [-52]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [-52]>> then\n                if <<[worldkey v] contains [1]?> and <[levelscompleted v] contains [3]?>> then\n                    if <key (left arrow v) pressed?> then\n                        repeat (16)\n                            change x by (-6)\n                        end\n                    end\n                end\n                if <key (down arrow v) pressed?> then\n                    repeat (16)\n                        change y by (-6)\n                    end\n                end\n                if <[levelscompleted v] contains [3]?> then\n                    if <key (right arrow v) pressed?> then\n                        repeat (16)\n                            change x by (6)\n                        end\n                    end\n                end\n            end\n            if <<(x position) = [96]> and <(y position) = [-52]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n                if <key (down arrow v) pressed?> then\n                    repeat (16)\n                        change y by (-6)\n                    end\n                end\n            end\n            if <<(x position) = [192]> and <(y position) = [-52]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (up arrow v) pressed?> then\n                    repeat (16)\n                        change y by (6)\n                    end\n                end\n            end\n            if <<(x position) = [-192]> and <(y position) = [44]>> then\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n                if <key (down arrow v) pressed?> then\n                    repeat (16)\n                        change y by (-6)\n                    end\n                end\n            end\n            if <<(x position) = [-96]> and <(y position) = [44]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [44]>> then\n                if <<[worldkey v] contains [1]?> and <[levelscompleted v] contains [3]?>> then\n                    if <key (left arrow v) pressed?> then\n                        repeat (16)\n                            change x by (-6)\n                        end\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n            end\n            if <<(x position) = [96]> and <(y position) = [44]>> then\n                if <key (left arrow v) pressed?> then\n                    repeat (16)\n                        change x by (-6)\n                    end\n                end\n                if <key (right arrow v) pressed?> then\n                    repeat (16)\n                        change x by (6)\n                    end\n                end\n            end\n            if <<(x position) = [192]> and <(y position) = [44]>> then\n                if <key (left arrow v) pressed?> then\n                    if <[levelscompleted v] contains [5]?> then\n                        repeat (16)\n                            change x by (-6)\n                        end\n                    end\n                end\n                if <key (down arrow v) pressed?> then\n                    repeat (16)\n                        change y by (-6)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [mapx v] to (x position)\n    set [mapy v] to (y position)\nend\n\nwhen flag clicked\nforever\n    if <(Menu) = [Map]> then\n        if <(World) = [1]> then\n            if <<(x position) = [-192]> and <(y position) = [-148]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [1]\n                    set [screenx v] to [1]\n                    set [screeny v] to [0]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [0]\n                    set [checkpointposx v] to [-204]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [-148]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [2]\n                    set [screenx v] to [1]\n                    set [screeny v] to [6]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [6]\n                    set [checkpointposx v] to [-204]\n                    set [checkpointposy v] to [10]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [-52]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [3]\n                    set [screenx v] to [1]\n                    set [screeny v] to [0]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [0]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [96]> and <(y position) = [-148]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [4]\n                    set [screenx v] to [1]\n                    set [screeny v] to [6]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [6]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [192]> and <(y position) = [44]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [5]\n                    set [screenx v] to [1]\n                    set [screeny v] to [6]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [6]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [0]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [192]> and <(y position) = [-148]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [1.5]\n                    set [screenx v] to [1]\n                    set [screeny v] to [0]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [0]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [-192]> and <(y position) = [44]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [1.8]\n                    set [screenx v] to [1]\n                    set [screeny v] to [0]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [0]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n            if <<(x position) = [0]> and <(y position) = [44]>> then\n                if <key (x v) pressed?> then\n                    broadcast (CharacterReset v)\n                    wait (.01) seconds\n                    set [level v] to [6]\n                    set [screenx v] to [1]\n                    set [screeny v] to [0]\n                    set [checkpointx v] to [1]\n                    set [checkpointy v] to [0]\n                    set [checkpointposx v] to [-200]\n                    set [checkpointposy v] to [-140]\n                    set [menu v] to [0]\n                    set [stop v] to [0]\n                end\n            end\n        end\n    end\nend\n\n@PurpeGemCounterMap\n\nwhen flag clicked\ngo to x: (180) y: (160)\nset [ghost v] effect to (15)\nforever\n    if <<(Menu) = [Map]> and <<(World) = [1]> and <<<(MapX) = [-192]> and <(MapY) = [-148]>> or <<<(MapX) = [0]> and <(MapY) = [-148]>> or <<<(MapX) = [0]> and <(MapY) = [-52]>> or <<<(MapX) = [96]> and <(MapY) = [-148]>> or <<<(MapX) = [192]> and <(MapY) = [44]>> or <<(MapX) = [0]> and <(MapY) = [44]>>>>>>>>> then\n        show\n        if <<(MapX) = [0]> and <(MapY) = [-148]>> then\n            if <[levels with gem collected v] contains [L2G1]?> then\n                if <[levels with gem collected v] contains [L2G2]?> then\n                    if <[levels with gem collected v] contains [L2G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L2G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L2G2]?> then\n                    if <[levels with gem collected v] contains [L2G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L2G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n        if <<(MapX) = [-192]> and <(MapY) = [-148]>> then\n            if <[levels with gem collected v] contains [L1G1]?> then\n                if <[levels with gem collected v] contains [L1G2]?> then\n                    if <[levels with gem collected v] contains [L1G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L1G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L1G2]?> then\n                    if <[levels with gem collected v] contains [L1G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L1G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n        if <<(MapX) = [0]> and <(MapY) = [-52]>> then\n            if <[levels with gem collected v] contains [L3G1]?> then\n                if <[levels with gem collected v] contains [L3G2]?> then\n                    if <[levels with gem collected v] contains [L3G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L3G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L3G2]?> then\n                    if <[levels with gem collected v] contains [L3G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L3G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n        if <<(MapX) = [96]> and <(MapY) = [-148]>> then\n            if <[levels with gem collected v] contains [L4G1]?> then\n                if <[levels with gem collected v] contains [L4G2]?> then\n                    if <[levels with gem collected v] contains [L4G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L4G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L4G2]?> then\n                    if <[levels with gem collected v] contains [L4G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L4G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n        if <<(MapX) = [192]> and <(MapY) = [44]>> then\n            if <[levels with gem collected v] contains [L5G1]?> then\n                if <[levels with gem collected v] contains [L5G2]?> then\n                    if <[levels with gem collected v] contains [L5G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L5G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L5G2]?> then\n                    if <[levels with gem collected v] contains [L5G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L5G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n        if <<(MapX) = [0]> and <(MapY) = [44]>> then\n            if <[levels with gem collected v] contains [L6G1]?> then\n                if <[levels with gem collected v] contains [L6G2]?> then\n                    if <[levels with gem collected v] contains [L6G3]?> then\n                        switch costume to (123 v)\n                    else\n                        switch costume to (12 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L6G3]?> then\n                        switch costume to (13 v)\n                    else\n                        switch costume to (1 v)\n                    end\n                end\n            else\n                if <[levels with gem collected v] contains [L6G2]?> then\n                    if <[levels with gem collected v] contains [L6G3]?> then\n                        switch costume to (23 v)\n                    else\n                        switch costume to (2 v)\n                    end\n                else\n                    if <[levels with gem collected v] contains [L6G3]?> then\n                        switch costume to (3 v)\n                    else\n                        switch costume to (0 v)\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\n@ExitButton\n\nwhen flag clicked\nforever\n    if <<[0] < (Level)> and <<not <(ScreenX) = [14]>> and <<not <<(Level) = [2]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>>> and <<not <<(Level) = [4]> and <<(ScreenX) = [5]> and <(ScreenY) = [6]>>>> and <not <<(Level) = [5]> and <<(ScreenX) = [7]> and <(ScreenY) = [0]>>>>>>>> then\n        set size to (100) %\n        go to x: (-210) y: (140)\n        show\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                set [level v] to [0]\n                set [menu v] to [Map]\n            end\n        else\n            switch costume to (1 v)\n        end\n    else\n        if <(Menu) = [Shop]> then\n            go to x: (-200) y: (-164)\n            show\n            set size to (150) %\n            if <touching (mouse-pointer v)?> then\n                switch costume to (2 v)\n                if <mouse down?> then\n                    set [level v] to [0]\n                    set [menu v] to [Map]\n                end\n            else\n                switch costume to (1 v)\n            end\n        else\n            hide\n        end\n    end\nend\n\n@Advice\n\nwhen flag clicked\nforever\n    if <<(Level) = [1]> and <(ScreenX) = [1]>> then\n        switch costume to (costume1 v)\n        show\n    else\n        if <<(Level) = [1]> and <(ScreenX) = [3]>> then\n            switch costume to (costume2 v)\n            show\n        else\n            if <<(Level) = [1]> and <(ScreenX) = [4]>> then\n                switch costume to (costume3 v)\n                show\n            else\n                if <<(Level) = [1]> and <(ScreenX) = [5]>> then\n                    switch costume to (costume4 v)\n                    show\n                else\n                    if <<(Level) = [1]> and <(ScreenX) = [9]>> then\n                        switch costume to (costume5 v)\n                        show\n                    else\n                        if <(Menu) = [Shop]> then\n                            switch costume to (costume6 v)\n                            show\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Spike\n\nwhen flag clicked\nforever\n    hide\n    if <(SLIDE) = [0]> then\n        if <<(Level) = [2]> and <<(ScreenX) = [1]> and <(ScreenY) = [4]>>> then\n            go to x: (144) y: (-140)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n            go to x: (-48) y: (-124)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [2]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n            go to x: (16) y: (-12)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [3]> and <(ScreenX) = [13]>> then\n            go to x: (-52) y: (-76)\n            switch costume to (2 v)\n            show\n        end\n        if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n            go to x: (-48) y: (-116)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [4]> and <<(ScreenX) = [3]> and <(ScreenY) = [5]>>> then\n            go to x: (16) y: (-116)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [4]> and <<(ScreenX) = [4]> and <(ScreenY) = [5]>>> then\n            go to x: (160) y: (124)\n            switch costume to (3 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [1]> and <(ScreenY) = [5]>>> then\n            go to x: (16) y: (-148)\n            switch costume to (4 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [4]>>> then\n            go to x: (-180) y: (-108)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>> then\n            go to x: (80) y: (-132)\n            switch costume to (5 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [4]> and <(ScreenY) = [3]>>> then\n            go to x: (-80) y: (-132)\n            switch costume to (6 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [1]> and <(ScreenY) = [0]>>> then\n            go to x: (16) y: (-112)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [6]> and <<(ScreenX) = [4]> and <(ScreenY) = [0]>>> then\n            go to x: (-112) y: (-110)\n            switch costume to (6 v)\n            show\n        end\n        if <<(Level) = [6]> and <<(ScreenX) = [4]> and <(ScreenY) = [1]>>> then\n            go to x: (-176) y: (-116)\n            switch costume to (7 v)\n            show\n        end\n        if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [2]>>> then\n            go to x: (16) y: (-60)\n            switch costume to (8 v)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (playerphysics v)?> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\n@Spike2\n\nwhen flag clicked\nforever\n    hide\n    if <(SLIDE) = [0]> then\n        if <<(Level) = [2]> and <<(ScreenX) = [2]> and <(ScreenY) = [2]>>> then\n            go to x: (-176) y: (-124)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [1]>>> then\n            go to x: (80) y: (-116)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [4]> and <<(ScreenX) = [3]> and <(ScreenY) = [5]>>> then\n            go to x: (144) y: (-116)\n            switch costume to (1 v)\n            show\n        end\n        if <<(Level) = [5]> and <<(ScreenX) = [3]> and <(ScreenY) = [4]>>> then\n            go to x: (176) y: (-108)\n            switch costume to (1 v)\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (playerphysics v)?> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\n@AppleGrunt2\n\nwhen flag clicked\nforever\n    next costume\n    wait (.2) seconds\nend\n\nwhen flag clicked\nforever\n    repeat until <<not <<touching (level v)?> or <touching (walkingbricks v)?>>> or <touching (_edge_ v)?>>\n        change x by (-2)\n    end\n    change x by (5)\n    repeat until <<not <<touching (level v)?> or <touching (walkingbricks v)?>>> or <touching (_edge_ v)?>>\n        change x by (2)\n    end\n    change x by (-5)\nend\n\nwhen flag clicked\nforever\n    hide\n    if <<(Level) = [3]> and <(ScreenX) = [11]>> then\n        go to x: (64) y: (-112)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [11]>>>\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [1]>>> then\n        go to x: (100) y: (7)\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [1]>>>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (playerphysics v)?> and <(SpinMove) = [0]>> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n        create clone of (_myself_ v)\n        wait (1) seconds\n    end\n    if <touching (walkingbricks v)?> then\n        wait until <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>>\n        wait (.1) seconds\n        if <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>> then\n            if <(SLIDE) = [0]> then\n                hide\n                create clone of (_myself_ v)\n                wait (1) seconds\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nstart sound [punch-41105 v]\nturn right (180) degrees\nshow\nrepeat until <(y position) < [-180]>\n    change y by (-8)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    next costume\n    wait (.2) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\n@Jumping Enemy\n\nwhen I start as a clone\nstart sound [punch-41105 v]\nswitch costume to (1 v)\nturn right (180) degrees\nshow\nrepeat until <(y position) < [-180]>\n    change y by (-8)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    hide\n    if <<(Level) = [3]> and <(ScreenX) = [6]>> then\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [6]>>>\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [12]>> then\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [12]>>>\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [14]>> then\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [3]> and <(ScreenX) = [14]>>>\n    end\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>> then\n        show\n        wait until <<not <(SLIDE) = [0]>> or <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>>>\n        if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n            set [bounce v] to [1]\n            wait (.01) seconds\n            hide\n        end\n        hide\n        wait until <not <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>>>\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n        create clone of (_myself_ v)\n        wait (1) seconds\n    end\n    if <touching (walkingbricks v)?> then\n        wait until <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>>\n        wait (.1) seconds\n        if <<not <touching (walkingbricks v)?>> and <not <touching (level v)?>>> then\n            if <(SLIDE) = [0]> then\n                hide\n                create clone of (_myself_ v)\n                wait (1) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> and <(ScreenX) = [6]>> then\n        go to x: (0) y: (-76)\n        switch costume to (1 v)\n        change y by (32)\n        wait (.03) seconds\n        change y by (32)\n        wait (.03) seconds\n        change y by (16)\n        wait (.03) seconds\n        change y by (8)\n        wait (.03) seconds\n        change y by (4)\n        wait (.03) seconds\n        change y by (2)\n        wait (.03) seconds\n        change y by (1)\n        wait (.1) seconds\n        change y by (-1)\n        wait (.03) seconds\n        change y by (-2)\n        wait (.03) seconds\n        change y by (-4)\n        wait (.03) seconds\n        change y by (-8)\n        wait (.03) seconds\n        change y by (-16)\n        wait (.03) seconds\n        change y by (-32)\n        wait (.03) seconds\n        change y by (-32)\n        switch costume to (2 v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [12]>> then\n        go to x: (16) y: (-76)\n        switch costume to (1 v)\n        change y by (32)\n        wait (.03) seconds\n        change y by (32)\n        wait (.03) seconds\n        change y by (16)\n        wait (.03) seconds\n        change y by (8)\n        wait (.03) seconds\n        change y by (4)\n        wait (.03) seconds\n        change y by (2)\n        wait (.03) seconds\n        change y by (1)\n        wait (.1) seconds\n        change y by (-1)\n        wait (.03) seconds\n        change y by (-2)\n        wait (.03) seconds\n        change y by (-4)\n        wait (.03) seconds\n        change y by (-8)\n        wait (.03) seconds\n        change y by (-16)\n        wait (.03) seconds\n        change y by (-32)\n        wait (.03) seconds\n        change y by (-32)\n        switch costume to (2 v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [14]>> then\n        go to x: (0) y: (-76)\n        switch costume to (1 v)\n        change y by (32)\n        wait (.03) seconds\n        change y by (32)\n        wait (.03) seconds\n        change y by (16)\n        wait (.03) seconds\n        change y by (8)\n        wait (.03) seconds\n        change y by (4)\n        wait (.03) seconds\n        change y by (2)\n        wait (.03) seconds\n        change y by (1)\n        wait (.1) seconds\n        change y by (-1)\n        wait (.03) seconds\n        change y by (-2)\n        wait (.03) seconds\n        change y by (-4)\n        wait (.03) seconds\n        change y by (-8)\n        wait (.03) seconds\n        change y by (-16)\n        wait (.03) seconds\n        change y by (-32)\n        wait (.03) seconds\n        change y by (-32)\n        switch costume to (2 v)\n        wait (.5) seconds\n    end\n    if <<(Level) = [4]> and <<(ScreenX) = [2]> and <(ScreenY) = [3]>>> then\n        go to x: (80) y: (-36)\n        switch costume to (1 v)\n        change y by (32)\n        wait (.03) seconds\n        change y by (32)\n        wait (.03) seconds\n        change y by (16)\n        wait (.03) seconds\n        change y by (8)\n        wait (.03) seconds\n        change y by (4)\n        wait (.03) seconds\n        change y by (2)\n        wait (.03) seconds\n        change y by (1)\n        wait (.1) seconds\n        change y by (-1)\n        wait (.03) seconds\n        change y by (-2)\n        wait (.03) seconds\n        change y by (-4)\n        wait (.03) seconds\n        change y by (-8)\n        wait (.03) seconds\n        change y by (-16)\n        wait (.03) seconds\n        change y by (-32)\n        wait (.03) seconds\n        change y by (-32)\n        switch costume to (2 v)\n        wait (.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (playerphysics v)?> and <(SpinMove) = [0]>> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\n@Crate\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nset [powerup v] to [0]\nforever\n    hide\n    if <<(Level) = [3]> and <(ScreenX) = [2]>> then\n        if <(SLIDE) = [0]> then\n            go to x: (64) y: (-12)\n            show\n            switch costume to (costume1 v)\n            set size to (400) %\n            clear graphic effects\n            if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n                start sound [rock-destroy-6409 v]\n                switch costume to (costume2 v)\n                repeat (10)\n                    change size by (25)\n                    change [ghost v] effect by (3)\n                end\n                hide\n                create clone of (super horn v)\n                wait until <not <<(Level) = [3]> and <(ScreenX) = [2]>>>\n            end\n        end\n    end\n    if <<(Level) = [3]> and <(ScreenX) = [10]>> then\n        if <(SLIDE) = [0]> then\n            go to x: (0) y: (-108)\n            show\n            switch costume to (costume1 v)\n            set size to (400) %\n            clear graphic effects\n            if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n                start sound [rock-destroy-6409 v]\n                switch costume to (costume2 v)\n                repeat (10)\n                    change size by (25)\n                    change [ghost v] effect by (3)\n                end\n                hide\n                create clone of (super horn v)\n                wait until <not <<(Level) = [3]> and <(ScreenX) = [10]>>>\n            end\n        end\n    end\n    if <<(Level) = [5]> and <<(ScreenX) = [5]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            go to x: (32) y: (52)\n            show\n            switch costume to (costume1 v)\n            set size to (400) %\n            clear graphic effects\n            if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n                start sound [rock-destroy-6409 v]\n                switch costume to (costume2 v)\n                repeat (10)\n                    change size by (25)\n                    change [ghost v] effect by (3)\n                end\n                hide\n                create clone of (air horn v)\n                wait until <not <<(Level) = [5]> and <<(ScreenX) = [5]> and <(ScreenY) = [0]>>>>\n            end\n        end\n    end\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            go to x: (128) y: (-140)\n            show\n            switch costume to (costume1 v)\n            set size to (400) %\n            clear graphic effects\n            if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n                start sound [rock-destroy-6409 v]\n                switch costume to (costume2 v)\n                repeat (10)\n                    change size by (25)\n                    change [ghost v] effect by (3)\n                end\n                hide\n                create clone of (air horn v)\n                wait until <not <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>>>\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\n@Super Horn\n\nwhen flag clicked\nforever\n    if <(Level) = [1.8]> then\n        go to x: (-128) y: (-32)\n        show\n        switch costume to (costume1 v)\n        set size to (400) %\n        set [ghost v] effect to (0)\n        if <touching (unicherrysprite v)?> then\n            start sound [Collect v]\n            set [powerup v] to [1]\n            switch costume to (costume2 v)\n            clear graphic effects\n            show\n            repeat (10)\n                change [brightness v] effect by (5)\n                change size by (50)\n                change [ghost v] effect by (5)\n            end\n            set [ghost v] effect to (100)\n            wait until <not <touching (unicherrysprite v)?>>\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(SLIDE) = [0]>> then\n        delete this clone\n    end\n    if <(Level) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to (crate v)\nset size to (400) %\nshow\nswitch costume to (costume1 v)\nrepeat (16)\n    change y by (4)\nend\nforever\n    if <touching (unicherrysprite v)?> then\n        start sound [Collect v]\n        set [powerup v] to [1]\n        switch costume to (costume2 v)\n        clear graphic effects\n        show\n        repeat (10)\n            change [brightness v] effect by (5)\n            change size by (50)\n            change [ghost v] effect by (5)\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\n@Air Horn\n\nwhen flag clicked\nforever\n    if <(Level) = [1.8]> then\n        go to x: (0) y: (-32)\n        show\n        switch costume to (costume1 v)\n        set size to (400) %\n        set [ghost v] effect to (0)\n        if <touching (unicherrysprite v)?> then\n            start sound [Collect v]\n            set [powerup v] to [2]\n            switch costume to (costume2 v)\n            clear graphic effects\n            show\n            repeat (10)\n                change [brightness v] effect by (5)\n                change size by (50)\n                change [ghost v] effect by (5)\n            end\n            set [ghost v] effect to (100)\n            wait until <not <touching (unicherrysprite v)?>>\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(SLIDE) = [0]>> then\n        delete this clone\n    end\n    if <(Level) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to (crate v)\nset size to (400) %\nshow\nswitch costume to (costume1 v)\nrepeat (16)\n    change y by (4)\nend\nforever\n    if <touching (unicherrysprite v)?> then\n        start sound [Collect v]\n        set [powerup v] to [2]\n        switch costume to (costume2 v)\n        clear graphic effects\n        show\n        repeat (10)\n            change [brightness v] effect by (5)\n            change size by (50)\n            change [ghost v] effect by (5)\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\n@Unihorn\n\nwhen flag clicked\nforever\n    if <(Level) = [1.8]> then\n        go to x: (128) y: (-32)\n        show\n        switch costume to (costume1 v)\n        set size to (400) %\n        set [ghost v] effect to (0)\n        if <touching (unicherrysprite v)?> then\n            start sound [Collect v]\n            set [powerup v] to [3]\n            switch costume to (costume2 v)\n            clear graphic effects\n            show\n            repeat (10)\n                change [brightness v] effect by (5)\n                change size by (50)\n                change [ghost v] effect by (5)\n            end\n            set [ghost v] effect to (100)\n            wait until <not <touching (unicherrysprite v)?>>\n        end\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(SLIDE) = [0]>> then\n        delete this clone\n    end\n    if <(Level) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to (crate v)\nset size to (400) %\nshow\nswitch costume to (costume1 v)\nrepeat (16)\n    change y by (4)\nend\nforever\n    if <touching (unicherrysprite v)?> then\n        start sound [Collect v]\n        set [powerup v] to [3]\n        switch costume to (costume2 v)\n        clear graphic effects\n        show\n        repeat (10)\n            change [brightness v] effect by (5)\n            change size by (50)\n            change [ghost v] effect by (5)\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\n@Key\n\nwhen flag clicked\nhide\ndelete all of [worldkey v]\nforever\n    if <(Level) = [3]> then\n        if <(ScreenX) = [12]> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (16) y: (128)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (KeyGlow v)\n                        broadcast (Key1 v)\n                        add [1] to [worldkey v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\n@KeyGlow\n\nwhen I receive [keyglow v]\nset [color v] effect to (0)\ngo to (key v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (50)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [redkeyglow v]\ngo to (blue diamond v)\nset [color v] effect to (100)\nset size to (400) %\nclear graphic effects\nset [color v] effect to (100)\nshow\nrepeat (20)\n    change [brightness v] effect by (2.5)\n    change size by (75)\n    change [ghost v] effect by (2.5)\nend\nhide\n\nclear graphic effects\n\n@YellowGems5\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.2) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [1]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (176) y: (60)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem5 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [1.5]> and <(ScreenX) = [2]>> then\n        if <(SLIDE) = [0]> then\n            show\n            go to x: (-176) y: (60)\n            if <touching (unicherrysprite v)?> then\n                hide\n                broadcast (YGem5 v)\n                change [gemcount v] by (1)\n                play sound [cartoon_wink_magic_sparkle-6896 v] until done\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@YellowGemGlow5\n\nwhen I receive [ygem5 v]\ngo to (yellowgems5 v)\nset size to (400) %\nclear graphic effects\nshow\nrepeat (10)\n    change [brightness v] effect by (5)\n    change size by (10)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Shop Button\n\nwhen flag clicked\ngo to x: (-200) y: (136)\nforever\n    if <(Menu) = [Map]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n            if <mouse down?> then\n                set [level v] to [0]\n                set [menu v] to [Shop]\n            end\n        else\n            switch costume to (1 v)\n        end\n    else\n        hide\n    end\nend\n\n@UnicherryHat\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [1]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryShades\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [2]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryCrown\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [3]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@Uniberry\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [4]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryNinja\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [5]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherrySnowman\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [6]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryRobot\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [7]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryClown\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [8]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryGlasses\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [9]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryMonochrome\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [10]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryShoes\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [11]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryApple\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [12]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryShadow\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [13]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@UnicherryMoonwalk\n\nwhen flag clicked\nforever\n    if <(POWERUP) = [3]> then\n        repeat until <<not <(POWERUP) = [3]>> or <<[0] < (Level)> and <not <<(Level) = [1.5]> or <(Level) = [1.8]>>>>>\n            change [color v] effect by (5)\n            set [brightness v] effect to (10)\n        end\n        if <(POWERUP) = [3]> then\n            set [brightness v] effect to (10)\n            repeat (500)\n                change [color v] effect by (5)\n            end\n            repeat (100)\n                set [ghost v] effect to (50)\n                change [color v] effect by (5)\n                wait (.01) seconds\n            end\n            set [ghost v] effect to (0)\n            set [powerup v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(POWERUP) = [3]>> then\n        set [color v] effect to (0)\n        set [ghost v] effect to (0)\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen flag clicked\nhide\nset [gameover v] to [0]\nset [firsttime v] to [0]\nforever\n    if <<[0] < (Level)> and <(Costume) = [14]>> then\n        if <(Level) = [1]> then\n            if <<(ScreenX) = [1]> and <(FirstTime) = [0]>> then\n                wait (2) seconds\n                set [firsttime v] to [1]\n            end\n        end\n        show\n        set [ghost v] effect to (0)\n        if <(GameOver) = [1]> then\n            if <(POWERUP) = [0]> then\n                start sound [short-oww-46070 v]\n                set [stop v] to [1]\n                switch costume to (game over v)\n                repeat (10)\n                    change y by (10)\n                end\n                wait (.1) seconds\n                switch costume to (game over2 v)\n                repeat until <(y position) < [-190]>\n                    change y by (-10)\n                end\n                hide\n                broadcast (GameOver v)\n                wait (.8) seconds\n                repeat until <(GameOver) = [0]>\n                    point in direction (90)\n                    show\n                    set [direction v] to [90]\n                    go to (playerphysics v)\n                    switch costume to (idel v)\n                end\n            else\n                set [gameover v] to [0]\n                set [powerup v] to [0]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <not <(MOTION) = [Spin]>> then\n        point in direction (Direction)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Idel]> then\n            switch costume to (idel2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: idel2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: idel2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Walk]> then\n            switch costume to (walk2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: walk2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: walk2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Jump]> then\n            switch costume to (jump1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: jump v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: jump v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Fall]> then\n            switch costume to (fall2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: fall2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: fall2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <not <(GameOver) = [1]>> then\n        go to (playerphysics v)\n    end\nend\n\nwhen flag clicked\nset [spinmove v] to [0]\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            if <(Direction) = [90]> then\n                switch costume to (newspin v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin1 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin v)\n                end\n                turn right (-45) degrees\n            end\n            if <(Direction) = [-90]> then\n                switch costume to (newspin2 v)\n                if <(POWERUP) = [1]> then\n                    switch costume to (sh: newspin2 v)\n                end\n                if <(POWERUP) = [2]> then\n                    switch costume to (ah: newspin2 v)\n                end\n                turn left (-45) degrees\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Spin]> then\n            set rotation style [all around v]\n            set size to (450) %\n        else\n            set rotation style [left-right v]\n            set size to (400) %\n        end\n    end\n    if <(GameOver) = [1]> then\n        set rotation style [left-right v]\n        set size to (400) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(GameOver) = [0]> then\n        if <(MOTION) = [Win]> then\n            switch costume to (win1 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win1 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win1 v)\n            end\n            wait (.3) seconds\n        end\n        if <(MOTION) = [Win]> then\n            switch costume to (win2 v)\n            if <(POWERUP) = [1]> then\n                switch costume to (sh: win2 v)\n            end\n            if <(POWERUP) = [2]> then\n                switch costume to (ah: win2 v)\n            end\n            wait (.3) seconds\n        end\n    end\nend\n\n@Shop1\n\nwhen flag clicked\nadd [0] to [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-200) y: (50)\n        show\n        set size to (100) %\n        if <not <(Costume) = [0]>> then\n            if <[costumesbought v] contains [0]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [0]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[24] < (GemCount)> then\n                            change [gemcount v] by (-25)\n                            add [0] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nadd [0] to [costumesbought v]\n\n@Shop2\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-100) y: (50)\n        show\n        set size to (100) %\n        if <not <(Costume) = [1]>> then\n            if <[costumesbought v] contains [1]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [1]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [1] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop3\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (0) y: (50)\n        show\n        set size to (100) %\n        if <not <(Costume) = [2]>> then\n            if <[costumesbought v] contains [2]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [2]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [2] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop4\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (100) y: (50)\n        show\n        set size to (100) %\n        if <not <(Costume) = [3]>> then\n            if <[costumesbought v] contains [3]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [3]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [3] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop5\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (200) y: (50)\n        show\n        set size to (100) %\n        if <not <(Costume) = [4]>> then\n            if <[costumesbought v] contains [4]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [4]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [4] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop6\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-200) y: (-25)\n        show\n        set size to (100) %\n        if <not <(Costume) = [5]>> then\n            if <[costumesbought v] contains [5]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [5]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [5] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop7\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-100) y: (-25)\n        show\n        set size to (100) %\n        if <not <(Costume) = [6]>> then\n            if <[costumesbought v] contains [6]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [6]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [6] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop8\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (0) y: (-25)\n        show\n        set size to (100) %\n        if <not <(Costume) = [7]>> then\n            if <[costumesbought v] contains [7]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [7]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [7] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop9\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (100) y: (-25)\n        show\n        set size to (100) %\n        if <not <(Costume) = [8]>> then\n            if <[costumesbought v] contains [8]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [8]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [8] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop10\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (200) y: (-25)\n        show\n        set size to (100) %\n        if <not <(Costume) = [9]>> then\n            if <[costumesbought v] contains [9]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [9]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [9] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop11\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-200) y: (-100)\n        show\n        set size to (100) %\n        if <not <(Costume) = [10]>> then\n            if <[costumesbought v] contains [10]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [10]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [10] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop12\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (-100) y: (-100)\n        show\n        set size to (100) %\n        if <not <(Costume) = [11]>> then\n            if <[costumesbought v] contains [11]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [11]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [11] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop13\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (0) y: (-100)\n        show\n        set size to (100) %\n        if <not <(Costume) = [12]>> then\n            if <[costumesbought v] contains [12]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [12]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [12] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop14\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (100) y: (-100)\n        show\n        set size to (100) %\n        if <not <(Costume) = [13]>> then\n            if <[costumesbought v] contains [13]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [13]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [13] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Shop15\n\nwhen flag clicked\nadd [0] to [costumesbought v]\ndelete all of [costumesbought v]\nforever\n    if <(Menu) = [Shop]> then\n        go to x: (200) y: (-100)\n        show\n        set size to (100) %\n        if <not <(Costume) = [14]>> then\n            if <[costumesbought v] contains [14]?> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (2 v)\n                    if <mouse down?> then\n                        set [costume v] to [14]\n                    end\n                else\n                    switch costume to (1 v)\n                end\n            else\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (4 v)\n                    if <mouse down?> then\n                        if <[4] < (GemCount)> then\n                            change [gemcount v] by (-5)\n                            add [14] to [costumesbought v]\n                        end\n                    end\n                else\n                    switch costume to (3 v)\n                end\n            end\n        else\n            switch costume to (5 v)\n        end\n    else\n        hide\n    end\nend\n\n@Blue Diamond\n\nwhen flag clicked\nhide\ndelete all of [diamondlist v]\nforever\n    if <(Level) = [4]> then\n        if <<(ScreenX) = [2]> and <(ScreenY) = [6]>> then\n            if <(SLIDE) = [0]> then\n                show\n                go to x: (80) y: (116)\n                if <touching (unicherrysprite v)?> then\n                    if <(SLIDE) = [0]> then\n                        hide\n                        broadcast (KeyGlow v)\n                        broadcast (RedKeyGlow v)\n                        add [1] to [diamondlist v]\n                        play sound [Magic Spell v] until done\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (10)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nforever\n    switch costume to (1 v)\n    wait (.15) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\n    switch costume to (3 v)\n    wait (.08) seconds\n    switch costume to (2 v)\n    wait (.08) seconds\nend\n\n@Drawing\n\n@Crate2\n\nwhen I receive [gameover2 v]\nhide\n\nwhen flag clicked\nset [powerup v] to [0]\nforever\n    hide\n    if <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>> then\n        if <(SLIDE) = [0]> then\n            go to x: (-160) y: (-44)\n            show\n            switch costume to (costume1 v)\n            set size to (400) %\n            clear graphic effects\n            if <<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> then\n                start sound [rock-destroy-2 v]\n                switch costume to (costume2 v)\n                repeat (10)\n                    change size by (25)\n                    change [ghost v] effect by (3)\n                end\n                hide\n                create clone of (super horn2 v)\n                wait until <not <<(Level) = [6]> and <<(ScreenX) = [6]> and <(ScreenY) = [0]>>>>\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\n@Super Horn2\n\nwhen I start as a clone\nforever\n    if <not <(SLIDE) = [0]>> then\n        delete this clone\n    end\n    if <(Level) = [0]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\ngo to (crate2 v)\nset size to (400) %\nshow\nswitch costume to (costume1 v)\nrepeat (16)\n    change y by (4)\nend\nforever\n    if <touching (unicherrysprite v)?> then\n        set [powerup v] to [1]\n        switch costume to (costume2 v)\n        clear graphic effects\n        show\n        repeat (10)\n            change [brightness v] effect by (5)\n            change size by (50)\n            change [ghost v] effect by (5)\n        end\n        hide\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\nwhen flag clicked\nforever\n    set [brightness v] effect to (0)\n    wait (.3) seconds\n    set [brightness v] effect to (5)\n    wait (.3) seconds\nend\n\n@LockedBlock\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        show\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>\n        hide\n    end\nend\n\nwhen I receive [bossdefeated v]\ngo to x: (-224) y: (-116)\nglide (3) secs to x: (-224) y: (-52)\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        go to x: (-224) y: (-116)\n        wait until <not <(Level) = [6]>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(SLIDE) = [0]>> then\n        hide\n    end\nend\n\n@AppleGruntBoss\n\nwhen I start as a clone\nset rotation style [all around v]\nstart sound [punch-41105 v]\nturn right (180) degrees\nshow\nrepeat until <(y position) < [-180]>\n    change y by (-4)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (0)\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        wait until <<<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> or <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>>\n        if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n            set [ghost v] effect to (50)\n            set [bounce v] to [1]\n            wait (1) seconds\n            set [ghost v] effect to (0)\n            wait until <<<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> or <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>>\n            if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n                set [ghost v] effect to (50)\n                set [bounce v] to [1]\n                wait (1) seconds\n                set [ghost v] effect to (0)\n                wait until <<<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> or <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>>\n                if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n                    set [ghost v] effect to (50)\n                    set [bounce v] to [1]\n                    wait (1) seconds\n                    set [ghost v] effect to (0)\n                    wait until <<<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> or <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>>\n                    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n                        set [ghost v] effect to (50)\n                        set [bounce v] to [1]\n                        wait (1) seconds\n                        set [ghost v] effect to (0)\n                        wait until <<<touching (unicherrysprite v)?> and <[0] < (SpinMove)>> or <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>>\n                        if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n                            set [bounce v] to [1]\n                            hide\n                            create clone of (_myself_ v)\n                            broadcast (BossDefeated v) and wait\n                            wait until <not <(Level) = [6]>>\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (playerphysics v)?> and <(SpinMove) = [0]>> then\n        if <not <(POWERUP) = [3]>> then\n            set [gameover v] to [1]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    next costume\n    wait (.2) seconds\nend\n\nwhen flag clicked\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        point in direction (-90)\n        go to x: (-176) y: (-100)\n        if <<(ScreenX) = [3]> and <(ScreenY) = [1]>> then\n            wait (1) seconds\n            go to x: (-176) y: (-100)\n            repeat (44)\n                if <<(ScreenX) = [3]> and <(ScreenY) = [1]>> then\n                    change x by (8)\n                end\n            end\n            point in direction (90)\n            if <<(ScreenX) = [3]> and <(ScreenY) = [1]>> then\n                wait (1) seconds\n                repeat (44)\n                    if <<(ScreenX) = [3]> and <(ScreenY) = [1]>> then\n                        change x by (-8)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\n    if <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>> then\n        show\n        wait until <not <<(Level) = [6]> and <<(ScreenX) = [3]> and <(ScreenY) = [1]>>>>\n    else\n        hide\n    end\nend\n\n@Level Name\n\nwhen flag clicked\ngo to x: (-20) y: (164)\nforever\n    if <<(Menu) = [Map]> and <<(World) = [1]> and <<<(MapX) = [-192]> and <(MapY) = [-148]>> or <<<(MapX) = [0]> and <(MapY) = [-148]>> or <<<(MapX) = [0]> and <(MapY) = [-52]>> or <<<(MapX) = [96]> and <(MapY) = [-148]>> or <<<(MapX) = [192]> and <(MapY) = [44]>> or <<<(MapX) = [0]> and <(MapY) = [44]>> or <<<(MapX) = [-192]> and <(MapY) = [44]>> or <<(MapX) = [192]> and <(MapY) = [-148]>>>>>>>>>>> then\n        show\n        if <<(MapX) = [0]> and <(MapY) = [-148]>> then\n            switch costume to (costume2 v)\n        end\n        if <<(MapX) = [-192]> and <(MapY) = [-148]>> then\n            switch costume to (costume1 v)\n        end\n        if <<(MapX) = [0]> and <(MapY) = [-52]>> then\n            switch costume to (costume3 v)\n        end\n        if <<(MapX) = [96]> and <(MapY) = [-148]>> then\n            switch costume to (costume4 v)\n        end\n        if <<(MapX) = [192]> and <(MapY) = [44]>> then\n            switch costume to (costume5 v)\n        end\n        if <<(MapX) = [0]> and <(MapY) = [44]>> then\n            switch costume to (costume6 v)\n        end\n        if <<(MapX) = [-192]> and <(MapY) = [44]>> then\n            switch costume to (costume7 v)\n        end\n        if <<(MapX) = [192]> and <(MapY) = [-148]>> then\n            switch costume to (costume8 v)\n        end\n    else\n        hide\n    end\nend\n\n@Easy Mode\n\nwhen flag clicked\ngo to x: (-160) y: (-4)\nset [hardmode v] to [0]\nforever\n    if <(Menu) = [Main Menu]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            say [No Checkpoints]\n            switch costume to (2 v)\n            if <mouse down?> then\n                broadcast (CharacterReset v)\n                wait (.01) seconds\n                set [hardmode v] to [1]\n                set [level v] to [1]\n                set [screenx v] to [1]\n                set [screeny v] to [0]\n                set [checkpointx v] to [1]\n                set [checkpointy v] to [0]\n                set [checkpointposx v] to [-204]\n                set [checkpointposy v] to [-140]\n                set [menu v] to [0]\n                set [stop v] to [0]\n            end\n        else\n            say []\n            switch costume to (1 v)\n        end\n    else\n        hide\n    end\nend\n\n@Speedrun Mode\n\nwhen flag clicked\ngo to x: (-160) y: (-68)\nset [speedrunmode v] to [0]\nforever\n    if <(Menu) = [Main Menu]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            say [Try to beat the game as fast as possible!]\n            switch costume to (2 v)\n            if <mouse down?> then\n                broadcast (CharacterReset v)\n                wait (.01) seconds\n                set [speedrunmode v] to [1]\n                set [level v] to [1]\n                set [screenx v] to [1]\n                set [screeny v] to [0]\n                set [checkpointx v] to [1]\n                set [checkpointy v] to [0]\n                set [checkpointposx v] to [-204]\n                set [checkpointposy v] to [-140]\n                set [menu v] to [0]\n                set [stop v] to [0]\n            end\n        else\n            say []\n            switch costume to (1 v)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(SpeedrunMode) = [1]> or <(100%Mode) = [1]>> then\n        show variable [timer v]\n    else\n        hide variable [timer v]\n    end\nend\n\nwhen flag clicked\nset [gamefinished v] to [0]\nforever\n    if <(SpeedrunMode) = [1]> then\n        reset timer\n        repeat until <(GameFinished) = [1]>\n            set [timer v] to (timer)\n        end\n        if <(Timer) < (☁ SpeedrunFastestTime)> then\n            set [☁ speedrunfastesttime v] to (Timer)\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nset [gamefinished v] to [0]\nforever\n    if <(100%Mode) = [1]> then\n        reset timer\n        repeat until <<(GameFinished) = [1]> and <<(length of [worldkey v]) = [1]> and <<(length of [diamondlist v]) = [1]> and <<(length of [diamondlist v]) = [1]> and <<(length of [levels with gem collected v]) = [18]> and <(GemCount) = ((75) - ((length of [costumesbought v]) * (5)))>>>>>>\n            set [timer v] to (timer)\n        end\n        if <(Timer) < (☁ 100%FastestTime)> then\n            set [☁ 100%fastesttime v] to (Timer)\n            stop [this script v]\n        end\n    end\nend\n\n@100% Run Mode\n\nwhen flag clicked\nset [100%mode v] to [0]\ngo to x: (-160) y: (-132)\nforever\n    if <(Menu) = [Main Menu]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            switch costume to (2 v)\n            say [Beat the game as fast as possible while collecting 70 Yellow Gems, 18 Purple Gems, 1 Key, 1 Blue Diamond, and the final Rainbow Gem.]\n            if <mouse down?> then\n                broadcast (CharacterReset v)\n                wait (.01) seconds\n                set [100%mode v] to [1]\n                set [level v] to [1]\n                set [screenx v] to [1]\n                set [screeny v] to [0]\n                set [checkpointx v] to [1]\n                set [checkpointy v] to [0]\n                set [checkpointposx v] to [-204]\n                set [checkpointposy v] to [-140]\n                set [menu v] to [0]\n                set [stop v] to [0]\n            end\n        else\n            say []\n            switch costume to (1 v)\n        end\n    else\n        hide\n    end\nend\n\n@Cover\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n