Desert Tumble (platformer Entry)[V1.0]
@Stage\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\nwhen I receive [next level v]\nnext backdrop\n\n@pl\n\nwhen flag clicked\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (ground v)?> or <touching (lever wall piece v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (lever wall piece v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (lever wall piece v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (lever wall piece v)?>> then\n        change y by (1)\n    end\n    if <<touching (ground v)?> or <touching (lever wall piece v)?>> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> 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 (ground v)?> or <touching (lever wall piece v)?>> 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 (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [222]> then\n        go to x: (-217) y: (-20)\n        broadcast (NEXT LEVEL v)\n    end\n    if <touching color (#7bbae3)?> then\n        set [y v] to [22]\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nset [ghost v] effect to (99)\nforever\n    if <<touching (fish v)?> or <<<<touching (moving 1 v)?> or <touching (moving 2 v)?>> or <<touching (moving 3 v)?> or <touching (non moving v)?>>> or <(y position) < [-178]>>> then\n        starting pos [-217] [-20]\n        change [deaths: v] by (1)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nchange [☁ views! v] by (1)\ngo to x: (-217) y: (-20)\n\ndefine starting pos (x) (y)\ngo to x: (x) y: (y)\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    play sound [06 v] until done\nend\n\nwhen I receive [next level v]\nnext costume\n\n@moving 1\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [2 v]\nshow\ngo to x: (205) y: (-81)\ngo to [back v] layer\n\nwhen backdrop switches to [3 v]\nhide\n\nwhen flag clicked\nforever\n    switch costume to (costume2 v)\n    wait (3) seconds\n    repeat (4)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (2) seconds\n    repeat (4)\n        wait (0.05) seconds\n        switch costume to ((costume [number v]) - (1))\n    end\n    switch costume to (costume2 v)\nend\n\n@moving 2\n\nwhen flag clicked\nset size to (100) %\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [2 v]\nshow\ngo to x: (144) y: (23)\ngo to [back v] layer\n\nwhen backdrop switches to [3 v]\nhide\n\nwhen flag clicked\nwait (1.5) seconds\nforever\n    switch costume to (costume2 v)\n    wait (3) seconds\n    repeat (4)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (2) seconds\n    repeat (4)\n        wait (0.05) seconds\n        switch costume to ((costume [number v]) - (1))\n    end\n    switch costume to (costume2 v)\nend\n\nwhen backdrop switches to [4 v]\nshow\ngo to x: (190) y: (19)\ngo to [back v] layer\n\nwhen backdrop switches to [6 v]\nhide\n\nwhen backdrop switches to [6 v]\nset size to (400) %\nshow\ngo to x: (5) y: (50)\ngo to [back v] layer\n\nwhen backdrop switches to [7 v]\nhide\n\nwhen backdrop switches to [8 v]\nset size to (100) %\nshow\ngo to x: (-81) y: (-50)\ngo to [back v] layer\n\nwhen backdrop switches to [9 v]\nhide\n\n@non moving\n\nwhen flag clicked\nshow\nforever\n    switch costume to (backdrop [number v])\n    go to [back v] layer\nend\n\n@moving 3\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [3 v]\ngo to [back v] layer\ngo to x: (-113) y: (-66)\nshow\n\nwhen flag clicked\nforever\n    switch costume to (costume2 v)\n    wait (3) seconds\n    repeat (4)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (2) seconds\n    repeat (4)\n        wait (0.05) seconds\n        switch costume to ((costume [number v]) - (1))\n    end\n    switch costume to (costume2 v)\nend\n\nwhen backdrop switches to [4 v]\nhide\n\nwhen backdrop switches to [5 v]\nhide\n\n@signs.\n\nwhen flag clicked\nhide\nforever\n    if <touching (pl v)?> then\n        broadcast (lettering v)\n    else\n        broadcast (no lettering v)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen backdrop switches to [1 v]\ngo to [back v] layer\ngo to x: (1) y: (-91)\nshow\n\nwhen flag clicked\nforever\n    set [sign x v] to (x position)\n    set [sign y v] to (y position)\nend\n\nwhen backdrop switches to [2 v]\nhide\n\nwhen backdrop switches to [13 v]\ngo to [back v] layer\ngo to x: (-135) y: (-76)\nshow\n\nwhen backdrop switches to [13 v]\nhide\n\n@lettering\n\nwhen I receive [lettering v]\nshow\n\nwhen I receive [no lettering v]\nhide\n\nwhen flag clicked\nforever\n    switch costume to (backdrop [number v])\n    go to [front v] layer\n    go to x: (sign x) y: ((sign y) + (60))\nend\n\n@lever wall piece\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [7 v]\ngo to [back v] layer\nposition [0] [0]\nshow\ncostume [1]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\n\ndefine costume (#)\nswitch costume to (#)\n\nwhen I receive [lever? v]\nrepeat (6)\n    wait (0.5) seconds\n    costume ((costume [number v]) + (1))\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [7 v]\ngo to [back v] layer\nshow\nposition [0] [0]\ncostume [1]\nwait until <touching (pl v)?>\nrepeat (5)\n    wait (0.05) seconds\n    switch costume to ((costume [number v]) + (1))\nend\nbroadcast (lever? v)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\n\ndefine costume (#)\nswitch costume to (#)\n\nwhen backdrop switches to [8 v]\nhide\n\n@water\n\nwhen flag clicked\nhide\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\n\nwhen backdrop switches to [11 v]\ngo to [back v] layer\nshow\nposition [0] [-80]\nset [y2 v] to (y position)\nforever\n    ghost [30]\n    set y to (([sin v] of (((timer) * (100)) * (5)) ) + (y2))\n    point in direction ((90) - (([cos v] of ((timer) * (100)) ) * (4)))\n    set size to (100) %\nend\n\ndefine ghost (ghost)\nset [ghost v] effect to (ghost)\n\nwhen backdrop switches to [14 v]\nhide\n\n@fish\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [11 v]\nshow\ngo to x: (126) y: (-175)\ngo to [back v] layer\nforever\n    switch costume to (upwards v)\n    wait (pick random (1) to (2.2)) seconds\n    repeat (24)\n        change y by (10)\n    end\n    switch costume to (downwards v)\n    repeat (22)\n        change y by (-10)\n    end\n    repeat (3)\n        create clone of (_myself_ v)\n    end\n    repeat (2)\n        change y by (-10)\n    end\nend\n\nwhen I start as a clone\nswitch costume to (splash clone v)\ngo to x: (pick random (115) to (140)) y: (-160)\nshow\nrepeat (6)\n    wait (0.05) seconds\n    change y by (pick random (2) to (5))\n    change x by (3)\nend\ndelete this clone\n\nwhen backdrop switches to [12 v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen backdrop switches to [15 v]\nshow\nforever\n    go to [front v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\nshow\nforever\n    go to (pl v)\n    turn right (1) degrees\nend\n\n@thumb\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n