Totodile Platformer

Instructions: Press PLAY Button to start\nPress Left/Right Arrow Keys to go Left/Right\nPress Up Arrow Key to jump\nWatch out for lava!\nGood luck!

@Stage\n\n@Sprite2\n\nwhen flag clicked\nhide variable [deaths v]\nset [deaths v] to [0]\nhide\nswitch costume to (totodile1 v)\n\nwhen I receive [go v]\nshow variable [deaths v]\nshow\ngo to x: (-214) y: (115)\nswitch costume to (costume1 v)\nswitch backdrop to (backdrop1 v)\nshow\ngo to x: (-217) y: (-20)\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n        switch costume to (totodile2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n        switch costume to (totodile1 v)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        go to x: (-217) y: (-20)\n        change [deaths v] by (1)\n    end\n    if <(x position) > [222]> then\n        switch backdrop to (next backdrop v)\n        go to x: (-217) y: (-20)\n        if <<(x position) > [222]> and <(backdrop [name v]) = [backdrop8]>> then\n            broadcast (stopp v)\n            stop [all v]\n        end\n    end\n    if <<(backdrop [name v]) = [backdrop11]> or <(backdrop [name v]) = [backdrop19]>> then\n        switch costume to (costume2 v)\n    end\n    if <(backdrop [name v]) = [backdrop17]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [g mobile v]\nshow variable [deaths v]\nshow\ngo to x: (-214) y: (115)\nswitch costume to (costume1 v)\nswitch backdrop to (backdrop1 v)\nshow\ngo to x: (-217) y: (-20)\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (1)\n    end\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by (-4)\n        change x by ((x) * (-1))\n    end\n    change y by (y)\n    if <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <<touching color (#000000)?> or <<touching color (#009933)?> or <touching color (#663b00)?>>>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        go to x: (-217) y: (-20)\n        change [deaths v] by (1)\n    end\n    if <(x position) > [222]> then\n        switch backdrop to (next backdrop v)\n        go to x: (-217) y: (-20)\n        if <<(x position) > [222]> and <(backdrop [name v]) = [backdrop8]>> then\n            broadcast (stopp v)\n            stop [all v]\n        end\n    end\n    if <<(backdrop [name v]) = [backdrop11]> or <(backdrop [name v]) = [backdrop19]>> then\n        switch costume to (costume2 v)\n    end\n    if <(backdrop [name v]) = [backdrop17]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [left arrow v]\nchange [x v] by (-1)\nswitch costume to (totodile2 v)\n\nwhen I receive [right arrow v]\nchange [x v] by (1)\nswitch costume to (totodile1 v)\n\nwhen I receive [up arrow v]\nif <key (up arrow v) pressed?> then\n    set [y v] to [17]\n    if <(x) > [0]> then\n        set [x v] to [-10]\n    else\n        set [x v] to [10]\n    end\nelse\n    set [x v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <(y position) < [-155]> then\n        go to x: (-214) y: (115)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch backdrop to (totodile v)\nshow\nforever\n    play sound [Accumula town - black and white v] until done\nend\n\nwhen this sprite clicked\nhide\nbroadcast (go v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [g mobile v]\nhide\n\n@Sprite4\n\nwhen this sprite clicked\nhide\nbroadcast (G Mobile v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (100) %\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        set size to (80) %\n    end\nend\n\nwhen flag clicked\nforever\n    hide\n    go to [front v] layer\nend\n\nwhen I receive [go v]\nhide\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [g mobile v]\nshow\n\nwhen this sprite clicked\nbroadcast (Left Arrow v)\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen I receive [g mobile v]\nshow\n\nwhen this sprite clicked\nbroadcast (Right Arrow v)\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen I receive [g mobile v]\nshow\n\nwhen this sprite clicked\nbroadcast (Up Arrow v)\n\n@Sprite3\n\nwhen flag clicked\npoint in direction (90)\ngo to [front v] layer\nclear graphic effects\nhide\nforever\n    go to (mouse-pointer v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to (mouse-pointer v)\nshow\nset [ghost v] effect to (0)\nset size to (100) %\nrepeat (10)\n    set [ghost v] effect to (16)\n    change size by (-10)\nend\ndelete this clone\n\nwhen I receive [go v]\nstop [other scripts in sprite v]\nhide\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [14]> then\n        show\n    end\nend\n\nwhen I receive [g mobile v]\nstop [other scripts in sprite v]\nhide\n\n