pixel platformer

Instructions: use the arrow keys to move .\navoid spikes and go to the portal to go to the next level.

@Stage\n\n@Speler\n\nwhen flag clicked\nshow\nswitch costume to (costume2 v)\nset rotation style [left-right v]\ngo to x: (-215) y: (-116)\nset [level v] to [0]\nforever\n    if <touching (teleportatie machine v)?> then\n        go to x: (-215) y: (-116)\n        change [level v] by (1)\n        broadcast (teleportatie machine volgend uiterlijk v)\n    end\n    if <touching (rand 1 v)?> then\n        change x by (4.8)\n    end\n    if <touching (spike v)?> then\n        go to x: (-215) y: (-116)\n    end\n    if <touching (spike2 v)?> then\n        go to x: (-215) y: (-116)\n    end\n    if <touching (spike3 v)?> then\n        go to x: (-215) y: (-116)\n    end\n    if <touching (rand 2 v)?> then\n        change x by (-4.8)\n    end\n    if <touching (spike4 v)?> then\n        go to x: (-215) y: (-116)\n    end\n    if <touching (level 6 muur v)?> then\n        change x by (-4.8)\n    end\n    if <<(level) = [5]> and <touching (spike3 v)?>> then\n        broadcast (haha v)\n    end\n    if <touching (lava v)?> then\n        go to x: (-215) y: (-116)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [0]> then\n        broadcast (klaarzetten v)\n    end\n    if <(level) = [1]> then\n        broadcast (spike level 2 v)\n    end\n    if <(level) = [2]> then\n        broadcast (spikiiiiii v)\n    end\n    if <(level) = [3]> then\n        broadcast (level 4 v)\n    end\n    if <(level) = [4]> then\n        broadcast (spike level 3 v)\n    end\n    if <(level) = [5]> then\n        broadcast (level 5 v)\n    end\n    if <(level) = [6]> then\n        broadcast (level 6 v)\n    end\n    if <(level) = [7]> then\n        broadcast (level 7 v)\n    end\n    if <(level) = [8]> then\n        broadcast (you win v)\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.8)\n        switch costume to (costume2 v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.8)\n        switch costume to (costume1 v)\n    end\n    set [xv v] to ((xv) * (0.9))\n    change x by (xv)\n    if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n        change y by (1)\n        if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n            change y by (1)\n            if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n                change y by (1)\n                if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n                    change y by (1)\n                    if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n                        change y by (1)\n                        if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n                            change x by ((xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\n                                end\n                                set [yv v] to [12]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (yv)\n    if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#767676)?> or <touching color (#00ff54)?>> then\n        if <key (up arrow v) pressed?> then\n            change [yv v] by (8.8)\n        end\n    end\n    change y by (1)\nend\n\nwhen I start as a clone\nswitch costume to (uiterlijk1 v)\nforever\n    wait (0) seconds\n    change [ghost v] effect by (15)\n    change size by (-2)\nend\n\nwhen I start as a clone\nwait (0.5) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    set size to (25) %\nend\n\n@ground\n\nwhen flag clicked\ngo to x: (-2) y: (-60)\n\n@rand 1\n\nwhen I receive [klaarzetten v]\nshow\n\n@spike\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\ngo to x: (-20) y: (-116)\n\nwhen I receive [spikiiiiii v]\ngo to x: (-68) y: (-116)\nshow\n\nwhen I receive [spike level 2 v]\nshow\ngo to x: (-68) y: (-116)\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 4 v]\nshow\ngo to x: (-68) y: (-116)\n\nwhen I receive [level 5 v]\nshow\ngo to x: (-68) y: (-116)\n\nwhen I receive [level 6 v]\ngo to x: (-23) y: (-14)\nshow\n\nwait (3) seconds\n\nwhen I receive [level 7 v]\nhide\n\nwhen I receive [level 7 v]\nshow\ngo to x: (-37) y: (-56)\n\n@spike2\n\nwhen flag clicked\nhide\ngo to x: (75) y: (-116)\n\nwhen I receive [spikiiiiii v]\ngo to x: (26) y: (-116)\nshow\n\nwhen I receive [spike level 2 v]\nshow\ngo to x: (-23) y: (-116)\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 4 v]\nshow\ngo to x: (-23) y: (-116)\n\nwhen I receive [level 5 v]\nshow\ngo to x: (-23) y: (-116)\n\nwhen I receive [level 6 v]\nhide\n\nwhen I receive [level 6 v]\nshow\ngo to x: (19) y: (-14)\n\nwhen I receive [level 7 v]\nshow\ngo to x: (7) y: (-56)\n\n@spike3\n\nwhen flag clicked\nhide\ngo to x: (75) y: (-116)\nforever\n    if <<(level) = [5]> and <touching (speler v)?>> then\n        broadcast (haha v)\n        wait (4) seconds\n        broadcast (verdwijn haha v)\n    end\nend\n\nwhen I receive [spike level 3 v]\nshow\ngo to x: (82) y: (-115)\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 4 v]\nshow\ngo to x: (20) y: (-116)\n\nwhen I receive [level 4 v]\ngo to x: (20) y: (-116)\nforever\n    hide\n    wait (1) seconds\n    show\n    wait (1) seconds\nend\n\nwhen I receive [level 6 v]\nhide\n\nwhen I receive [spikiiiiii v]\nshow\ngo to x: (70) y: (-116)\n\nwhen I receive [level 7 v]\nshow\ngo to x: (-81) y: (-56)\n\nhide\n\n@Sprite2\n\nwhen I receive [you win v]\nshow\n\nwhen I receive [klaarzetten v]\nhide\n\n@rand 2\n\nwhen I receive [you win v]\nshow\n\nwhen I receive [klaarzetten v]\nhide\n\n@platform level 6 .1\n\nwhen I receive [spikiiiiii v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 v]\ngo to [front v] layer\ngo to x: (-23) y: (-41)\nshow\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 7 v]\nshow\ngo to x: (-56) y: (-85)\n\nwhen I receive [level 5 v]\nshow\ngo to x: (211) y: (70)\n\n@level 6 muur\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 v]\ngo to x: (258) y: (-117)\nshow\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 7 v]\nhide\n\nwhen I receive [level 5 v]\ngo to x: (258) y: (-117)\nshow\n\n@teleportatie machine\n\nwhen I receive [klaarzetten v]\nshow\ngo to x: (270) y: (-157)\n\nwhen I receive [spike level 2 v]\nshow\ngo to x: (270) y: (-157)\n\nwhen I receive [spikiiiiii v]\nshow\ngo to x: (270) y: (-157)\n\nwhen I receive [level 4 v]\nshow\ngo to x: (270) y: (-157)\n\nwhen I receive [spike level 3 v]\nshow\ngo to x: (270) y: (-157)\n\nwhen I receive [level 5 v]\nshow\ngo to x: (273) y: (54)\n\nwhen I receive [level 6 v]\ngo to x: (268) y: (41)\nshow\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [teleportatie machine volgend uiterlijk v]\nnext costume\n\nwhen flag clicked\nswitch costume to (uiterlijk1 v)\n\nwhen I receive [level 7 v]\nshow\ngo to x: (272) y: (-43)\n\n@Sprite1\n\nwhen I receive [klaarzetten v]\nshow\ngo to x: (36) y: (28)\n\nwhen I receive [spike level 2 v]\nhide\n\n@Sprite3\n\nwhen I receive [haha v]\ngo [backward v] (2) layers\ngo to x: (136) y: (-116)\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [level 6 v]\nhide\n\nwhen I receive [verdwijn haha v]\nhide\n\n@lava\n\nwhen flag clicked\nhide\n\nwhen I receive [you win v]\nhide\n\nwhen I receive [level 7 v]\nshow\ngo to x: (-19) y: (-186)\n\n@platform level 6 .3\n\nwhen flag clicked\nhide\n\nwhen I receive [level 7 v]\nshow\ngo to x: (170) y: (-31)\n\nwhen I receive [spikiiiiii v]\nhide\n\nwhen I receive [level 6 v]\ngo to x: (169) y: (58)\nshow\n\nwhen I receive [you win v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [level 5 v]\nshow\ngo to x: (89) y: (4)\n\nwhen I receive [level 6 v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nshow\ngo to x: (-150) y: (198)\n\nwhen I receive [you win v]\nhide\n\n@Sprite6\n\nwhen I receive [you win v]\ngo to x: (-24) y: (-96)\nshow\n\nwhen I receive [klaarzetten v]\nhide\n\n@tumbnail\n\nwhen flag clicked\nhide\n\n@spike4\n\nwhen flag clicked\nhide\ngo to x: (75) y: (-116)\n\nwhen I receive [spike level 3 v]\nhide\n\nwhen I receive [level 4 v]\nshow\ngo to x: (64) y: (-116)\n\n