Desert -A Platformer- (collab)

Instructions: Arrow keys/wad/mobile to move\nAvoid cacti.\nBounce on trampolines.

@Stage\n\n@Player\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <(x position) > [210]> then\n        broadcast (NEXT LEVEL v)\n        go to x: (-219) y: (2)\n        set [movement x v] to [0]\n        set [movement y v] to [0]\n    end\nend\n\nwhen I start as a clone\nswitch costume to (fade effect v)\nchange [brightness v] effect by (25)\nset [ghost v] effect to (50)\nrepeat (10)\n    change [ghost v] effect by (4)\n    change size by (-10)\nend\ndelete this clone\n\ndefine reset\nset rotation style [left-right v]\nclear graphic effects\ngo to x: (-210) y: (-50)\npoint in direction (90)\nset [dead? v] to [0]\nset [x v v] to [0]\nset [y v v] to [0]\nset size to (100) %\nshow\n\nwhen I receive [next level v]\nset [change? v] to [1]\nreset\nset [change? v] to [0]\n\ndefine Spin off screen\nset rotation style [all around v]\nrepeat (10)\n    turn left (36) degrees\n    change size by (-10)\nend\nset [dead? v] to [1]\nchange [player death v] by (1)\nreset\n\nwhen flag clicked\nset [level v] to [1]\nset [dead? v] to [0]\nset rotation style [left-right v]\nset size to (90) %\nset [ghost v] effect to (0)\nforever\n    if <touching (cactus v)?> then\n        Spin off screen\n        wait (.01) seconds\n    end\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (.8)\n        point in direction (90)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (-.8)\n        point in direction (-90)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <touching (level v)?> then\n        change y by (2)\n        if <touching (level v)?> then\n            change y by (2)\n            if <touching (level v)?> then\n                change y by (2)\n                if <touching (level v)?> then\n                    change y by <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<<mouse down?> and <((mouse y) - (y position)) > [50]>> and <touching (level v)?>>>\n                    if <touching (level v)?> then\n                        change y by (2)\n                        if <touching (level v)?> then\n                            change x by ((X v) * (-2))\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) + (20))>>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [13]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-0.8)\n    change y by (Y v)\n    if <touching (level v)?> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n            set [y v v] to [14]\n        end\n    end\n    change y by (1)\n    if <<<<<touching (killer wheel v)?> or <touching (spikes v)?>> or <touching (big killer wheel v)?>> or <touching (lightning v)?>> and <(dead?) = [0]>> then\n        Spin off screen\n    end\n    if <touching (sprite2 v)?> then\n        set [y v v] to [18]\n    end\n    create clone of (_myself_ v)\nend\n\nwhen I receive [death' v]\nSpin off screen\n\nwhen flag clicked\nset [change? v] to [0]\nforever\n    if <(x position) > [210]> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [restart v]\nreset\n\nwhen flag clicked\nforever\n    show\nend\n\nwhen flag clicked\nreset\n\nwhen I receive [blinking player v]\nswitch costume to (blink1 v)\nwait (0.02) seconds\nswitch costume to (blink2 v)\nwait (0.02) seconds\nswitch costume to (blink3 v)\nwait (0.02) seconds\nswitch costume to (blink4 v)\nwait (0.02) seconds\nswitch costume to (blink5 v)\nwait (0.02) seconds\nswitch costume to (blink6 v)\nwait (0.02) seconds\nswitch costume to (blink7 v)\nwait (0.02) seconds\nswitch costume to (blink8 v)\nwait (0.02) seconds\nswitch costume to (blink9 v)\nwait (0.02) seconds\nswitch costume to (blink10 v)\nwait (0.02) seconds\nswitch costume to (blink11 v)\nwait (0.02) seconds\nswitch costume to (blink12 v)\nwait (0.02) seconds\nswitch costume to (blink13 v)\nwait (0.02) seconds\nswitch costume to (blink14 v)\nwait (0.02) seconds\nswitch costume to (blink15 v)\nwait (0.02) seconds\nswitch costume to (blink16 v)\nwait (0.02) seconds\nswitch costume to (blink17 v)\nwait (0.02) seconds\nswitch costume to (blink18 v)\nwait (0.02) seconds\nswitch costume to (r v)\n\nwhen flag clicked\nforever\n    switch costume to (r v)\n    wait (pick random (6) to (8)) seconds\n    broadcast (Blinking player v)\nend\n\n@Cactus\n\nwhen flag clicked\ngo to x: (36) y: (28)\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [next level v]\nnext costume\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nshow\n\nwhen flag clicked\nshow\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    play sound [Plugged \(post mastering\) v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\n\nwhen I receive [next level v]\nnext costume\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <touching (player v)?> then\n        start sound [Big Boing v]\n        repeat (6)\n            next costume\n            wait (.05) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        hide\n    end\n    if <(Level) = [3]> then\n        show\n        go to x: (48) y: (-46)\n    end\n    if <(Level) = [4]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        hide\n    end\n    if <(Level) = [6]> then\n        hide\n    end\n    if <(Level) = [7]> then\n        show\n        go to x: (180) y: (-46)\n    end\n    if <(Level) = [8]> then\n        hide\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [10]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        set [level v] to [1]\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n