Notebook: A Platformer

Instructions: Use arrow keys to move.\nThe other instructions are inside the game.\nEnjoy!

@Stage\n\n@platformer\n\nwhen flag clicked\nhide variable [x v]\nhide variable [y v]\nset [x v] to [0]\nset [y v] to [0]\nset [level v] to [1]\nset [yy v] to [-1]\nset [xx v] to [1]\nset [v v] to [0]\nset [startpointx v] to [-165]\nset [startpointy v] to [-133]\nset [deaths v] to [0]\nhide variable [deaths v]\nhide variable [level v]\nswitch backdrop to (backdrop1 v)\nshow variable [level v]\nshow\nset size to (50) %\ngo to x: (startpointx) y: (startpointy)\nset [xv v] to [0]\nset [yv v] to [0]\nset [ehee v] to [0]\nforever\n    change [yv v] by (-1)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (3)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-3)\n    end\n    set [xv v] to ((Xv) * (0.7))\n    change x by (Xv)\n    if <touching color (#000008)?> then\n        change y by (1)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching color (#000008)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000008)?> then\n        if <key (up arrow v) pressed?> then\n            start sound [jump v]\n            set [yv v] to [17]\n        end\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        set [level v] to [1]\n        switch backdrop to (backdrop1 v)\n        change [deaths v] by (1)\n        go to x: (startpointx) y: (startpointy)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <[220] < (x position)> then\n        change [level v] by (1)\n        switch backdrop to (next backdrop v)\n        go to x: (startpointx) y: (startpointy)\n        set [xv v] to [0]\n        set [yy v] to [0]\n    end\n    if <touching color (#ff00d8)?> then\n        set [yv v] to [24]\n    end\n    if <touching color (#00ffff)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [8]\n        else\n            set [yv v] to [-1.5]\n        end\n    end\n    if <touching color (#844a01)?> then\n        change [level v] by (1)\n        switch backdrop to (backdrop34 v)\n        go to x: (startpointx) y: (startpointy)\n    end\n    if <(level) > [50]> then\n        hide variable [level v]\n    end\nend\n\nwhen [r v] key pressed\nif <(level) = [34]> then\n    switch backdrop to (backdrop37 v)\n    go to x: (startpointx) y: (startpointy)\nelse\n    change [deaths v] by (1)\n    go to x: (startpointx) y: (startpointy)\nend\n\nwhen [space v] key pressed\nif <key (space v) pressed?> then\n    if <(EHEE) = [0]> then\n        show variable [deaths v]\n        set [ehee v] to [1]\n        stop [this script v]\n    end\n    if <(EHEE) = [1]> then\n        hide variable [deaths v]\n        set [ehee v] to [0]\n        stop [this script v]\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo to x: (0) y: (0)\nwait until <(backdrop [number v]) = [20]>\nswitch costume to (costume1 v)\nshow\nwait (2) seconds\nnext costume\nwait (2) seconds\nnext costume\ngo to [front v] layer\nstop [all v]\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (-20)\ngo to [front v] layer\ngo to [front v] layer\ngo [forward v] (1) layers\nset [ghost v] effect to (100)\n\n