♡ mochi platformer
@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Maddie Poppe - Wildflowers \(Audio Only\) v] until done\nend\n\n@Sprite1\n\ndefine Platform Script\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    switch costume to (costume2 v)\n    change [xv v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    switch costume to (costume3 v)\n    change [xv v] by (-1)\nend\nset [xv v] to ((xv) * (0.9))\nchange x by (xv)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                end\n                if <touching (ground v)?> then\n                    change x by ((xv) * (-1))\n                    change y by (-5)\n                    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n                        set [yv v] to [25]\n                        if <(xv) > [0]> then\n                            set [xv v] to [-7]\n                        else\n                            set [xv v] to [7]\n                        end\n                    else\n                        set [xv v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-2)\nchange y by ((yv) * (0.85))\nif <touching (ground v)?> then\n    change y by ((yv) * (-0.85))\n    set [yv v] to [0]\nend\nchange y by (-2)\nif <touching (ground v)?> then\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n        set [yv v] to [25]\n    end\nend\nchange y by (1)\nif <touching (ground v)?> then\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n        set [y v] to [25]\n    else\n        set [y v] to [-1]\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to [back v] layer\nforever\n    Platform Script\n    Next Level Detection\n    Death Detection\n    Other Materials\nend\n\ndefine Death Detection\nif <<(y position) < [-150]> or <touching (spikes v)?>> then\n    broadcast (Death of Mochi v)\n    go to x: (-200) y: (-100)\nend\n\ndefine Next Level Detection\nif <(x position) > [240]> then\n    broadcast (Next Level v)\n    go to x: (-200) y: (-100)\n    wait (1) seconds\nend\n\ndefine Other Materials\nif <touching (sink v)?> then\n    change y by (-10)\nend\n\nwhen flag clicked\nforever\n    if <key (h v) pressed?> then\n        wait until <key (o v) pressed?>\n        wait until <key (i v) pressed?>\n        switch costume to (costume4 v)\n        wait (2) seconds\n        switch costume to (costume2 v)\n    end\nend\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@palette more or less\n\n@box\n\nwhen flag clicked\nchange [ghost v] effect by (50)\nforever\n    glide (1) secs to x: (0) y: (10)\n    glide (1) secs to x: (0) y: (-10)\nend\n\n@death flash\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [death of mochi v]\nshow\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@level slide\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nshow\nclear graphic effects\nchange [ghost v] effect by (10)\ngo to x: (-400) y: (0)\nglide (1) secs to x: (700) y: (0)\nhide\n\n@text\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [12]> then\n        wait (10) seconds\n        next costume\n    end\nend\n\n@sink\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n