A mushroomy problem 2: Deep into the Woods - Scrolling Platformer


@Stage\n\nwhen I receive [green flag v]\nset [musicstarted? v] to [0]\nset volume to (100) %\nhide variable [mouse v]\n\nwhen I receive [play game v]\nrepeat until <(LEVEL) = [4]>\n    play sound [Lower Woods v] until done\nend\n\nwhen I receive [green flag v]\nrepeat until <(LEVEL) = [1]>\n    play sound [Intro v] until done\nend\n\nwhen I receive [glide v]\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I receive [glide v]\nrepeat (50)\n    change [brightness v] effect by (0.5)\nend\n\nwhen I receive [setup v]\nclear graphic effects\nset volume to (100) %\nif <<<(LEVEL) > [3]> and <(LEVEL) < [6]>> and <(musicstarted?) = [0]>> then\n    set [musicstarted? v] to [1]\n    stop all sounds\n    set [brightness v] effect to (15)\n    broadcast (music v)\nend\nif <<(LEVEL) > [5]> and <(musicstarted?) = [1]>> then\n    set [musicstarted? v] to [2]\n    stop all sounds\n    set [brightness v] effect to (15)\n    broadcast (music v)\nend\n\nwhen I receive [music v]\nif <(LEVEL) > [5]> then\n    repeat until <(LEVEL) > [8]>\n        play sound [Upper Woods v] until done\n    end\nelse\n    repeat until <(LEVEL) > [5]>\n        play sound [Mountainview v] until done\n    end\nend\n\nwhen I receive [cutscene 2 v]\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I receive [replay v]\nrepeat (50)\n    change volume by (2)\nend\n\nwhen I receive [endcutscene v]\nstop [other scripts in sprite v]\nforever\n    play sound [Ending v] until done\nend\n\n@Player\n\nwhen flag clicked\nset [level v] to [0]\nbroadcast (Green Flag v)\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nwait until <(LEVEL) > [8]>\nbroadcast (endcutscene v)\nstop [other scripts in sprite v]\n\nwhen I receive [play game v]\nset [canmove v] to [1]\nset [brightness v] effect to (-20)\nshow\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [bounce2 v] to [0]\nset [beeg mushroom 😳 v] to [0]\nset [canmove v] to [1]\nset [climbing v] to [0]\nset [attack? v] to [0]\nset [bounce? v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset rotation style [left-right v]\n\ndefine Tick\nswitch costume to (hitbox v)\nif <<(attack?) = [0]> and <(canmove) = [1]>> then\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        point in direction (-90)\n        if <(bounce?) = [2]> then\n            change [sx v] by (-0.1)\n        else\n            change [sx v] by (-2)\n        end\n        if <(CLIMBING) = [0]> then\n            change [frame v] by (0.5)\n        end\n    else\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            point in direction (90)\n            if <(bounce?) = [2]> then\n                change [sx v] by (0.1)\n            else\n                change [sx v] by (2)\n            end\n            if <(CLIMBING) = [0]> then\n                change [frame v] by (0.5)\n            end\n        else\n            set [frame v] to [0]\n        end\n    end\nend\nif <(bounce?) < [2]> then\n    set [sx v] to ((sx) * (0.8))\nelse\n    set [sx v] to ((sx) * (0.99))\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <touching (mushrooms v)?> then\n    if <(bounce?) < [2]> then\n        broadcast (jump v)\n        if <<(beeg mushroom 😳) = [1]> and <(no more beeg mushrooms) = [0]>> then\n            set [sy v] to [70]\n            broadcast (jump2 v)\n        else\n            set [sy v] to [30]\n        end\n    else\n        broadcast (jump3 v)\n        set [sy v] to [30]\n        set [bounce2 v] to [1]\n    end\nend\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    if <<(in air) < [4]> or <<touching (mushrooms v)?> and <(beeg mushroom 😳) = [0]>>> then\n        set [sy v] to [16]\n    end\nend\nif <(bounce?) = [2]> then\n    if <(bounce2) = [1]> then\n        change [sy v] by (-2)\n    else\n        set [sy v] to [-0.7]\n    end\nelse\n    change [sy v] by (-2)\nend\nif <(sy) < [-16]> then\n    set [sy v] to [-16]\nend\nif <<key (space v) pressed?> and <touching (vines v)?>> then\n    set [sy v] to [-2]\n    set [climbing v] to [1]\nelse\n    set [climbing v] to [0]\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(CLIMBING) = [1]>> then\n    Change player y by [5]\nend\nif <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <(CLIMBING) = [1]>> then\n    Change player y by [-5]\nend\nChange player y by (sy)\nTest - Die\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nif <(SCROLL X) < [-400]> then\n    set [scroll x v] to [-400]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(bounce?) < [2]> then\n    if <(SCROLL Y) < [0]> then\n        set [scroll y v] to [0]\n    end\nelse\n    if <(SCROLL Y) < [1260]> then\n        set [scroll y v] to [1260]\n    end\n    if <(y position) < [-200]> then\n        set [exit v] to [die]\n    end\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nSet costume\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (platforms v)?> or <touching (blockage v)?>>>\n    if <<touching (platforms v)?> and <(bounce?) = [2]>> then\n        set [beeg mushroom 😳 v] to [0]\n        set [bounce? v] to [0]\n    end\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (platforms v)?> or <touching (blockage v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <touching (blockage v)?> then\n            if <(direction) = [90]> then\n                if <(bounce?) = [2]> then\n                    set [sx v] to [-7]\n                else\n                    set [sx v] to [-20]\n                end\n            else\n                if <(bounce?) = [2]> then\n                    set [sx v] to [7]\n                else\n                    set [sx v] to [20]\n                end\n            end\n            broadcast (back v)\n        end\n        if <not <<touching (platforms v)?> or <touching (blockage v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (platforms v)?> or <touching (blockage v)?>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\nshow\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching (toxic stuff v)?>> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\nshow\nclear graphic effects\n\nwhen I receive [play game v]\nforever\n    if <<<<<key (a v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>> and <(in air) < [4]>> and <(attack?) = [0]>> then\n        start sound [Step v]\n        wait (0.3) seconds\n    end\nend\n\ndefine Set costume\nif <(CLIMBING) = [0]> then\n    if <(attack?) = [0]> then\n        if <(bounce?) = [0]> then\n            if <(in air) = [0]> then\n                if <(frame) = [0]> then\n                    switch costume to (idle v)\n                else\n                    switch costume to ([floor v] of ((4) + ((frame) mod (5))) )\n                end\n            else\n                if <(sy) > [0]> then\n                    switch costume to (jump v)\n                else\n                    switch costume to (fall v)\n                end\n            end\n        else\n            if <(bounce?) = [2]> then\n                switch costume to (glide v)\n            else\n                if <(bounce?) = [1]> then\n                    switch costume to (bounce v)\n                end\n            end\n        end\n    else\n        if <(attack?) = [1]> then\n            switch costume to (attack v)\n        else\n            switch costume to (pre-attack v)\n        end\n    end\nelse\n    switch costume to (climb v)\nend\n\nwhen [0 v] key pressed\nif <not <(LEVEL) = [0]>> then\n    if <(canmove) = [1]> then\n        wait until <not <key (0 v) pressed?>>\n        change [level v] by (1)\n        set [x v] to [0]\n        set [y v] to [0]\n        set [scroll x v] to [0]\n        set [scroll y v] to [0]\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n    end\nend\n\nwhen [m v] key pressed\n\nshow variable [mouse v]\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\n\nwhen I receive [jump v]\nrepeat until <(sy) < [1]>\n    set [bounce? v] to [1]\nend\nset [bounce? v] to [0]\n\nwhen [space v] key pressed\nif <<not <(LEVEL) = [0]>> or <(canmove) = [0]>> then\n    if <(in air) < [4]> then\n        set [attack? v] to [2]\n        wait until <not <key (space v) pressed?>>\n        start sound [High Whoosh v]\n        repeat (10)\n            set [attack? v] to [1]\n        end\n        set [attack? v] to [0]\n    else\n        set [attack? v] to [0]\n    end\nend\n\nwhen [r v] key pressed\nif <(canmove) = [1]> then\n    broadcast (Reset v)\n    broadcast (Setup v)\n    Game On\nend\n\nwhen [z v] key pressed\nif <(username) = [zelfen]> then\n    set [sy v] to [20]\nend\n\nwhen I receive [jump2 v]\nrepeat until <(sy) < [1]>\n    set [bounce? v] to [1]\nend\nset [bounce? v] to [2]\nbroadcast (glide v)\nclear graphic effects\n\nwhen I receive [jump3 v]\nrepeat until <(sy) < [1]>\n    set [bounce2 v] to [1]\nend\nset [bounce2 v] to [0]\n\nwhen I receive [setup v]\nif <(LEVEL) < [4]> then\n    set [brightness v] effect to (-20)\nelse\n    clear graphic effects\nend\n\nwhen I receive [music v]\nwait (1) seconds\nwait until <(SCROLL X) > [1100]>\nif <(LEVEL) = [4]> then\n    set [canmove v] to [0]\n    broadcast (cutscene 2 v)\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1-1 v)\n    Clone at x [0] y [0]\n    Clone at x [450] y [0]\n    switch costume to (1-2 v)\n    Clone at x [450] y [0]\n    switch costume to (1-3 v)\n    Clone at x [450] y [0]\n    switch costume to (1-4 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2-1 v)\n        Clone at x [0] y [0]\n        Clone at x [1462] y [2555]\n        switch costume to (2-2 v)\n        Clone at x [-450] y [0]\n        switch costume to (2-3 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3-1 v)\n            Clone at x [0] y [0]\n            Clone at x [450] y [0]\n            switch costume to (3-2 v)\n            Clone at x [450] y [0]\n            switch costume to (3-3 v)\n            Clone at x [450] y [375]\n            switch costume to (3-4 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4-1 v)\n                Clone at x [0] y [0]\n                Clone at x [450] y [0]\n                switch costume to (4-2 v)\n                Clone at x [450] y [0]\n                switch costume to (4-3 v)\n                Clone at x [450] y [0]\n                switch costume to (4-4 v)\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5-1 v)\n                    Clone at x [0] y [0]\n                    Clone at x [2449] y [1512]\n                    switch costume to (5-2 v)\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6-1 v)\n                        Clone at x [0] y [0]\n                        Clone at x [450] y [0]\n                        switch costume to (6-2 v)\n                        Clone at x [450] y [0]\n                        switch costume to (6-3 v)\n                        Clone at x [450] y [0]\n                        switch costume to (6-4 v)\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (7-1 v)\n                            Clone at x [0] y [0]\n                            Clone at x [450] y [0]\n                            switch costume to (7-2 v)\n                            Clone at x [450] y [0]\n                            switch costume to (7-3 v)\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (8-1 v)\n                                Clone at x [0] y [0]\n                                Clone at x [450] y [0]\n                                switch costume to (8-2 v)\n                                Clone at x [450] y [0]\n                                switch costume to (8-3 v)\n                            else\n                                set [x v] to [99999]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nhide\nstop [other scripts in sprite v]\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nswitch costume to (closed v)\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x [1827] y [272]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x [733] y [2799]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x [1457] y [460]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x [1396] y [302]\n            else\n                if <(LEVEL) = [5]> then\n                    Clone at x [2814] y [1769]\n                else\n                    if <(LEVEL) = [6]> then\n                        Clone at x [1498] y [295]\n                    else\n                        if <(LEVEL) = [7]> then\n                            Clone at x [1298] y [277]\n                        else\n                            if <(LEVEL) = [8]> then\n                                Clone at x [1589] y [730]\n                            else\n                                set [x v] to [9999]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [tick v]\nturn right (15) degrees\n\n@Overlay\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1-1 v)\n    Clone at x [0] y [0]\n    Clone at x [450] y [0]\n    switch costume to (1-2 v)\n    Clone at x [450] y [0]\n    switch costume to (1-3 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2-1 v)\n        Clone at x [0] y [0]\n        Clone at x [100] y [1300]\n        switch costume to (2-2 v)\n        Clone at x [450] y [0]\n        switch costume to (2-3 v)\n        Clone at x [450] y [0]\n        switch costume to (2-4 v)\n        Clone at x [450] y [375]\n        switch costume to (2-5 v)\n        Clone at x [450] y [0]\n        switch costume to (2-6 v)\n        Clone at x [0] y [375]\n        switch costume to (2-7 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3-1 v)\n            Clone at x [0] y [0]\n            Clone at x [450] y [0]\n            switch costume to (3-2 v)\n            Clone at x [450] y [0]\n            switch costume to (3-3 v)\n            Clone at x [450] y [375]\n            switch costume to (3-4 v)\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4-1 v)\n                Clone at x [0] y [0]\n                Clone at x [450] y [0]\n                switch costume to (4-2 v)\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5-1 v)\n                    Clone at x [0] y [0]\n                    Clone at x [100] y [1311]\n                    switch costume to (5-2 v)\n                    Clone at x [450] y [0]\n                    switch costume to (5-3 v)\n                    Clone at x [450] y [0]\n                    switch costume to (5-5 v)\n                    Clone at x [450] y [0]\n                    switch costume to (5-6 v)\n                    Clone at x [450] y [0]\n                    switch costume to (5-7 v)\n                    Clone at x [450] y [0]\n                    switch costume to (5-8 v)\n                else\n                    if <(LEVEL) = [6]> then\n                        switch costume to (6-1 v)\n                        Clone at x [0] y [0]\n                        Clone at x [450] y [0]\n                        switch costume to (6-2 v)\n                        Clone at x [450] y [0]\n                        switch costume to (6-3 v)\n                    else\n                        if <(LEVEL) = [7]> then\n                            switch costume to (7-1 v)\n                            Clone at x [0] y [0]\n                        else\n                            if <(LEVEL) = [8]> then\n                                switch costume to (8-1 v)\n                                Clone at x [0] y [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\nhide\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nclear graphic effects\nhide\nif <(LEVEL) = [1]> then\n    go to [front v] layer\n    go [backward v] (21) layers\n    set [xchange v] to [0]\n    repeat (8)\n        Clone at x ((182) + (xchange)) y [-148]\n        change [xchange v] by (36)\n    end\n    Clone at x [798] y [60]\n    Clone at x [1095] y [-111]\n    Clone at x [1420] y [151]\n    set [x v] to [99999999999]\nelse\n    if <(LEVEL) = [3]> then\n        go to [front v] layer\n        go [backward v] (22) layers\n        Clone at x [127] y [167]\n        Clone at x [193] y [167]\n        Clone at x [473] y [98]\n        Clone at x [904] y [136]\n        Clone at x [1001] y [97]\n        Clone at x [1086] y [97]\n        set [x v] to [99999999999]\n    else\n        if <(LEVEL) = [4]> then\n            go to [front v] layer\n            go [backward v] (17) layers\n            Clone at x [443] y [44]\n            Clone at x [997] y [309]\n            set [x v] to [99999999999]\n        else\n            if <(LEVEL) = [5]> then\n                go to [front v] layer\n                go [backward v] (26) layers\n                Clone at x [1277] y [1341]\n                Clone at x [1468] y [1243]\n                Clone at x [1887] y [1400]\n                Clone at x [1931] y [1400]\n                Clone at x [2099] y [1382]\n                Clone at x [2245] y [1626]\n                set [x v] to [99999999999]\n            else\n                if <(LEVEL) = [6]> then\n                    go to [front v] layer\n                    go [backward v] (17) layers\n                    Clone at x [57] y [-9]\n                    Clone at x [499] y [104]\n                    Clone at x [586] y [104]\n                    set [x v] to [99999999999]\n                else\n                    if <(LEVEL) = [7]> then\n                        go to [front v] layer\n                        go [backward v] (15) layers\n                        Clone at x [358] y [226]\n                        Clone at x [436] y [226]\n                        Clone at x [531] y [228]\n                        set [x v] to [99999999999]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\n@Mushrooms\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    set [no more beeg mushrooms v] to [1]\n    switch costume to (mushroom1 v)\n    Clone at x [117] y [-46] is beeg mushroom?/?/ [0]\n    Clone at x [934] y [-230] is beeg mushroom?/?/ [0]\n    Clone at x [1442] y [-160] is beeg mushroom?/?/ [0]\n    Clone at x [1673] y [-88] is beeg mushroom?/?/ [0]\n    set [x v] to [9999999999]\nelse\n    if <(LEVEL) = [2]> then\n        set [no more beeg mushrooms v] to [0]\n        switch costume to (mushroom7 v)\n        Clone at x [227] y [80] is beeg mushroom?/?/ [1]\n        switch costume to (mushroom1 v)\n        Clone at x [1238] y [1193] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [1129] y [1504] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [2082] y [1513] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [2177] y [1843] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [1777] y [1992] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [1415] y [2128] is beeg mushroom?/?/ [0]\n        switch costume to (mushroom1 v)\n        Clone at x [1044] y [2414] is beeg mushroom?/?/ [0]\n        set [x v] to [9999999999]\n    else\n        if <(LEVEL) = [3]> then\n            set [no more beeg mushrooms v] to [1]\n            switch costume to (mushroom1 v)\n            Clone at x [-241] y [54] is beeg mushroom?/?/ [0]\n        else\n            if <(LEVEL) = [4]> then\n                set [no more beeg mushrooms v] to [1]\n                switch costume to (mushroom1 v)\n                Clone at x [899] y [44] is beeg mushroom?/?/ [0]\n            else\n                if <(LEVEL) = [5]> then\n                    set [no more beeg mushrooms v] to [0]\n                    switch costume to (mushroom7 v)\n                    Clone at x [320] y [100] is beeg mushroom?/?/ [1]\n                    switch costume to (mushroom1 v)\n                    Clone at x [732] y [1248] is beeg mushroom?/?/ [0]\n                    switch costume to (mushroom1 v)\n                    Clone at x [1748] y [1156] is beeg mushroom?/?/ [0]\n                    switch costume to (mushroom1 v)\n                    Clone at x [2209] y [1304] is beeg mushroom?/?/ [0]\n                else\n                    if <(LEVEL) = [6]> then\n                        set [no more beeg mushrooms v] to [1]\n                        switch costume to (mushroom1 v)\n                        Clone at x [704] y [4] is beeg mushroom?/?/ [0]\n                    else\n                        if <(LEVEL) = [7]> then\n                            set [no more beeg mushrooms v] to [1]\n                            switch costume to (mushroom1 v)\n                            Clone at x [135] y [-16] is beeg mushroom?/?/ [0]\n                        else\n                            if <(LEVEL) = [8]> then\n                                set [no more beeg mushrooms v] to [1]\n                                switch costume to (mushroom1 v)\n                                Clone at x [198] y [113] is beeg mushroom?/?/ [0]\n                                Clone at x [470] y [-180] is beeg mushroom?/?/ [0]\n                            else\n                                set [x v] to [99999]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y) is beeg mushroom?/?/ (beeg mushroom)\nset [mushroom v] to (beeg mushroom)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [jump v]\nif <(mushroom) = [1]> then\n    if <(no more beeg mushrooms) = [0]> then\n        set [beeg mushroom 😳 v] to [1]\n        start sound [sm64_impact \(1\) v]\n        switch costume to (mushroom7 v)\n        repeat (5)\n            next costume\n        end\n        switch costume to (mushroom7 v)\n        set [no more beeg mushrooms v] to [1]\n    else\n        set [beeg mushroom 😳 v] to [0]\n        start sound [sm64_impact v]\n        switch costume to (mushroom1 v)\n        repeat (5)\n            next costume\n        end\n        switch costume to (mushroom1 v)\n    end\nelse\n    set [beeg mushroom 😳 v] to [0]\n    start sound [sm64_impact v]\n    switch costume to (mushroom1 v)\n    repeat (5)\n        next costume\n    end\n    switch costume to (mushroom1 v)\nend\n\nwhen I receive [jump3 v]\nset [beeg mushroom 😳 v] to [0]\nstart sound [sm64_impact v]\nswitch costume to (mushroom1 v)\nrepeat (5)\n    next costume\nend\nswitch costume to (mushroom1 v)\n\n@Blockage\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<touching (player v)?> and <([costume # v] of [player v]) = [12]>> then\n    start sound [sm64_kill_enemy2 v]\n    repeat (10)\n        change size by (-10)\n        turn right (5) degrees\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    point in direction (90)\n    Clone at x [1224] y [-58]\n    set [x v] to [9999999999]\nelse\n    if <(LEVEL) = [2]> then\n        point in direction (90)\n        Clone at x [493] y [1393]\n        point in direction (90)\n        Clone at x [1344] y [1565]\n        point in direction (90)\n        Clone at x [1877] y [1727]\n        point in direction (-90)\n        Clone at x [1871] y [2198]\n        set [x v] to [9999999999]\n    else\n        if <(LEVEL) = [3]> then\n            point in direction (90)\n            Clone at x [573] y [146]\n            set [x v] to [9999999999]\n        else\n            if <(LEVEL) = [4]> then\n                point in direction (90)\n                Clone at x [576] y [102]\n                set [x v] to [9999999999]\n            else\n                if <(LEVEL) = [5]> then\n                    point in direction (90)\n                    Clone at x [459] y [1223]\n                    point in direction (90)\n                    Clone at x [1017] y [1322]\n                    point in direction (90)\n                    Clone at x [1553] y [1346]\n                    set [x v] to [9999999999]\n                else\n                    set [x v] to [9999999999]\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [back v]\nstart sound [sm64_impact v]\nswitch costume to (blockage1 v)\nrepeat (6)\n    next costume\nend\nswitch costume to (blockage6 v)\n\nwhen [q v] key pressed\nif <(username) = [Zelfen]> then\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\nend\n\n@Parallax fore\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLL X)) / (2)) (((y) - (SCROLL Y)) / (2))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) < [4]> then\n    switch costume to (1-1 v)\nelse\n    if <(LEVEL) < [6]> then\n        switch costume to (1-2 v)\n    else\n        switch costume to (1-3 v)\n    end\nend\nrepeat (10)\n    Clone at x [1000] y [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\nhide\n\n@Parallax mid\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLL X)) / (3)) (((y) - (SCROLL Y)) / (3))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) < [4]> then\n    switch costume to (1-1 v)\nelse\n    if <(LEVEL) < [6]> then\n        switch costume to (1-2 v)\n    else\n        switch costume to (1-3 v)\n    end\nend\nrepeat (10)\n    Clone at x [1000] y [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\nhide\n\n@Parallax Back\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLL X)) / (6)) (((y) - (SCROLL Y)) / (6))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) < [4]> then\n    switch costume to (1-1 v)\nelse\n    if <(LEVEL) < [6]> then\n        switch costume to (1-2 v)\n    else\n        switch costume to (1-3 v)\n    end\nend\nrepeat (10)\n    Clone at x [1000] y [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\nhide\n\n@Parallax Far Back\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((x) - (SCROLL X)) / (12)) (((y) - (SCROLL Y)) / (12))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1-1 v)\nrepeat (10)\n    Clone at x [5000] y [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\n\nwhen I receive [boss v]\nstop [other scripts in sprite v]\nhide\n\n@Vines\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\npoint in direction ((([cos v] of ((timer) * (100)) ) * (5)) + (90))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [x v] to [9999999999]\nif <(LEVEL) = [1]> then\n    Clone at x [836] y [59]\n    set [x v] to [9999999999]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x [26] y [216]\n        set [x v] to [9999999999]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x [689] y [105]\n            Clone at x [831] y [130]\n            Clone at x [1099] y [434]\n            set [x v] to [9999999999]\n        else\n            if <(LEVEL) = [5]> then\n                Clone at x [-67] y [310]\n                Clone at x [54] y [456]\n                set [x v] to [9999999999]\n            else\n                if <(LEVEL) = [8]> then\n                    Clone at x [66] y [231]\n                    set [x v] to [9999999999]\n                else\n                    set [x v] to [9999999999]\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [tick v]\n\n@Intro\n\nwhen I receive [green flag v]\nshow\nswitch costume to (costume1 v)\nwait until <(costume [number v]) = [7]>\nhide\nbroadcast (Play Game v)\nstop all sounds\n\nwhen [space v] key pressed\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\nnext costume\nrepeat (10)\n    change [brightness v] effect by (10)\nend\n\n@item\n\nwhen I receive [green flag v]\nhide\nset [messageread? v] to [0]\nset [messageread? 2 v] to [0]\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    if <(LEVEL) = [2]> then\n        broadcast (message v)\n        set [canmove v] to [0]\n        set [x v] to [9999999]\n    else\n        if <(LEVEL) = [3]> then\n            broadcast (message2 v)\n            set [canmove v] to [0]\n            set [x v] to [9999999]\n        else\n            if <(LEVEL) = [7]> then\n                broadcast (message3 v)\n                set [canmove v] to [0]\n                set [x v] to [9999999]\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nswitch costume to (1 v)\nset [x v] to [0]\nset [y v] to [0]\nif <<(LEVEL) = [2]> and <(has parachute?) = [0]>> then\n    switch costume to (1 v)\n    Clone at x [140] y [122]\nelse\n    if <<(LEVEL) = [3]> and <(messageread?) = [0]>> then\n        switch costume to (2 v)\n        Clone at x [392] y [138]\n    else\n        if <<(LEVEL) = [7]> and <(messageread? 2) = [0]>> then\n            switch costume to (2 v)\n            Clone at x [688] y [233]\n        else\n            set [x v] to [99999999]\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [tick v]\n\n@message\n\nwhen I receive [green flag v]\nhide\nset [has parachute? v] to [0]\n\nwhen I receive [message v]\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\nwait until <key (space v) pressed?>\nhide\nset [has parachute? v] to [1]\nset [canmove v] to [1]\n\nwhen I receive [message2 v]\nswitch costume to (costume2 v)\nshow\ngo to [front v] layer\nwait until <key (space v) pressed?>\nhide\nset [messageread? v] to [1]\nset [canmove v] to [1]\n\nwhen I receive [message3 v]\nswitch costume to (costume3 v)\nshow\ngo to [front v] layer\nwait until <key (space v) pressed?>\nhide\nset [messageread? 2 v] to [1]\nset [canmove v] to [1]\n\n@glidemusic\n\nwhen I receive [glide v]\nset volume to (0) %\nrepeat (50)\n    change volume by (2)\nend\n\nwhen I receive [glide v]\nif <(LEVEL) = [2]> then\n    repeat until <(LEVEL) > [2]>\n        play sound [06 v] until done\n    end\nelse\n    repeat until <(LEVEL) > [5]>\n        play sound [06 v] until done\n    end\nend\n\nwhen I receive [setup v]\nset volume to (0) %\n\nwhen I receive [cutscene 2 v]\nrepeat until \n    play sound [128 v] until done\nend\n\nwhen I receive [cutscene 2 v]\nwait (2) seconds\nstop all sounds\nset volume to (0) %\nrepeat (50)\n    change volume by (2)\nend\n\nwhen I receive [replay v]\nrepeat (50)\n    change volume by (-2)\nend\nstop [other scripts in sprite v]\n\n@cutscene2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [cutscene 2 v]\nwait (1) seconds\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <(costume [number v]) = [20]>\nbroadcast (replay v)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nset [canmove v] to [1]\n\nwhen [space v] key pressed\nif <(costume [number v]) < [20]> then\n    next costume\nend\n\n@ending\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [endcutscene v]\ngo to [front v] layer\nshow\nswitch costume to (costume1 v)\n\nwhen [space v] key pressed\nif <(costume [number v]) < [14]> then\n    next costume\nend\n\n