Platformer - A Completely Normal Platformer

Instructions: Arrow Keys to move. Click green flag twice. This platformer is really not what it seems!\nStory: You woke up ready to go into the obstacle course but when you went in it, the roles were reversed! Your objective is to find the obstacle course's Mechanics Handler and flip it back.

@Stage\n\nwhen flag clicked\nset [level v] to [1]\nhide variable [level v]\nshow variable [lives v]\nforever\n    switch backdrop to (Level)\nend\n\n@Player\n\ndefine Platform (gravity) MoveSpeed: (speed) Jump Height (height) Friction (friction) Slope (slope)\nchange [yvelocity v] by (gravity)\nchange y by (YVelocity)\nif <touching color (#000000)?> then\n    repeat until <not <touching color (#000000)?>>\n        change y by ((([abs v] of (YVelocity) ) / (YVelocity)) * (-1))\n    end\n    set [yvelocity v] to (<<<key (down arrow v) pressed?> or <key (s v) pressed?>> and <(([abs v] of (YVelocity) ) / (YVelocity)) = [1]>> * (height))\nend\nset [xvelocity v] to (((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * (speed)) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * ((speed) * (-1)))) * (friction))\nchange x by (XVelocity)\nif <touching color (#000000)?> then\n    change y by (Slope)\n    repeat until <not <touching color (#000000)?>>\n        change x by ((([abs v] of (XVelocity) ) / (XVelocity)) * (-1))\n    end\nend\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching color (#000000)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (90)\nelse\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (-90)\n    end\nend\nif <touching color (#00a2a2)?> then\n    change [level v] by (1)\n    go to x: (-260) y: (0)\nend\n\nwhen flag clicked\nset [lives v] to [0]\ngo to x: (-260) y: (0)\nswitch costume to (reg v)\npoint in direction (90)\nforever\n    Platform [1] MoveSpeed: [7] Jump Height [-15] Friction [0.7] Slope [7]\nend\n\nwhen flag clicked\nforever\n    if <<touching color (#ff0000)?> and <not <(Lives) < [1]>>> then\n        change [lives v] by (-1)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (obstacles v)?> then\n        change [lives v] by (1)\n        wait (0.5) seconds\n    end\nend\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    change [xvelocity v] by ((XVelocity) * (0.7))\nend\n\n@Game Over\n\nwhen flag clicked\nhide\ngo to [front v] layer\nforever\n    if <(Lives) > [4]> then\n        show\n    end\nend\n\n@Obstacles\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen backdrop switches to [1 v]\nshow\n\nwhen backdrop switches to [3 v]\nshow\n\nwhen backdrop switches to [2 v]\nshow\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        wait (0.01) seconds\n        hide\n    end\nend\n\n@Mechanics Handler\n\nwhen flag clicked\nhide\npoint in direction (0)\ngo to x: (210) y: (0)\nwait until <(Level) = [5]>\nshow\nwait until <touching (player v)?>\nrepeat (10)\n    turn right (18) degrees\nend\nbroadcast (Cutscene v)\n\n@Cutscene\n\nwhen I receive [cutscene v]\ngo to [front v] layer\nshow\nhide variable [lives v]\nswitch costume to (costume1 v)\nwait (0.08) seconds\nswitch costume to (costume2 v)\nwait (0.1) seconds\nswitch costume to (costume3 v)\nwait (0.1) seconds\nswitch costume to (costume4 v)\nwait (0.08) seconds\nswitch costume to (costume5 v)\nwait (0.08) seconds\nswitch costume to (costume6 v)\nwait (0.08) seconds\nswitch costume to (costume7 v)\nwait (0.08) seconds\nswitch costume to (costume8 v)\nwait (0.08) seconds\nswitch costume to (costume9 v)\nstop [all v]\n\nwhen flag clicked\nhide\n\n@thumby\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\n\n