Magma Platformer

Instructions: Cuol1\n-----------------------------------------\nArrow keys or w,a,d to move\nAvoid spikes! Plz like and Fav \nAll levels possible\n15 Levels

@Stage\n\nwhen flag clicked\nswitch backdrop to (intro v)\n\n@Player\n\nwhen [right arrow v] key pressed\nswitch costume to (1 v)\nwait until <not <key (right arrow v) pressed?>>\n\nwhen [left arrow v] key pressed\nswitch costume to (2 v)\nwait until <not <key (left arrow v) pressed?>>\n\nwhen I receive [die v]\ngo to x: (-136) y: (-35)\n\nwhen [a v] key pressed\nswitch costume to (2 v)\nwait until <not <key (d v) pressed?>>\n\nwhen [d v] key pressed\nswitch costume to (1 v)\nwait until <not <key (a v) pressed?>>\n\nwhen I start as a clone\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n\nwhen I receive [green flag v]\nforever\n    if <(Level) = [16]> then\n        if <(y position) > [165]> then\n            if <touching (_edge_ v)?> then\n                broadcast (Yay! v)\n            end\n        end\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [green flag v]\nforever\n    set drag mode [not draggable v]\n    if <touching (spike v)?> then\n        go to x: (-136) y: (-35)\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    set drag mode [not draggable v]\n    if <touching color (#ff6300)?> then\n        go to x: (-136) y: (-35)\n        broadcast (Regen v)\n    end\nend\n\nwhen I receive [green flag v]\nforever\n    if <touching (goal v)?> then\n        broadcast (Next_Level v)\n        go to x: (-136) y: (-35)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nhide variable [level v]\nshow\nset size to (100) %\nswitch costume to (1 v)\nset [y v] to [0]\nset [x v] to [0]\ngo to x: (-136) y: (-35)\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((X) * (.9))\n    change x by (X)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change x by ((X) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-5]\n                                else\n                                    set [x v] to [5]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (platform v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            change [y v] by (15)\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nbroadcast (Green Flag v)\n\n@Platform\n\nwhen I receive [next_level v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nhide\n\nset [level v] to [15]\n\nwhen I receive [buttonoaldf v]\nswitch costume to (12 v)\nwait (1) seconds\nswitch costume to (12v.close v)\n\nwhen I receive [yay! v]\nswitch costume to (yayland v)\n\nwhen I receive [green flag v]\nshow\nswitch costume to (1 v)\nset [level v] to [1]\n\n@Goal\n\nwhen flag clicked\nhide\n\nwhen I receive [green flag v]\nshow\n\n@Spike\n\nwhen flag clicked\nhide\n\nset [level v] to [8]\n\nhide\n\nwhen I receive [green flag v]\nset size to (100) %\nforever\n    if <(Level) = [1]> then\n        hide\n        go to x: (0) y: (0)\n    end\n    if <(Level) = [2]> then\n        show\n        switch costume to (1 v)\n        go to x: (-10) y: (-55)\n    end\n    if <(Level) = [3]> then\n        show\n        switch costume to (2 v)\n        go to x: (165) y: (-55)\n    end\n    if <(Level) = [4]> then\n        switch costume to (1 v)\n        go to x: (0) y: (68)\n    end\n    if <(Level) = [5]> then\n        switch costume to (2 v)\n        go to x: (-16) y: (-54)\n    end\n    if <(Level) = [6]> then\n        go to x: (0) y: (0)\n        switch costume to (level 6 v)\n    end\n    if <(Level) = [7]> then\n        show\n        switch costume to (level 7 v)\n        go to x: (-158) y: (20)\n    end\n    if <(Level) = [8]> then\n        set size to (50) %\n        switch costume to (3 v)\n        go to x: (0) y: (115)\n    end\n    if <(Level) = [9]> then\n        go to x: (145) y: (-90)\n        set size to (10) %\n        show\n    end\n    if <(Level) = [10]> then\n        show\n        set size to (90) %\n        go to x: (-82) y: (-57)\n    end\n    if <(Level) = [12]> then\n        show\n        switch costume to (level 12 v)\n        go to x: (0) y: (0)\n    end\n    if <(Level) = [13]> then\n        show\n        go to x: (-47) y: (-54)\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        switch costume to (level 14 v)\n        go to x: (-65) y: (-55)\n    end\n    if <(Level) = [15]> then\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\n\n@Trick\n\nwhen flag clicked\nhide\nwait until <(Level) = [7]>\nshow\ngo to x: (-76.5) y: (-75)\nwait until <(Level) = [8]>\nhide\n\n@U win\n\nwhen flag clicked\nhide\nwait until <(Level) = [15]>\nshow\n\n