AUTUMN - || Scrolling Platformer #Games

Instructions:                                    -AUTUMN-\n\nScrolling platformer!\nUse arrow keys to move!\nMobile friendly!\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Pixel Party v] until done\nend\n\n@Player\n\nwhen I start as a clone\nswitch costume to (2 v)\nrepeat (13)\n    change [ghost v] effect by (4)\n    change [pixelate v] effect by (2)\n    change size by (-7)\n    change [color v] effect by (-0.7)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        broadcast (RESET v)\n    end\n    if <<touching (checkpoint v)?> and <touching (spikes v)?>> then\n        broadcast (RESET2 v)\n    end\n    create clone of (_myself_ v)\nend\n\nif <touching color (#6f78ff)?> then\n    set [y velocity v] to [21]\nend\n\nwhen flag clicked\ngo to x: (0) y: (-65)\nset size to (100) %\nswitch costume to (1 v)\n\nwhen flag clicked\n\nif  then\nend\n\n@Platform\n\nwhen flag clicked\nswitch costume to (1 v)\nshow\ngo to x: (12) y: (-9)\nset [y v] to [0]\nset [my variable v] to [0]\nforever\n    change [y v] by (1)\n    if <<key (left arrow v) pressed?> or <<(mouse x) < [0]> and <mouse down?>>> then\n        change [my variable v] by (1)\n    end\n    if <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>> then\n        change [my variable v] by (-1)\n    end\n    set [my variable v] to ((my variable) * (0.9))\n    change x by (my variable)\n    if <touching (player v)?> then\n        change y by (-1)\n    end\n    if <touching (player v)?> then\n        change y by (-1)\n    end\n    if <touching (player v)?> then\n        change y by (-1)\n    end\n    if <touching (player v)?> then\n        change y by (-1)\n    end\n    if <touching (player v)?> then\n        change y by (4)\n        change x by ((my variable) * (-1))\n        if <<key (up arrow v) pressed?> or <<(mouse y) > [-50]> and <mouse down?>>> then\n            set [y v] to [-15]\n            if <([abs v] of (my variable) ) = (my variable)> then\n                set [my variable v] to [-10]\n            else\n                set [my variable v] to [10]\n            end\n        else\n            set [my variable v] to [0]\n        end\n    end\n    change y by (Y)\n    if <touching (player v)?> then\n        change y by ((0) - (Y))\n        set [y v] to [0]\n    end\n    change y by (1)\n    if <<<key (up arrow v) pressed?> or <<(mouse y) > [-50]> and <mouse down?>>> and <touching (player v)?>> then\n        set [y v] to [-15]\n    end\n    change y by (-1)\n    if <(y position) > [190]> then\n        set [my variable v] to [0]\n        set [y v] to [0]\n        go to x: (0) y: (-50)\n    end\nend\n\nwhen I receive [reset v]\ngo to x: (12) y: (-9)\n\nwhen I receive [next level v]\ngo to x: (12) y: (-9)\nnext costume\n\nwhen I receive [reset2 v]\ngo to x: (394) y: (20)\n\n@Decor\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to [back v] layer\npoint in direction (90)\ngo to x: (0) y: (0)\nforever\n    go to x: ([x position v] of [platform v]) y: ([y position v] of [platform v])\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Decor2\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    go to x: ([x position v] of [platform v]) y: ([y position v] of [platform v])\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Grass\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to [front v] layer\ngo [backward v] (19) layers\nforever\n    go to x: ([x position v] of [platform v]) y: ([y position v] of [platform v])\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (1 v)\ngo [backward v] (7) layers\nforever\n    go to x: ([x position v] of [platform v]) y: ([y position v] of [platform v])\nend\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nshow variable [time: v]\nset [time: v] to [0]\nforever\n    wait (0.7) seconds\n    change [time: v] by (1)\nend\n\nwhen [timer v] > (Timer)\nhide variable [time: v]\n\nwhen flag clicked\nset [timer v] to [0.1]\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\n@Trees2\n\nwhen flag clicked\nhide\n\n@Trees4\n\nwhen flag clicked\nhide\n\n@Trees3\n\nwhen flag clicked\nhide\n\n@Grass1\n\nwhen flag clicked\nhide\n\n@Grass2\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (36) y: (28)\nhide\nset [timer v] to [0.1]\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen [timer v] > (Timer)\nshow\n\n@Intro2\n\nwhen I start as a clone\nshow\nset size to (0) %\nswitch costume to (template v)\ngo to x: (0) y: (0)\npoint in direction (90)\nrepeat (30)\n    set [y bounce v] to (((y bounce) * (0.5)) + (((50) - (size)) / (4)))\n    change size by (y bounce)\nend\nrepeat (20)\n    change size by ((sizeAccelerator) * (-1))\n    turn left (2) degrees\nend\nhide\ndelete this clone\n\nwhen I receive [menu v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nchange [ghost v] effect by (5)\n\nwhen flag clicked\nset [sizeaccelerator v] to [-5]\nset [ghost v] effect to (0)\nstart sound [dweep v]\nset size to (0) %\nswitch costume to (xxaxx v)\ngo to x: (0) y: (0)\npoint in direction (90)\nshow\nset [id v] to [start]\ngo to [front v] layer\ncreate clone of (_myself_ v)\ngo to [front v] layer\nrepeat (30)\n    set [y bounce v] to (((y bounce) * (0.7)) + (((50) - (size)) / (3)))\n    change size by (y bounce)\nend\nset size to (50) %\nset [sine v] to [0]\nstart sound [swoosh v]\nrepeat (20)\n    change [sizeaccelerator v] by (0.7)\n    change size by ((sizeAccelerator) * (-1))\n    turn left (2) degrees\nend\nset [intro v] to [1]\nhide\n\nwhen flag clicked\nwait (2) seconds\nif <(costume [number v]) = [1]> then\n    start sound [grow v]\nend\nrepeat until <(size vel) < [0]>\n    turn left ((size vel) * (0.3)) degrees\n    change size by (size vel)\nend\nset [sine v] to [0]\nset [swoosh? v] to [y]\nif <(costume [number v]) = [1]> then\n    start sound [swoosh v]\n    repeat until <(x position) > [0]>\n        set x to (([tan v] of ((sine) * (8)) ) * (-20))\n        turn right (([tan v] of ((sine) * (8)) ) * (20)) degrees\n    end\n    repeat until <(x position) < [0]>\n        set x to (([tan v] of ((sine) * (8)) ) * (-20))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\nelse\n    repeat until <(x position) < [0]>\n        set x to (([tan v] of ((sine) * (8)) ) * (20))\n        turn right (([tan v] of ((sine) * (8)) ) * (20)) degrees\n    end\n    repeat until <(x position) > [0]>\n        set x to (([tan v] of ((sine) * (8)) ) * (20))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\nend\nstart sound [wop v]\nbroadcast (explode v)\nset [swoosh? v] to [n]\nrepeat until <(size) < [10]>\n    turn left ((size vel) * (0.3)) degrees\n    change size by (size vel)\nend\nhide\n\n