Carot3 || A Mobile Friendly Platformer

Instructions: Loved By @carot3!\n@0014049 loved and stared\n@bookdog17 loved and stared!\n@stlcards422 loved and stared!\nComment 'Carot3!'\nArrow keys to move.\ns to skip\nThis is a platformer about @Carot3.\nThe followers stat was written at 8:38pm\n25 loves! Yay\n50 loves!!! :O\n75 loves!!! :)\n100 loves!! OMG\nLet's get this to 125 loves and 100 stars!!!\nI have this platforming code in my test account that you are free to remix!\nhttps://scratch.mit.edu/projects/405708259/

@Stage\n\nwhen flag clicked\nhide variable [☁ deaths v]\nhide variable [your deaths v]\n\nwhen I receive [game v]\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Saving Nature v] until done\nend\n\n@Blank\n\n@Carrot3\n\nwhen I start as a clone\nClones\n\nwhen I receive [game v]\nswitch backdrop to (backdrop1 v)\ngo to x: (-200) y: (120)\nset [y v] to [0]\nset [x v] to [0]\nshow\nforever\n    Move\n    Gravity\n    Extras\nend\n\ndefine Move\nif <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    change [x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x v] by (-1)\nend\nset [x v] to ((x) * (0.9))\nchange x by (x)\n\ndefine Gravity\nPlats\nif <not <(y) > [30]>> then\n    change [y v] by (-1)\nelse\n    set [y v] to [30]\nend\nchange y by (y)\nif <touching (platforms v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nJump\nchange y by (1)\n\ndefine Colision\nif <<key (up arrow v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>> 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]\nelse\n    set [y v] to [0]\nend\n\ndefine Jump\nif <<<key (up arrow v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>> and <touching (platforms v)?>> then\n    set [y v] to [17]\nend\nTrampolines\n\ndefine Plats\nif <touching (platforms v)?> then\n    change y by (1)\n    if <touching (platforms v)?> then\n        change y by (1)\n        if <touching (platforms v)?> then\n            change y by (1)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change x by ((x) * (-1))\n                    change y by (-4)\n                    Colision\n                end\n            end\n        end\n    end\nend\n\ndefine Trampolines\nif <touching (trampoline v)?> then\n    set [y v] to [20]\nend\n\ndefine Clones\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\ndefine Extras\nif <(x position) > [240]> then\n    broadcast (Change Level v)\n    go to x: (-200) y: (57)\n    change [level v] by (1)\nend\nif <touching (killer v)?> then\n    go to x: (-200) y: (57)\n    set [x v] to [0]\n    if <(Die?) = [0]> then\n        if <not <(Level) = [11]>> then\n            change [your deaths v] by (1)\n            change [☁ deaths v] by (1)\n        end\n    end\nend\nif <<key (s v) pressed?> and <not <(Level) = [11]>>> then\n    change [level v] by (1)\n    set [x v] to [0]\n    wait (1) seconds\nend\nswitch costume to (carrot3 v)\n\ndefine Setup Clones\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    Setup Clones\nend\n\nwhen flag clicked\nswitch costume to (carrot3 v)\nhide\nset [your deaths v] to [0]\ngo to x: (-200) y: (120)\ngo to [back v] layer\n\n@Killer\n\nwhen flag clicked\nset [level v] to [1]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [outro v]\nhide\n\nwhen I receive [game v]\nshow\n\n@Platforms\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\ngo to x: (0) y: (0)\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\n    if <(Level) = [11]> then\n        show variable [☁ deaths v]\n        show variable [your deaths v]\n    end\nend\n\n@Trampoline\n\nwhen flag clicked\nshow\ngo to x: (62) y: (-79)\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [outro v]\nhide\n\nwhen I receive [game v]\nshow\n\n@Text\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [game v]\nshow\n\nwhen I receive [outro v]\nhide\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (-350) y: (pick random (160) to (60))\nswitch costume to (pick random (1) to (4))\nshow\nrepeat until <(x position) > [200]>\n    move (pick random (2) to (7)) steps\nend\ndelete this clone\n\nwhen I receive [game v]\nforever\n    wait (pick random (0.7) to (1.4)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [outro v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nset [die? v] to [0]\nset [ghost v] effect to (100)\ngo to [front v] layer\n\nwhen I receive [game v]\n\nwhen I receive [change level v]\nset [die? v] to [1]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [die? v] to [0]\n\n@Intro\n\ndefine Smooth Glide To X: (x) Y: (y) at Speed: (speed)\nset size to (100) %\nset [prex v] to (x position)\nset [prey v] to (y position)\nset [postx v] to (x)\nset [posty v] to (y)\nrepeat ((speed) * ((speed) / ((speed) / (5))))\n    change x by (((x) / (speed)) - ((x position) / (speed)))\n    change y by (((y) / (speed)) - ((y position) / (speed)))\nend\nset x to (PostX)\nset y to (PostY)\n\ndefine Create Clone to (costume)\nset size to (100) %\ncreate clone of (_myself_ v)\nswitch costume to (costume)\n\nwhen flag clicked\nbroadcast (Outro v)\nrepeat (10)\n    set size to (100) %\nend\n\nwhen I receive [lingt v]\nCreate Clone to [poof-0]\nrepeat (13)\n    next costume\nend\nset [ghost v] effect to (100)\n\nwhen I receive [boom v]\nset size to (100) %\nrepeat (150)\n    point in direction ((([sin v] of ((bounce) + (-50)) ) * (5)) + (90))\n    set size to ((([sin v] of (bounce) ) * (-5)) + (100)) %\n    change [bounce v] by (2)\nend\nrepeat (10)\n    change [brightness v] effect by (10)\nend\nbroadcast (Game v)\nset [ghost v] effect to (100)\n\nwhen I receive [outro v]\nshow\nstart sound [Amadeus - Euphoria v]\nset [brightness v] effect to (0)\nset size to (100) %\nset [ghost v] effect to (0)\nswitch costume to (back2 v)\npoint in direction (90)\ngo to x: (0) y: (0)\nCreate Clone to [Logo]\n\nwhen I receive [outro v]\nforever\n    if <(costume [number v]) = [17]> then\n        set size to (100) %\n        go to x: (400) y: (400)\n        Smooth Glide To X: (0) Y: (0) at Speed: (6)\n        wait (0.3) seconds\n        repeat until <(round (direction)) = [0]>\n            turn right (([sin v] of ((0) - (direction)) ) * (13)) degrees\n        end\n        repeat until <(round (direction)) = [180]>\n            turn right (([sin v] of ((180) - (direction)) ) * (20)) degrees\n        end\n        repeat until <(round (direction)) = [90]>\n            turn right (([sin v] of ((90) - (direction)) ) * (13)) degrees\n        end\n        Create Clone to [Icons]\n        broadcast (Lingt v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [lingt v]\nbroadcast (Boom v)\n\n