Crimson Forest | Multiplayer Platformer

Instructions: WASD or arrow keys to move and jump, you can also use space to jump. There are instructions in the game also. To restart, press r. All levels are possible. Good luck! It will maybe glitch after the last level! XD

@Stage\n\nwhen flag clicked\nset [first boot? v] to [1]\nSet up\nset [level v] to [0]\n\nwhen I receive [menu v]\nif <(First boot?) = [1]> then\n    set [first boot? v] to [0]\n    stop all sounds\n    set volume to (100) %\n    forever\n        play sound [menu v] until done\n    end\nelse\nend\n\ndefine Set up\ndelete (all) of [level stars v]\nrepeat (12)\n    insert [0] at (1) of [level stars v] \nend\n\nwhen I receive [play v]\nset [stars v] to [0]\nset [blue key? v] to [0]\nset [gold key? v] to [0]\nset [orange key? v] to [0]\nset [green key? v] to [0]\nset [go through door? v] to [0]\nset [toching door? v] to [0]\nset [player control? v] to [yes]\nset [smash? v] to [0]\nset [smash x? v] to [0]\nset [smash y v] to [0]\nset [menu? v] to [no]\n\nwhen I receive [menu sound v]\nrepeat (25)\n    change volume by (-4)\nend\nstop [other scripts in stage v]\nstop all sounds\nset volume to (100) %\nforever\n    play sound [menu v] until done\nend\n\nwhen I receive [sound v]\nrepeat (25)\n    change volume by (-4)\nend\nstop [other scripts in stage v]\nstop all sounds\nset volume to (100) %\nstart sound [game 2 v]\n\n@Player\n\ndefine Get Touching <>\nif <touching (blocks v)?> then\n    set [touch v] to [9]\nelse\n    if <touching (ground v)?> then\n        set [touch v] to [9]\n    else\n        if <<check platform?> and <touching (platforms v)?>> then\n            set [touch v] to [1]\n        else\n            set [touch v] to [0]\n        end\n    end\nend\n\ndefine None\nchange [plyr speed x v] by ((1.5) * (dir))\npoint in direction ((90) * (dir))\nchange [frame v] by (1)\nif <<(falling?) < [4]> and <((frame) mod (4)) = [1]>> then\n    if <(Sounds) > [0]> then\n        start sound [footstep cloud v]\n    end\nend\n\ndefine None\nchange x by (speed)\nset [slope v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope) = [8]> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (speed)\n        if <(plyr speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    else\n        if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <([abs v] of (speed) ) > [2.5]>> then\n            if <<(touch) > [1]> and <(wall jump) < [8]>> then\n                set [plyr speed x v] to ((-1.2) * (speed))\n                set [plyr speed y v] to [11]\n                set [falling? v] to [6]\n                set [wall jump v] to [15]\n                point in direction ((-90) * ((speed) / ([abs v] of (speed) )))\n                start sound [173326__soundnimja__jump-1 v]\n            else\n                set [plyr speed x v] to [0]\n            end\n        else\n            set [plyr speed x v] to [0]\n        end\n    end\nend\n\ndefine Gravity\nif <key (up arrow v) pressed?> then\n    change [plyr speed y v] by (-1)\nelse\n    if <(plyr speed y) < [4]> then\n        change [plyr speed y v] by (-1)\n    else\n        change [plyr speed y v] by (-2)\n    end\nend\nchange y by (round (plyr speed y))\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\nif <key (up arrow v) pressed?> then\n    if <(Toching door?) = [1]> then\n        Go through door\n    else\n        if <<(jump key) = [0]> and <(falling?) < [3]>> then\n            set [plyr speed y v] to [14]\n            set [falling? v] to [6]\n            set [jump key v] to [1]\n            if <(Sounds) > [0]> then\n                start sound [173326__soundnimja__jump-1 v]\n            end\n        end\n    end\nelse\n    set [jump key v] to [0]\nend\nif <key (down arrow v) pressed?> then\n    if <(falling?) > [6]> then\n        set [plyr speed y v] to [-15]\n        set [plyr speed x v] to [0]\n        set [smash x? v] to (x position)\n        broadcast (Smash look v)\n    else\n        set [in platforrm v] to [2]\n    end\nend\n\ndefine Check Hit Ceiling / Floor <>\nGet Touching <not >\nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nif <not <(touch) < (in platforrm)>> then\n    set [slope v] to (([abs v] of (round (plyr speed y)) ) + (4))\n    set [last y v] to ((y position) - (round (plyr speed y)))\n    repeat until <<(touch) < (in platforrm)> or <(slope) = [0]>>\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        Get Touching <not <up?>>\n        change [slope v] by (-1)\n        if <(touch) < [10]> then\n            set [last y v] to (y position)\n        end\n    end\n    if <(slope) = [0]> then\n        set y to (last y)\n        change x by ((0) - ((direction) / (89)))\n        set [last y v] to [999]\n        if <not <(push x) = [0]>> then\n            set [plyr speed x v] to ((push x) * (2))\n            Walk (plyr speed x)\n        end\n    else\n        set [plyr speed y v] to [0]\n    end\nend\n\ndefine Controls - Left and Right\nset [plyr speed x v] to (((plyr speed x) * (0.7)) + ((push x) * (0.3)))\nif <key (left arrow v) pressed?> then\n    Set Walk (-1)\nelse\n    if <key (right arrow v) pressed?> then\n        Set Walk (1)\n    else\n        set [frame v] to [0]\n    end\nend\n\ndefine Set Costume\nif <(Smash?) = [yes]> then\n    switch costume to (p1_duck v)\nelse\n    if <(Go through door?) = [1]> then\n        switch costume to (p1_back v)\n    else\n        if <(Hurt) = [1]> then\n            switch costume to (p1_hurt v)\n        else\n            if <(falling?) < [6]> then\n                if <<key (down arrow v) pressed?> and <<(plyr speed x) < [0.5]> and <(plyr speed x) > [-0.5]>>> then\n                    switch costume to (p1_duck v)\n                else\n                    if <(frame) = [0]> then\n                        switch costume to (p1_stand v)\n                    else\n                        switch costume to ([floor v] of ((1) + ((frame) mod (11))) )\n                    end\n                end\n            else\n                if <(plyr speed y) > [0]> then\n                    switch costume to (p1_jump v)\n                else\n                    switch costume to (p1_jump v)\n                end\n            end\n        end\n    end\nend\n\ndefine None\nchange [scroll x v] by (x)\nchange x by ((0) - (x))\n\nwhen I receive [spawn at scroll v]\ngo to x: (0) y: (150)\n\nwhen I receive [start v]\nset [life v] to [6]\nset [player control? v] to [yes]\ngo to [front v] layer\nReset Level\nset [fcount v] to [0]\nforever\n    set [lasy sy v] to (plyr speed y)\n    change [fcount v] by (1)\n    switch costume to (hitbox v)\n    if <(die) < [1]> then\n        show\n        if <(Player control?) = [yes]> then\n            Controls - Jump, Crouch\n        end\n        Gravity\n        Check Hit Ceiling / Floor <(plyr speed y) > [0]>\n        if <(wall jump) > [0]> then\n            change [wall jump v] by (-1)\n        else\n            if <(Player control?) = [yes]> then\n                Controls - Left and Right\n            end\n        end\n        Walk (plyr speed x)\n    else\n        Die Frame\n    end\n    Set Costume\n    Scroll Level (round ((x position) / (10)))\n    set [push x v] to [0]\n    broadcast (tick v) and wait\n    if <<touching (_edge_ v)?> and <(y position) < [-170]>> then\n        if <(Life) < [3]> then\n            broadcast (Menu v)\n            broadcast (Menu sound v)\n            change [life v] by (-2)\n        else\n            Reset Level\n            broadcast (Reset v)\n            change [life v] by (-2)\n        end\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\ndelete this clone\n\nwhen I receive [player flash v]\nrepeat until <(Hurt) = [0]>\n    repeat (5)\n        change [ghost v] effect by (15)\n    end\n    repeat (5)\n        change [ghost v] effect by (-15)\n    end\nend\nset [ghost v] effect to (0)\n\nwhen flag clicked\nhide\n\nif <(plyr speed x) = [0]> then\n    set [die v] to [1]\nend\n\ndefine Die Frame\nif <(die) = [1]> then\n    change [die v] by (1)\nend\nif <(y position) < [-189]> then\n    stop [this script v]\nend\nshow\nGravity\nCheck Hit Ceiling / Floor <(plyr speed y) > [0]>\nWalk (plyr speed x)\nif <(falling?) < [2]> then\n    change [die v] by (1)\n    set [plyr speed x v] to (((plyr speed x) * (0.7)) + ((push x) * (0.3)))\n    if <(die) > [60]> then\n        set [die v] to [-60]\n    end\nend\n\nif <touching (lift v)?> then\n    set [touch v] to [10]\n    set [push x v] to (lift push x)\nelse\nend\n\nwhen I receive [start v]\nwait (2) seconds\ngo to [front v] layer\n\ndefine Go through door\nif <not <(Go through door?) = [1]>> then\n    broadcast (Go through door v)\n    set [go through door? v] to [1]\nend\n\nwhen I receive [go through door v]\nset [player control? v] to [no]\nset [plyr speed x v] to [0]\nrepeat (20)\n    change x by ((((Door x) + (20)) - (x position)) * (0.5))\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Stars v) and wait\nbroadcast (Menu v)\nbroadcast (Menu sound v)\nif <(Level) < [4]> then\n    if <((Level) + (1)) > ((Level at) - (1))> then\n        change [level at v] by (1)\n    end\nend\n\nwhen I receive [smash look v]\nset [smash? v] to [yes]\nset [player control? v] to [no]\nwait until <<(falling?) = [0]> or <(plyr speed y) > [0]>>\nstart sound [nsmb_toad_house_appear v]\nwait (0.4) seconds\nset [smash? v] to [no]\nset [player control? v] to [yes]\n\ndefine Reset Level\nbroadcast (Reset v)\nset size to (30) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (180)\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [wall jump v] to [0]\nset [scroll x v] to [0]\nset [push x v] to [0]\nset [die v] to [0]\nset [hurt v] to [0]\nbroadcast (Setup v)\n\nset [fcount v] to [4000]\nset [coins# v] to [19]\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nset [coins v] to [0]\nforever\n    if <key (q v) pressed?> then\n        broadcast (Menu v)\n        broadcast (Menu sound v)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [spikes hit v]\nstart sound [smw_fireball v]\nset [player control? v] to [no]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [15]\nset [hurt v] to [1]\nswitch costume to (p1_hurt v)\nchange [life v] by (-1)\nwait (1) seconds\nif <(Life) < [1]> then\n    broadcast (Menu v)\n    broadcast (Menu sound v)\nelse\n    set [hurt v] to [2]\n    broadcast (Player flash v)\n    set [player control? v] to [yes]\n    wait (2) seconds\n    set [hurt v] to [0]\nend\n\nwhen I receive [power up 1 v]\nset [hurt v] to [2]\nbroadcast (Player flash v)\nwait (10) seconds\nset [hurt v] to [0]\n\nwhen I receive [toching block v]\nset [touch v] to [9]\n\nwhen I receive [player use spring v]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\nchange x by ((((Spring x) + (20)) - (x position)) * (0.5))\nchange y by (((Spring y) - (y position)) * (0.5))\n\nwhen I receive [stars v]\nset [plyr speed x v] to [0]\nset [plyr speed y v] to [0]\n\nwhen I receive [toching door v]\ngo to [front v] layer\n\nset [scroll x v] to [2600]\nbroadcast (spawn at scroll v)\n\nset [coins v] to [23]\n\n@Ground\n\nwhen I receive [play v]\nswitch costume to (costume1 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    set x to ([x position v] of [level v])\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\nhide\n\n@level\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nswitch costume to (costume2 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\nset y to (0)\nforever\n    set x to ((2160) - (Scroll X))\nend\n\nwhen I receive [play v]\nwait (0.2) seconds\ngo to [front v] layer\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\ngo to [front v] layer\n\n@Background 1\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (background 1 v)\ngo to [front v] layer\ngo [backward v] (100) layers\nset y to (0)\nshow\nforever\n    set x to ((1600) - ((Scroll X) / (2)))\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\nhide\nwait (0.5) seconds\nwait until <(Loading?) = [no]>\nshow\n\nwhen I receive [start v]\ngo [backward v] (100) layers\n\nhide\n\n@Objects\n\nwhen flag clicked\nhide\nwait (0.4) seconds\ngo to [front v] layer\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [play v]\nSet up\nwait (0.4) seconds\ngo to [front v] layer\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    go to [front v] layer\n    switch costume to (spikes v)\n    forever\n        if <<[-250] < (X pos)> and <[250] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n                if <(Hurt) = [0]> then\n                    if <touching (player v)?> then\n                        broadcast (Spikes hit v) and wait\n                    end\n                end\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [2]> then\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (coin v)\n    forever\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n                if <touching (player v)?> then\n                    start sound [lm_coin v]\n                    change [coins v] by (1)\n                    delete this clone\n                end\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [3]> then\n    if <(letter (17) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) = [1]> then\n        switch costume to (water 1 v)\n    else\n        if <(letter (17) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) = [2]> then\n            switch costume to (water 2 v)\n        else\n            switch costume to (water 3 v)\n        end\n    end\n    set size to (100) %\n    go [backward v] (30) layers\n    if <(letter (17) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) = [3]> then\n        forever\n            if <<[-630] < (X pos)> and <[240] > (X pos)>> then\n                if <(Loading?) = [no]> then\n                    show\n                end\n            else\n                hide\n            end\n        end\n    else\n        forever\n            if <<[-440] < (X pos)> and <[240] > (X pos)>> then\n                if <(Loading?) = [no]> then\n                    show\n                end\n            else\n                hide\n            end\n        end\n    end\nend\nif <(Clone type?) = [4]> then\n    switch costume to (gold key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            change [gold key? v] by (1)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [5]> then\n    switch costume to (green key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            change [green key? v] by (1)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [6]> then\n    switch costume to (orange key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            change [orange key? v] by (1)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [7]> then\n    switch costume to (blue key 2 v)\n    go to [front v] layer\n    set size to (50) %\n    forever\n        if <touching (player v)?> then\n            start sound [lm_coin v]\n            change [blue key? v] by (1)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [8]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<(Blue key?) = [1]> and <<(Gold key?) = [1]> and <<(Green key?) = [1]> and <(Orange key?) = [1]>>>> then\n            switch costume to (door2 v)\n            if <touching (player v)?> then\n                broadcast (Toching door v)\n                set [toching door? v] to [1]\n                set [door x v] to (x position)\n            else\n                set [toching door? v] to [0]\n            end\n        else\n            switch costume to (door1 v)\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [9]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<touching (player v)?> and <([y position v] of [player v]) > ((y position) + (20))>> then\n            if <(plyr speed y) < [0]> then\n                switch costume to (spring 2 v)\n                start sound [mk64_item_drop v]\n                set [plyr speed y v] to [28]\n            end\n        else\n            switch costume to (spring 1 v)\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [10]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <(plyr speed y) = [0]> then\n            if <<([y position v] of [player v]) > ((y position) + (40))> and <<(Smash?) = [yes]> and <<(Smash x?) > ((x position) - (20))> and <(Smash x?) < ((x position) + (20))>>>> then\n                set [smash y v] to []\n                set [smash x v] to []\n                switch costume to (weight 2 v)\n                set [gravity v] to [0]\n                repeat (20)\n                    change [gravity v] by (-1)\n                    change y by (Gravity)\n                    move up\n                    set [smash y v] to (y position)\n                    set [smash x v] to (x position)\n                end\n                set [smash y v] to []\n                set [smash x v] to []\n                forever\n                    if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n                        if <(Loading?) = [no]> then\n                            show\n                        end\n                    else\n                        hide\n                    end\n                end\n            else\n                switch costume to (weight 1 v)\n            end\n        end\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [11]> then\n    go to [front v] layer\n    set size to (100) %\n    forever\n        if <<<(Smash x) > ((x position) + (-10))> and <(Smash x) < ((x position) + (10))>> and <<(Smash y) > ((y position) + (-10))> and <(Smash y) < ((y position) + (10))>>> then\n            start sound [nsmb_toad_house_appear v]\n            switch costume to (button 2 v)\n            repeat (10)\n                change [coins v] by (1)\n            end\n            forever\n                switch costume to (button 2 v)\n            end\n        else\n            switch costume to (button 1 v)\n        end\n    end\nend\nif <(Clone type?) = [12]> then\n    switch costume to (enemy 1.1 v)\n    go to [front v] layer\n    set size to (85) %\n    set [move v] to [0]\n    set [tick v] to [1]\n    wait (letter (19) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) seconds\n    forever\n        if <(Tick) = [1]> then\n            change [move v] by (1)\n            if <(move) > ((letter (17) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) * (40))> then\n                set [tick v] to [0]\n                point in direction (-90)\n            end\n        else\n            change [move v] by (-1)\n            if <(move) < [0]> then\n                set [tick v] to [1]\n                point in direction (90)\n            end\n        end\n        set [x pos v] to ((Start x) + (move))\n        switch costume to ([floor v] of ((16) + ((((timer) mod (2)) * (3)) mod (2))) )\n        if <touching (player v)?> then\n            if <(plyr speed y) < [0]> then\n                if <not <(Hurt) = [1]>> then\n                    start sound [smb_kick v]\n                    set [plyr speed y v] to [15]\n                    switch costume to (enemy 1.3 v)\n                    wait (0.5) seconds\n                    repeat (5)\n                        change [coins v] by (1)\n                    end\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    delete this clone\n                end\n            else\n                if <(Hurt) = [0]> then\n                    if <touching (player v)?> then\n                        set [hurt v] to [1]\n                        broadcast (Spikes hit v)\n                    end\n                end\n            end\n        end\n    end\nend\nif <(Clone type?) = [13]> then\n    delete this clone\nend\nif <(Clone type?) = [14]> then\n    set size to (50) %\n    go to [front v] layer\n    switch costume to (power up 1 v)\n    forever\n        if <touching (player v)?> then\n            broadcast (Power up 1 v)\n            delete this clone\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [15]> then\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (tp v)\n    forever\n        if <touching (player v)?> then\n            set [scroll x v] to (join (letter (17) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (18) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (19) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (letter (20) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])))))\n            broadcast (spawn at scroll v)\n            wait until <not <touching (player v)?>>\n        end\n        if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\ndefine Set up\nset [clone id v] to [0]\nrepeat (length of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])\n    change [clone id v] by (1)\n    set [clone type? v] to (round (join (letter (1) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (2) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (3) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nwait (0.4) seconds\nif <not <(Clone type?) = [3]>> then\n    go to [front v] layer\nend\nif <(Clone type?) = [1]> then\n    wait (1) seconds\n    go to [front v] layer\nend\n\ndefine move up\nrepeat until <not <touching (ground v)?>>\n    set [gravity v] to [0]\n    change y by (1)\nend\n\nrepeat (10)\n    change [coins v] by (1)\nend\n\nwhen I start as a clone\nset y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (12) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (13) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (14) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (15) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))\nset [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\nset [start x v] to (X pos)\nforever\n    if <(Clone type?) = [10]> then\n    else\n        if <not <<(Clone type?) = [2]> or <<(Clone type?) = [15]> or <<(Clone type?) > [3]> and <(Clone type?) < [8]>>>>> then\n            set y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (12) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (13) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (14) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (15) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))\n        else\n            if <<[-240] < (X pos)> and <[240] > (X pos)>> then\n                set y to (((-180) + ((40) * (join (letter (11) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (12) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (13) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (14) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (15) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))) + ((([cos v] of ((timer) * (250)) ) * (3)) + (5)))\n            else\n            end\n        end\n    end\n    if <(Clone type?) = [12]> then\n        set x to ((() - (move)) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))))\n        set [x pos v] to ((() - (move)) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))))\n    else\n        if <not <(Clone type?) = [3]>> then\n            set x to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\n        else\n            set x to (((20) - (((timer) * (10)) mod (40))) + (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))))\n        end\n        set [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\n    end\nend\n\nswitch costume to (join (letter (1) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (2) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (3) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))\n\nwhen I start as a clone\n\nwhen I start as a clone\nif <(Clone type?) = [11]> then\n    forever\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clone type?) = [12]> then\n    forever\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            if <(Loading?) = [no]> then\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nif <<[-245] < (X pos)> and <[245] > (X pos)>> then\nend\n\n@HUD\n\nwhen I start as a clone\nshow\nif <(Clone id) = [1]> then\n    set size to (50) %\n    forever\n        if <(Life) > [1]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [1]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [1]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [2]> then\n    set size to (50) %\n    forever\n        if <(Life) > [3]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [3]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [3]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [3]> then\n    set size to (50) %\n    forever\n        if <(Life) > [5]> then\n            switch costume to (life 1 v)\n        end\n        if <(Life) = [5]> then\n            switch costume to (life 2 v)\n        end\n        if <(Life) < [5]> then\n            switch costume to (life 3 v)\n        end\n    end\nend\nif <(Clone id) = [4]> then\n    change y by (2)\n    set size to (60) %\n    switch costume to (coin v)\nend\nif <<(Clone id) > [4]> and <(Clone id) < [10]>> then\n    set size to (60) %\n    switch costume to (0 v)\n    forever\n        switch costume to (letter ((Clone id) - (4)) of (Coin thing))\n    end\nend\nif <(Clone id) = [10]> then\n    forever\n        if <(Gold key?) = [1]> then\n            switch costume to (gold key 2 v)\n        else\n            switch costume to (gold key 1 v)\n        end\n    end\nend\nif <(Clone id) = [11]> then\n    forever\n        if <(Green key?) = [1]> then\n            switch costume to (green key 2 v)\n        else\n            switch costume to (green key 1 v)\n        end\n    end\nend\nif <(Clone id) = [12]> then\n    forever\n        if <(Orange key?) = [1]> then\n            switch costume to (orange key 2 v)\n        else\n            switch costume to (orange key 1 v)\n        end\n    end\nend\nif <(Clone id) = [13]> then\n    forever\n        if <(Blue key?) = [1]> then\n            switch costume to (blue key 2 v)\n        else\n            switch costume to (blue key 1 v)\n        end\n    end\nend\n\nwhen flag clicked\nset [life v] to [6]\n\ndefine Set up\nset size to (50) %\ngo to x: (-237) y: (150)\nhide\nset [clone id v] to [0]\nrepeat (3)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (20)\nend\ngo to x: (128) y: (150)\nset size to (62) %\nchange [clone id v] by (1)\ncreate clone of (_myself_ v)\nchange x by (20)\nrepeat (5)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (18)\nend\ngo to x: (-160) y: (155)\nset size to (58) %\nrepeat (4)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    change x by (25)\nend\n\nwhen I start as a clone\ngo to [front v] layer\nwait (1) seconds\ngo to [front v] layer\n\nwhen I receive [start v]\nSet up\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [play v]\nforever\n    if <(length of (Coins)) = [1]> then\n        set [coin thing v] to (join [0000] (Coins))\n    end\n    if <(length of (Coins)) = [2]> then\n        set [coin thing v] to (join [000] (Coins))\n    end\n    if <(length of (Coins)) = [3]> then\n        set [coin thing v] to (join [00] (Coins))\n    end\n    if <(length of (Coins)) = [4]> then\n        set [coin thing v] to (join [0] (Coins))\n    end\n    if <(length of (Coins)) = [5]> then\n        set [coin thing v] to (Coins)\n    end\nend\n\n@Menu\n\nwhen I receive [menu v]\nset [selected? v] to [0]\nSet up\nreset timer\n\nwhen I receive [play v]\ndelete this clone\n\nwhen I receive [play v]\nhide\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    go to [front v] layer\n    forever\n        if <<[10] > (Clone id?)> and <[0] < (Clone id?)>> then\n            if <((Level at) + (1)) > (Clone id?)> then\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (box 3 v)\n                    if <[0.2] < (timer)> then\n                        set [selected? v] to (Clone id?)\n                        if <mouse down?> then\n                            set [level v] to ((Selected?) - (1))\n                            stop [other scripts in sprite v]\n                            broadcast (Load v)\n                        end\n                    end\n                else\n                    switch costume to (box 2 v)\n                end\n            else\n                switch costume to (box 1 v)\n            end\n        end\n        if <<[19] > (Clone id?)> and <[9] < (Clone id?)>> then\n            switch costume to (join ((Clone id?) - (9)) [])\n            if <((Level at) + (1)) > ((Clone id?) - (9))> then\n                show\n            else\n                hide\n            end\n        end\n        if <(Clone id?) = [19]> then\n            switch costume to (kenny v)\n            set size to (180) %\n            go to x: (-80) y: (110)\n        end\n        if <(Clone id?) = [20]> then\n            go to x: (140) y: (-131)\n            set size to (150) %\n            switch costume to (achievements1 v)\n            wait until <not <mouse down?>>\n            forever\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (achievements2 v)\n                    if <mouse down?> then\n                        broadcast (achievements page v)\n                        wait until <not <mouse down?>>\n                    end\n                else\n                    switch costume to (achievements1 v)\n                end\n            end\n        end\n    end\nend\n\ndefine Set up\nset [clone type? v] to [1]\nswitch costume to (menu background v)\ngo to x: (50) y: (65)\nshow\nset [clone id? v] to [0]\nset size to (200) %\nrepeat (3)\n    set x to (50)\n    change y by (-60)\n    repeat (3)\n        change [clone id? v] by (1)\n        create clone of (_myself_ v)\n        change x by (60)\n    end\nend\nset size to (100) %\ngo to x: (-60) y: (79)\nrepeat (3)\n    set x to (65)\n    change y by (-60)\n    repeat (3)\n        change [clone id? v] by (1)\n        create clone of (_myself_ v)\n        change x by (60)\n    end\nend\nchange [clone id? v] by (1)\ncreate clone of (_myself_ v)\nset size to (100) %\ngo to x: (0) y: (0)\nchange [clone id? v] by (1)\ncreate clone of (_myself_ v)\nset size to (100) %\ngo to x: (0) y: (0)\n\nwhen I receive [achievements page v]\ndelete this clone\n\nwhen I receive [load menu v]\nhide\nset [selected? v] to [0]\nset [level at v] to [1]\nbroadcast (Menu v)\n\n@Menu char\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\ngo to [front v] layer\nset size to (200) %\nshow\ngo to x: (-90) y: (-50)\nswitch costume to (p1_walk01 v)\nforever\n    next costume\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [load v]\ngo to x: (0) y: (0)\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [achievements page v]\nstop [other scripts in sprite v]\nhide\n\n@Platforms\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [play v]\nshow\nswitch costume to (costume1 v)\nset size to (400) %\nswitch costume to ((Level) + (2))\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    set x to ([x position v] of [level v])\nend\n\nwhen flag clicked\nhide\n\n@Cover\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nhide\n\nshow\n\nrepeat (100)\nend\n\ngo to [front v] layer\n\nchange [ghost v] effect by (1)\n\n@blocks\n\nwhen I receive [play v]\nSet up\nwait (3) seconds\ngo to [front v] layer\n\ndefine Set up\nset [clone id v] to [0]\nrepeat (length of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])\n    change [clone id v] by (1)\n    set [clone type? v] to (round (join (letter (1) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (2) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (3) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))\n    if <(Clone type?) = [13]> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (12) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (13) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (14) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (15) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))\nset [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\nset [start x v] to (X pos)\nforever\n    set y to ((-180) + ((40) * (join (letter (11) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (12) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (13) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (14) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (15) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) [])))))))\n    set x to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\n    set [x pos v] to (([x position v] of [level v]) + ((-2381) + ((40) * (join (letter (5) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (6) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (7) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (8) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) (join (letter (9) of (item (Clone id) of [\['concatenate:with:', 'level ', \['readvariable', 'level'\]\] v])) []))))))))\nend\n\nwhen I start as a clone\nshow\nif <(Clone type?) = [13]> then\n    go to [front v] layer\n    set size to (100) %\n    switch costume to (smash block1 v)\n    forever\n        if <<(plyr speed y) = [0]> and <<([y position v] of [player v]) < ((y position) + (60))> and <<([y position v] of [player v]) > ((y position) + (30))> and <<(Smash?) = [yes]> and <<(Smash x?) > ((x position) - (20))> and <(Smash x?) < ((x position) + (20))>>>>>> then\n            delete this clone\n        else\n        end\n        if <<[-245] < (X pos)> and <[245] > (X pos)>> then\n            show\n        else\n            hide\n        end\n    end\nend\n\nset [toching block? v] to [0]\n\nset [toching block? v] to [1]\n\nif <touching (player v)?> then\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nif <(Level) = [0]> then\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (1 v)\n    show\n    go to [front v] layer\n    Move\n    wait until <(Scroll X) > [320]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (2 v)\n    Move\n    wait until <(Scroll X) > [670]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (3 v)\n    Move\n    wait until <(Scroll X) > [1050]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (4 v)\n    Move\n    wait until <(Scroll X) > [1420]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (5 v)\n    Move\n    wait until <(Scroll X) > [1615]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (6 v)\n    Move\n    wait until <(Scroll X) > [1880]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (7 v)\n    Move\n    wait until <(Scroll X) > [2440]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (8 v)\n    Move\n    wait until <(Scroll X) > [2820]>\n    Fade\n    set [ghost v] effect to (0)\n    switch costume to (costume1 v)\n    go to x: (0) y: (-80)\n    switch costume to (9 v)\n    Move\n    wait until <(Toching door?) = [1]>\n    Fade\n    hide\n    set [ghost v] effect to (0)\nend\n\ndefine Move\nrepeat (50)\n    change y by (((0) - (y position)) * (0.2))\nend\n\nwhen I receive [start v]\nif <(Level) = [0]> then\n    repeat (70)\n        go to [front v] layer\n    end\nend\n\ndefine Fade\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [load v]\nset [loading? v] to [yes]\nshow\ngo to [front v] layer\nwait (0.2) seconds\nbroadcast (Play v)\nwait (1) seconds\nbroadcast (sound v)\nwait (0.5) seconds\nset [loading? v] to [no]\nhide\nbroadcast (Start v)\n\n@Stars\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(Clone type?) = [1]> then\n    show\n    go to x: (0) y: ([y position v] of [player v])\n    set size to (15) %\n    repeat (30)\n        change y by (((20) - (y position)) * (0.1))\n        change size by (((100) - (size)) * (0.05))\n    end\n    if <(Clone id) = [1]> then\n        if <(Stars) = [1]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n        if <(Stars) = [2]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((-25) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n        if <(Stars) = [3]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((-50) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n    end\n    if <(Clone id) = [2]> then\n        if <(Stars) = [2]> then\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change x by (((25) - (x position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        else\n            repeat (30)\n                change y by (((40) - (y position)) * (0.1))\n                change size by (((120) - (size)) * (0.05))\n            end\n        end\n    end\n    if <(Clone id) = [3]> then\n        repeat (30)\n            change y by (((40) - (y position)) * (0.1))\n            change x by (((50) - (x position)) * (0.1))\n            change size by (((120) - (size)) * (0.05))\n        end\n    end\nend\n\nwhen I receive [stars v]\nset [clone type? v] to [1]\ngo to [front v] layer\nif <(Level) = [0]> then\n    if <(Coins) > [27]> then\n        set [stars v] to [3]\n    else\n        if <(Coins) > [20]> then\n            set [stars v] to [2]\n        else\n            if <(Coins) > [13]> then\n                set [stars v] to [1]\n            else\n                set [stars v] to [0]\n            end\n        end\n    end\nelse\n    if <(Level) = [1]> then\n        if <(Coins) > [71]> then\n            set [stars v] to [3]\n        else\n            if <(Coins) > [53]> then\n                set [stars v] to [2]\n            else\n                if <(Coins) > [35]> then\n                    set [stars v] to [1]\n                else\n                    set [stars v] to [0]\n                end\n            end\n        end\n    else\n        if <(Level) = [2]> then\n            if <(Coins) > [49]> then\n                set [stars v] to [3]\n            else\n                if <(Coins) > [37]> then\n                    set [stars v] to [2]\n                else\n                    if <(Coins) > [24]> then\n                        set [stars v] to [1]\n                    else\n                        set [stars v] to [0]\n                    end\n                end\n            end\n        else\n            if <(Level) = [3]> then\n                if <(Coins) > [67]> then\n                    set [stars v] to [3]\n                else\n                    if <(Coins) > [50]> then\n                        set [stars v] to [2]\n                    else\n                        if <(Coins) > [33]> then\n                            set [stars v] to [1]\n                        else\n                            set [stars v] to [0]\n                        end\n                    end\n                end\n            else\n                if <(Level) = [4]> then\n                    if <(Coins) > [72]> then\n                        set [stars v] to [3]\n                    else\n                        if <(Coins) > [54]> then\n                            set [stars v] to [2]\n                        else\n                            if <(Coins) > [36]> then\n                                set [stars v] to [1]\n                            else\n                                set [stars v] to [0]\n                            end\n                        end\n                    end\n                else\n                end\n            end\n        end\n    end\nend\nif <(item ((Level) + (1)) of [level stars v]) < (Stars)> then\n    replace item ((Level) + (1)) of [level stars v] with (Stars)\nend\nif <(Stars) > [0]> then\n    Move1 (Stars)\nend\n\ndefine None\nset [clone id v] to [0]\nrepeat (stars)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\nwait (1) seconds\n\nwhen I start as a clone\nif <(Clone type?) = [2]> then\n    show\n    repeat (10)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [menu v]\ndelete this clone\n\nwhen I receive [menu v]\nwait (0.2) seconds\nSet up stars\n\nwhen I receive [play v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [achievements page v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine Set up stars\nset [clone type? v] to [2]\nset [counter v] to [0]\ngo to x: (80) y: (100)\nset [clone id v] to [0]\nset size to (40) %\nrepeat (3)\n    set x to (80)\n    change y by (-60)\n    repeat (3)\n        change [counter v] by (1)\n        if <(item (Counter) of [level stars v]) = [1]> then\n            change y by (-20)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [2]> then\n            change y by (-20)\n            change x by (-7)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (-7)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [3]> then\n            change y by (-20)\n            change x by (-14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (14)\n            change [clone id v] by (1)\n            create clone of (_myself_ v)\n            change x by (-14)\n            change y by (20)\n        end\n        if <(item (Counter) of [level stars v]) = [0]> then\n        end\n        change x by (60)\n    end\nend\n\n@Sprite3\n\ndefine Show\nset [ghost v] effect to (0)\ngo to x: (0) y: (70)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (((0) - (y position)) * (0.2))\n    go to [front v] layer\nend\nwait (2) seconds\nrepeat (6)\n    change y by (((70) - (y position)) * (0.3))\nend\nhide\n\nwhen I receive [menu v]\nwait (2) seconds\nwait until <(achievement?) = [no]>\nstop [other scripts in sprite v]\n\nwhen I receive [load v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (70)\nhide\nset [achievement? v] to [no]\nwait (1) seconds\nforever\n    if <<(Life) < [1]> and <(item (1) of [achievements v]) = [0]>> then\n        set [achievement? v] to [yes]\n        switch costume to (1 v)\n        replace item (1) of [achievements v] with [1]\n        Show\n        set [achievement? v] to [no]\n    end\n    if <<(Stars) = [3]> and <(item (2) of [achievements v]) = [0]>> then\n        set [achievement? v] to [yes]\n        switch costume to (2 v)\n        replace item (2) of [achievements v] with [1]\n        Show\n        set [achievement? v] to [no]\n    end\nend\n\nwhen flag clicked\nhide\nSet up\n\ndefine Set up\ndelete (all) of [achievements v]\nrepeat (10)\n    insert [0] at (1) of [achievements v] \nend\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nrepeat (10)\n    go to [front v] layer\n    create clone of (_myself_ v)\nend\nwait until <mouse down?>\nhide\nbroadcast (load menu v)\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (continue v)\nrepeat until <mouse down?>\n    set [ghost v] effect to ([abs v] of ((((timer) * (100)) mod (200)) - (100)) )\nend\ndelete this clone\n\n@Sprite4\n\nwhen I receive [achievements page v]\nSet up\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nif <(item (Clone id?) of [achievements v]) = [1]> then\n    switch costume to (join (Clone id?) [])\nelse\n    switch costume to (loacked v)\nend\nif <(Clone id?) = [6]> then\n    switch costume to (back v)\n    wait until <not <mouse down?>>\n    forever\n        if <touching (mouse-pointer v)?> then\n            switch costume to (back2 v)\n            if <mouse down?> then\n                broadcast (Menu v)\n                wait until <not <mouse down?>>\n            end\n        else\n            switch costume to (back v)\n        end\n    end\nend\nif <(Clone id?) = [7]> then\n    set y to (0)\n    set size to (100) %\n    switch costume to (bar v)\n    forever\n        set x to (-194)\n    end\nend\nif <(Clone id?) = [8]> then\n    set y to (0)\n    set size to (100) %\n    switch costume to (bar2 v)\n    forever\n        set x to (204)\n    end\nend\n\ndefine Set up\nset size to (80) %\nset [clone id? v] to [0]\ngo to x: (0) y: (150)\nswitch costume to (1.1 v)\nrepeat (6)\n    change [clone id? v] by (1)\n    create clone of (_myself_ v)\n    change y by (-60)\nend\nrepeat (2)\n    change [clone id? v] by (1)\n    create clone of (_myself_ v)\nend\ngo to x: (0) y: (0)\nswitch costume to (menu background v)\n\nwhen I receive [menu v]\ndelete this clone\n\n