Ball platformer 

Instructions: Welcome to My first plataformer! \n\n   > Instructions:\n\nuse the arrows keys to move and try to not toutch the \ncolor RED and touch the key to go to the next level.

@Stage\n\nwhen flag clicked\nforever\n    wait (10) seconds\n    set [whirl v] effect to (0)\n    set [color v] effect to (0)\nend\n\nwhen flag clicked\nforever\n    change [whirl v] effect by (25)\nend\n\nwhen flag clicked\nforever\n    change [color v] effect by (25)\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    change [fisheye v] effect by (25)\nend\n\nwhen flag clicked\nforever\n    wait (10) seconds\n    set [whirl v] effect to (0)\n    set [color v] effect to (0)\nend\n\nwhen flag clicked\nswitch backdrop to (fondo1 v)\nforever\n    wait (5) seconds\n    set [fisheye v] effect to (0)\nend\n\nwhen I receive [start v]\nswitch backdrop to (xy-grid-20px v)\n\n@Player\n\ndefine gravedad (gravedad y) saltar (saltar) movimiento horizontal (movimiento horizontal) fricción (fricción) rampa (rampa)\nchange [vel y v] by (gravedad y)\nchange y by (vel y)\nif <touching (plataforma v)?> then\n    repeat until <not <touching (plataforma v)?>>\n        change y by ((([abs v] of (vel y) ) / (vel y)) * (-1))\n    end\n    set [vel y v] to (<<key (up arrow v) pressed?> and <(([abs v] of (vel y) ) / (vel y)) = [-1]>> * (saltar))\nend\nset [vel x v] to (((vel x) + ((<key (left arrow v) pressed?> * ((movimiento horizontal) * (-1))) + (<key (right arrow v) pressed?> * (movimiento horizontal)))) * (fricción))\nchange x by (vel x)\nset [rampa \(objeto que sube\) v] to [0]\nrepeat until <<(rampa \(objeto que sube\)) = ((rampa) * (-1))> or <not <touching (plataforma v)?>>>\n    change y by (1)\n    change [rampa \(objeto que sube\) v] by (-1)\nend\nif <touching (plataforma v)?> then\n    change y by (rampa \(objeto que sube\))\n    repeat until <not <touching (plataforma v)?>>\n        change x by ((([abs v] of (vel x) ) / (vel x)) * (-1))\n    end\nend\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <key (right arrow v) pressed?> then\n        switch costume to (right v)\n    else\n        switch costume to (front v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (left v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (up v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (lava\(objeto que mata\) v)?> then\n        go to x: (-214) y: (-56)\n        change [muerto v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(muerto) = [20]> then\n        broadcast (muchos muertos v)\n        hide\n    end\nend\n\nwhen I receive [muchos muertos v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (llave v)?> then\n        broadcast (siguiente nivel v)\n    end\nend\n\nwhen I receive [siguiente nivel v]\ngo to x: (-214) y: (-56)\n\nwhen flag clicked\nforever\n    if <touching (trampa v)?> then\n        go to x: (-214) y: (-56)\n        change [muerto v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (trampa 2 v)?> then\n        go to x: (-214) y: (-56)\n        change [muerto v] by (1)\n    end\nend\n\nwhen I receive [you win v]\nhide variable [muerto v]\n\nwhen flag clicked\nshow\nswitch costume to (front v)\nforever\n    if <<key (right arrow v) pressed?> and <key (up arrow v) pressed?>> then\n        switch costume to (up-right v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (front v)\nforever\n    if <<key (left arrow v) pressed?> and <key (up arrow v) pressed?>> then\n        switch costume to (up-left v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(muerto) = [15]> then\n        hide variable [muerto v]\n    end\nend\n\nwhen I receive [fin de advertencia v]\nshow variable [muerto v]\nshow\n\nwhen flag clicked\nhide variable [muerto v]\n\nwhen flag clicked\nshow\nsay (join [hi ] (username)) for (1) seconds\nsay [¡Welcome to a plataformer game by ABUELOMATEO!] for (3) seconds\nsay [ I hope you enjoyed 😉 ] for (1) seconds\n\nwhen flag clicked\nshow variable [muerto v]\nset [muerto v] to [0]\nshow\ngo to x: (-214) y: (-56)\nset [vel y v] to [0]\nset [vel x v] to [0]\nforever\n    gravedad [-1] saltar [15] movimiento horizontal [1] fricción [0.8] rampa [8]\nend\n\nwhen I receive [advertencia v]\nhide\n\nwhen flag clicked\nwait until <([costume # v] of [plataforma v]) = [2]>\nsay [wow,  this it's dificulte ¿true?] for (2) seconds\nwait until <([costume # v] of [plataforma v]) = [3]>\nwait (1) seconds\nsay [wow,  this it's dificulte ¿true?] for (2) seconds\n\nwhen flag clicked\nhide variable [mouse x v]\nhide variable [mouse y v]\nforever\n    set [mouse x v] to (mouse x)\n    set [mouse y v] to (mouse y)\n    if <<<<(mouse x) < [-235]> and <(mouse x) > [-222]>> and <(mouse y) < [-180]>> and <mouse down?>> then\n        broadcast (thanks v)\n    end\nend\n\n@plataforma\n\nwhen I receive [muchos muertos v]\nhide\n\nwhen I receive [siguiente nivel v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [4]> then\n        broadcast (trampa v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (trampa 2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) > [6]> then\n        broadcast (fin de la trampa 2 v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    if <(costume [number v]) = [9]> then\n        broadcast (you win v)\n    end\n    if <(costume [number v]) = [3]> then\n        broadcast (hay dificultad v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (flech _puntera v)\n    end\n    if <(costume [number v]) > [5]> then\n        broadcast (flecha puntera_out v)\n    end\nend\n\nwhen I receive [advertencia v]\nhide\n\nwhen I receive [fin de advertencia v]\nshow\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\ngo to x: (-70) y: (-60)\nshow\n\n@lava(objeto que mata)\n\nwhen I receive [muchos muertos v]\nhide\n\nwhen flag clicked\nhide\nswitch costume to (disfraz1 v)\n\nwhen I receive [siguiente nivel v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) > [4]> then\n        broadcast (fin de la trampa v)\n    end\nend\n\nwhen I receive [advertencia v]\nhide\n\nwhen I receive [fin de advertencia v]\nshow\n\nwhen flag clicked\nshow\n\n@Objeto2\n\nwhen flag clicked\nhide\n\nwhen I receive [muchos muertos v]\nbroadcast (perdiste v)\nshow\nhide variable [muerto v]\nstop [all v]\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@llave\n\nwhen flag clicked\nshow\nswitch costume to (disfraz1 v)\n\nwhen I receive [siguiente nivel v]\nnext costume\n\nwhen I receive [muchos muertos v]\nhide\n\nwhen I receive [advertencia v]\nhide\n\nwhen I receive [fin de advertencia v]\nshow\n\n@trampa\n\nwhen flag clicked\nhide\n\nwhen I receive [trampa v]\nshow\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.8) seconds\nend\n\nwhen I receive [fin de la trampa v]\nhide\n\nwhen I receive [muchos muertos v]\nhide\n\nwhen I receive [advertencia v]\nhide\n\n@trampa 2\n\nwhen flag clicked\nhide\nforever\n    next costume\n    wait (0.3) seconds\nend\n\nwhen I receive [trampa 2 v]\nshow\n\nwhen I receive [fin de la trampa 2 v]\nhide\n\nwhen I receive [advertencia v]\nhide\n\n@flecha\n\nwhen flag clicked\nhide\nset size to (100) %\nswitch costume to (disfraz1 v)\n\nwhen flag clicked\nforever\n    change size by (10)\n    wait (0.3) seconds\n    change size by (-10)\n    wait (0.3) seconds\nend\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.3) seconds\nend\n\nwhen I receive [flech _puntera v]\nshow\n\nwhen I receive [flecha puntera_out v]\nhide\n\nwhen I receive [advertencia v]\nhide\n\n@deaths\n\nwhen I receive [you win v]\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [advertencia v]\nhide\n\nwhen I receive [fin de advertencia v]\nshow\n\n@waring\n\nwhen I receive [advertencia v]\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [fin de advertencia v]\nhide\n\n@ok\n\nwhen I receive [advertencia v]\nshow\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (disfraz2 v)\n    else\n        switch costume to (disfraz1 v)\n    end\n    if <(muerto) = [15]> then\n        broadcast (advertencia v)\n    end\nend\n\nwhen this sprite clicked\nforever\n    broadcast (fin de advertencia v)\nend\n\nwhen I receive [fin de advertencia v]\nhide\n\n@level...\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\nshow\n\nwhen I receive [siguiente nivel v]\nnext costume\n\n@love / fave\n\nwhen flag clicked\nhide\ngo to x: (-250) y: (-51)\nset size to (60) %\nforever\n    go to [front v] layer\n    change size by (5)\n    wait (0.002) seconds\n    change size by (5)\n    wait (0.2) seconds\n    change size by (-5)\n    wait (0.002) seconds\n    change size by (-5)\n    wait (0.2) seconds\nend\n\nwhen I receive [you win v]\nshow\n\nwhen flag clicked\nforever\n    go [forward v] (1) layers\nend\n\n@thanks\n\nwhen flag clicked\ngo to x: (92) y: (-122)\nhide\n\nwhen I receive [thanks v]\nshow\nwait (1) seconds\nhide\n\n