Rescue 3 -Desert- || A platformer || 

Instructions: Steps to be my follower:\n1. Love this project\n2. Favourite this project\n3. Go to my account \n4. View my other projects\n5. Follow me!!!\n___________________________________________\nUse your voice to the cat to move around and avoid the lava. The louder you are the faster the cat moves and if you are really loud the cat will jump. \nYou must allow scratch to access your microphone. It only works on some laptops unless you have a headphone. So please stop saying it doesn't work. Thanks. :D\n

@Stage\n\nwhen I receive [music off v]\nset [music v] to [0]\nstop all sounds\n\nwhen I receive [music on v]\nset [music v] to [1]\n\nwhen I receive [new level v]\nnext backdrop\nchange [level v] by (1)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <(music) = [1]> then\n        set volume to (100) %\n        play sound [TheFatRat - Xenogenesis v] until done\n    else\n        stop all sounds\n    end\nend\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch backdrop to (backdrop13 v)\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nset [the jump is bought v] to [0]\nswitch costume to (1 v)\nshow\n\nwhen I receive [new level v]\nnext costume\n\nwhen I receive [flag v]\n\nchange [level v] by (1)\n\nwhen flag clicked\nshow variable [score v]\nshow variable [☁ highscore v]\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume6 v)\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [13]> then\n        broadcast (you won and the world is saved v)\n    end\nend\n\nshow variable [score v]\n\nhide variable [score v]\n\n@Player\n\nwhen flag clicked\nswitch costume to (plain v)\n\ndefine Start\npoint in direction (90)\nset [jump v] to [14]\nset [speed v] to [1]\ngo to x: (-220) y: (-10)\nshow\nforever\n    if on edge, bounce\n    go to [back v] layer\n    set [player: y v] to [0]\n    set [player: x v] to [0]\n    forever\n        change [player: y v] by (-1)\n        set [player: x v] to ((Player: x) * (0.9))\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>>> then\n            change [player: x v] by (join [-] (speed))\n        end\n        if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n            change [player: x v] by ([abs v] of (speed) )\n        end\n        change x by (Player: x)\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (1)\n        end\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by (-4)\n            change x by ((Player: x) * (-1))\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n                set [player: y v] to [10]\n                if <([abs v] of (Player: x) ) = (Player: x)> then\n                    set [player: x v] to [-4]\n                else\n                    set [player: x v] to [4]\n                end\n            else\n                set [player: x v] to [0]\n            end\n        end\n        change y by (Player: y)\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            change y by ((Player: y) - ((Player: y) * (2)))\n            set [player: y v] to [0]\n        end\n        change y by (-1)\n        if <(the jump is bought) = [0]> then\n            if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and <<<touching (level v)?> or <touching (players v)?>> or <touching (moving platform v)?>>> then\n                set [player: y v] to ((jump) * (1.1))\n            end\n        end\n        if <(the jump is bought) = [1]> then\n            if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and <<<touching (level v)?> or <touching (players v)?>> or <touching (moving platform v)?>>> then\n                set [player: y v] to ((jump) * (1.5))\n            end\n        end\n        change y by (1)\n        Next level\n        if <(lives is bought) = [0]> then\n            if <<touching (up enemy v)?> or <<<<<<touching (spikes v)?> or <touching (lava v)?>> or <(y position) < [-170]>> or <touching (enemy v)?>> or <touching (shark v)?>> or <touching (down enemy v)?>>> then\n                go to x: (-220) y: (-10)\n                if <(Score) > [0]> then\n                    set [score v] to ((Score) - (1))\n                else\n                    if <(Score) < [1]> then\n                        set [score v] to (Score)\n                    end\n                end\n            end\n        end\n        if <(lives is bought) = [1]> then\n            if <<<<<touching (spikes v)?> or <touching (lava v)?>> or <(y position) < [-170]>> or <touching (enemy v)?>> or <touching (shark v)?>> then\n            end\n        end\n        change y by (-1)\n        if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and > then\n            set [player: y v] to [16]\n        end\n        change y by (1)\n        if <touching (trampoline v)?> then\n            set [player: y v] to [22]\n        end\n        if <touching (water v)?> then\n            go to [front v] layer\n            set [player: y v] to [-1]\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n                set [player: y v] to [4.5]\n            end\n            if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>>> then\n                change [player: x v] by (-0.1)\n            end\n            if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n                change [player: x v] by (0.1)\n            end\n        end\n        if <touching (crystal v)?> then\n            broadcast (got da crysel v)\n        end\n    end\nend\n\ngo to x: (-220) y: (37)\n\nwhen I start as a clone\nclear graphic effects\nset size to (170) %\nrepeat (10)\n    change [brightness v] effect by (3)\n    change [ghost v] effect by (10)\n    change size by (-1)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [flag v]\ngo to x: (-220) y: (-37)\nStart\n\nwhen I receive [retry v]\ngo to x: (-220) y: (-10)\n\nwhen I receive [the end v]\nhide\n\ndefine Next level\nif <(x position) > [230]> then\n    broadcast (New Level v)\n    go to x: (-220) y: (70)\n    change [level v] by ((Level) + (1))\n    wait until <not <(x position) > [230]>>\nend\n\nwhen I receive [new level v]\ngo to x: (-220) y: (-10)\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (-30)\n\nwhen flag clicked\nforever\n    if <(Score) > (☁ Highscore)> then\n        set [☁ highscore v] to (Score)\n    end\nend\n\nwhen I receive [guy change costume v]\nnext costume\n\nwhen I receive [guy change to last costume  v]\nswitch costume to ((costume [number v]) - (1))\n\nwhen I receive [the player bought the speed! v]\nset [speed v] to [2]\nwait (0.2) seconds\nbroadcast (already bought the speed v)\n\nwhen I receive [the player bought the jump! v]\nset [already bought the jump v] to [1]\nforever\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and <<<touching (level v)?> or <touching (players v)?>> or <touching (moving platform v)?>>> then\n        set [player: y v] to ((jump) * (1.5))\n    end\nend\n\nwhen flag clicked\nset [already bought the jump v] to [0]\n\nwhen I receive [next level v]\ngo to x: (-220) y: (-10)\n\nwhen flag clicked\nhide variable [level v]\n\nwhen I receive [flag v]\nshow variable [level v]\n\nwhen I receive [the player bought invisibility! v]\n\nforever\n\nif <key (i v) pressed?> then\n\nhide\n\nshow\n\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (0)\n\nswitch costume to (plain9 v)\n\nwhen flag clicked\nif <(Level) = [1372]> then\nforever\n\nwhen I receive [new level v]\n\nrepeat (1)\n\nchange y by (1)\n\nwhen flag clicked\nforever\n\nset [score v] to ((Score) + (40))\n\nwhen flag clicked\nforever\n    add (x position) to [player x v]\n    add (y position) to [player y v]\nend\n\nif <(Level) = [2748]> then\n    wait (1) seconds\nend\n\nwhen flag clicked\n\nforever\n\nif <not <(Level) = [2748]>> then\n    add [200] to [player x v]\n    add [-112] to [player y v]\nend\n\nwait (1) seconds\nadd (x position) to [player x v]\nadd (y position) to [player y v]\n\nwhen flag clicked\nset [lower lives v] to [5]\n\nwhen flag clicked\nforever\n    if <(lives is bought) = [1]> then\n        if <<(lower lives) > [0]> and <<<<<touching (spikes v)?> or <touching (lava v)?>> or <(y position) < [-170]>> or <touching (enemy v)?>> or <touching (shark v)?>>> then\n            set [lower lives v] to ((lower lives) - (1))\n            wait until <not <<<<<touching (spikes v)?> or <touching (lava v)?>> or <(y position) < [-170]>> or <touching (enemy v)?>> or <touching (shark v)?>>>\n        end\n        if <(lower lives) = [0]> then\n            set [lower lives v] to [0]\n            broadcast (you loose! :\( v)\n        end\n    end\nend\n\nif  then\nend\n\nset [lower lives v] to [0]\nbroadcast (you loose! :\( v)\n\n@Lava\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume13 v)\nend\n\nwhen I receive [new level v]\nnext costume\nchange [level v] by (1)\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset [level v] to [1]\n\n@Spikes\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume13 v)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [level v] to [1]\n\nwhen I receive [new level v]\nnext costume\nchange [level v] by (1)\n\n@Backstory\n\nwhen flag clicked\nforever\nend\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    if <<not <<(Level) < [36]> or <(Level) > [36]>>> or <not <<(Level) < [10]> or <(Level) > [10]>>>> then\n        wait (0.5) seconds\n        set [ghost v] effect to (0)\n        switch costume to (costume1 v)\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume2 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume3 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume4 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume5 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (3) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume6 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume7 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume8 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (4)\n            change [ghost v] effect by (25)\n        end\n        switch costume to (costume9 v)\n        repeat (4)\n            change [ghost v] effect by (-25)\n        end\n        wait (2) seconds\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        broadcast (second on v)\n        set [ghost v] effect to (100)\n        stop [this script v]\n    else\n        if <<<(Level) < [36]> or <(Level) > [36]>> or <<(Level) < [10]> or <(Level) > [10]>>> then\n            hide\n        end\n    end\nend\n\nrepeat until <<(Level) > [35]> or <(Level) > [9]>>\n    hide\nend\n\nset [second on v] to [1]\n\nset [second on v] to [0]\n\nbroadcast (second on v)\n\nhide\n\nforever\n    if <<(Level) = [36]> or <(Level) = [10]>> then\n        wait (1) seconds\n        show\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [second on v]\n\nwhen flag clicked\nforever\n    repeat until <<(Level) = [36]> or <(Level) = [10]>>\n        hide\n    end\n    if <<(Level) = [36]> or <(Level) = [10]>> then\n        wait (1) seconds\n        show\n    end\nend\n\nwhen I receive [second on v]\nset [ghost v] effect to (100)\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Transition\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nforever\n    if <(second on) > [0]> then\n    end\nend\n\nwhen I receive [second on v]\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nbroadcast (New Level v)\nwait (1) seconds\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide\n\n@Trampoline\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume13 v)\nend\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Moving Platform\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume13 v)\nend\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\nwhen flag clicked\ngo to x: (-16) y: (-4)\nforever\n    Smooth Glide x: (-37) y: (-128) speed: (20)\n    wait (1) seconds\n    Smooth Glide x: (140) y: (-128) speed: (20)\n    wait (1) seconds\nend\n\n@Skip Story\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    go to x: (169) y: (130)\n    if <<(Level) = [36]> or <(Level) = [10]>> then\n        wait (1) seconds\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\n\nforever\n    if <mouse down?> then\n    end\nend\n\nwhen this sprite clicked\nbroadcast (second on v)\n\n@Skip Level\n\nwhen flag clicked\nforever\n    go to x: (-178) y: (-148)\n    if <<(Level) = [36]> or <(Level) = [10]>> then\n        hide\n    else\n        if <<not <(Level) = [36]>> or <(Level) = [10]>> then\n            show\n        end\n    end\n    if <mouse down?> then\nend\n\nwhen this sprite clicked\nbroadcast (New Level v)\nchange [level v] by ((Level) + (1))\nwait until <not <(x position) > [230]>>\nbroadcast (next LEvEL v)\n\nwhen I receive [you won and the world is saved v]\nforever\n    hide\nend\n\n@Title\n\nwhen flag clicked\nshow\nset [sine2 v] to [0]\nforever\n    go to x: (0) y: (109)\n    change [sine2 v] by (7.5)\n    point in direction ((([sin v] of (sine2) ) * (2)) + (90))\nend\n\nwhen I receive [flag v]\nhide\n\nwhen flag clicked\nset [bobble! v] to [0]\nset size to (0) %\nshow\ngo to x: (0) y: (90)\nswitch costume to (title v)\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [bobble! v] to (((bobble!) * (0.6)) + (((350) - (size)) / (2)))\n        change size by (bobble!)\n    else\n        set [bobble! v] to (((bobble!) * (0.6)) + (((300) - (size)) / (2)))\n        change size by (bobble!)\n    end\nend\n\n@menu\n\nwhen I receive [menu v]\nset [menudebug v] to [0]\nset [_debug v] to [0]\nset [_debug v] to [0]\nset [id v] to [0]\nhide\nset [game v] to [0]\nset [menu v] to [1]\nset [sine v] to [0]\n\ndefine clone\ngo to x: (0) y: (-100)\nswitch costume to (play v)\nset [id v] to [2]\ncreate clone of (_myself_ v)\ngo to x: (-75) y: (-100)\nswitch costume to (hs v)\nset [id v] to [3]\ncreate clone of (_myself_ v)\ngo to x: (75) y: (-100)\nswitch costume to (mon v)\nset [id v] to [4]\ncreate clone of (_myself_ v)\ngo to x: (60) y: (-30)\nswitch costume to (skinr v)\nset [id v] to [5]\ncreate clone of (_myself_ v)\ngo to x: (-60) y: (-30)\nswitch costume to (skinl v)\nset [id v] to [6]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [music v] to [1]\nbroadcast (menu v)\nbroadcast (clone menu v) and wait\n\nwhen I receive [start game v]\nset [menu v] to [0]\nset [game v] to [1]\ndelete this clone\n\nwhen flag clicked\nset [_debug v] to [0]\nforever\n    broadcast (LOOP_TICK v)\nend\n\nwhen I start as a clone\nshow\nforever\n    if <(id) = [1]> then\nend\n\ndefine speak (epik tekk) (sped)\nsay []\nset [count v] to [0]\nset [what have i said v] to []\nrepeat (length of (epik tekk))\n    change [count v] by (1)\n    say (join (what have I said) (letter (count) of (epik tekk)))\n    set [what have i said v] to (join (what have I said) (letter (count) of (epik tekk)))\n    wait (sped) seconds\nend\nwait (1.5) seconds\nsay []\n\nwhen flag clicked\nforever\n    change [sine v] by (20)\nend\n\nwhen I receive [clone menu v]\nclone\n\nwhen I start as a clone\nforever\n    if <(id) = [1]> then\n        set size to (300) %\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (15)\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(id) = [2]> then\n        set size to (300) %\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (15)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Blip_Select8 v]\n                broadcast (Flag v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(id) = [3]> then\n        set size to (300) %\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (15)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Blip_Select8 v]\n                say (join [Highscore: ] (☁ Highscore)) for (2.5) seconds\n            end\n        else\n            clear graphic effects\n        end\n        show\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(id) = [4]> then\n        set size to (300) %\n        show\n        if <(music) = [1]> then\n            broadcast (music on v)\n            switch costume to (mon v)\n        else\n            broadcast (music off v)\n            switch costume to (moff v)\n        end\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (15)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Blip_Select8 v]\n                if <(music) = [1]> then\n                    set [music v] to [0]\n                else\n                    set [music v] to [1]\n                end\n            end\n        else\n            clear graphic effects\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(id) = [5]> then\n        set size to (300) %\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (15)\n            if <mouse down?> then\n                wait until <not <mouse down?>>\n                start sound [Blip_Select8 v]\n                broadcast (Guy change costume v) and wait\n            end\n        else\n            clear graphic effects\n        end\n    else\n        if <(id) = [6]> then\n            set size to (300) %\n            show\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (15)\n                if <mouse down?> then\n                    wait until <not <mouse down?>>\n                    start sound [Blip_Select8 v]\n                    broadcast (Guy change to last costume  v)\n                end\n            else\n                clear graphic effects\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\nwhen I receive [flag v]\nforever\n    delete this clone\nend\n\n@backdrop0\n\nwhen flag clicked\nshow\n\nwhen I receive [flag v]\nhide\n\n@Shop Display\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset size to (100) %\ngo to x: (192) y: (-165)\nforever\n    if <touching (mouse-pointer v)?> then\n        Smooth Glide x: (192) y: (-110) speed: (5)\n    else\n        if <not <mouse down?>> then\n            Smooth Glide x: (192) y: (-165) speed: (5)\n        end\n    end\nend\n\nwhen this sprite clicked\nset [player wants shop v] to [1]\nbroadcast (player wants shop v)\nforever\n    if <(player wants shop) = [1]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nset [player wants shop v] to [0]\n\nwhen I receive [player pressed space v]\nset [player wants shop v] to [0]\n\nwhen I receive [flag v]\nswitch costume to (costume1 v)\nshow\n\n@Shop\n\nwhen I receive [player wants shop v]\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nhide\nforever\nend\n\nwhen [space v] key pressed\nbroadcast (player pressed space v)\nhide\n\ngo to [front v] layer\n\n@Speed\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen flag clicked\nforever\n    if <(player wants shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [player wants shop v]\nforever\n    if <(player wants shop) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <<<(Score) > [6]> and <mouse down?>> and <not <(speed) = [2]>>> then\n                if <(speed) = [1]> then\n                    set [the sppeed is boughght v] to [1]\n                    broadcast (The player bought the speed! v)\n                end\n            else\n                if <<(Score) < [7]> and <mouse down?>> then\n                    broadcast (No money to buy the speed v)\n                end\n                if <<(speed) = [2]> and <mouse down?>> then\n                    wait (0.2) seconds\n                    broadcast (already bought the speed v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [the player bought the speed! v]\nsay [You now are very speedy!] for (2) seconds\nswitch costume to (costume2 v)\nset [score v] to ((Score) - (7))\n\nwhen I receive [no money to buy the speed v]\nsay [You don’t have enough money! :\(] for (2) seconds\n\nset [score v] to [50]\n\nwhen I receive [already bought the speed v]\nif <mouse down?> then\n    say [You already bought speed!] for (2) seconds\nend\n\nwhen flag clicked\nset [speed v] to [1]\n\n@Coins\n\nwhen I receive [flag v]\nclear graphic effects\nswitch costume to (coins v)\nforever\n    if <not <(Level) = [36]>> then\n        go to [front v] layer\n        hide\n        go to x: (pick random (-215) to (215)) y: (180)\n        wait (0.5) seconds\n        show\n        repeat until <(y position) < [-120]>\n            change y by (-5.3)\n            if <touching (player v)?> then\n                set [score v] to ((Score) + (1))\n                broadcast (coin v)\n                switch costume to (coins2 v)\n                repeat (20)\n                    change y by (2)\n                    change [ghost v] effect by (5)\n                end\n                hide\n                go to x: (pick random (-215) to (215)) y: (180)\n                show\n                if <(Level) = [36]> then\n                    hide\n                end\n            end\n        end\n        if <(y position) < [-120]> then\n            clear graphic effects\n            switch costume to (coins v)\n            hide\n            go to x: (pick random (-215) to (215)) y: (180)\n        end\n    end\n    if <(Level) = [36]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [score v] to [0]\nhide\n\nshow\n\nwhen I receive [coin v]\nplay sound [Collect v] until done\n\nwhen I receive [you won and the world is saved v]\nforever\n    hide\nend\n\n@High Score and score displayer\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    repeat (25)\n        change [color v] effect by (4)\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@High Jump\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen flag clicked\nforever\n    if <(player wants shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [player wants shop v]\nforever\n    if <(player wants shop) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <<(Score) > [6]> and <mouse down?>> then\n                if <(already bought the jump) = [0]> then\n                    set [the jump is bought v] to [1]\n                    broadcast (the player bought the jump! v)\n                end\n            else\n                if <<(Score) < [7]> and <mouse down?>> then\n                    broadcast (no money to buy the jump v)\n                end\n                if <<(already bought the jump) = [1]> and <mouse down?>> then\n                    wait (0.2) seconds\n                    broadcast (already bought the jump v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [the player bought the jump! v]\nsay [You now are able to jump really high!] for (2) seconds\nswitch costume to (costume2 v)\nset [score v] to ((Score) - (7))\n\nwhen I receive [no money to buy the jump v]\nsay [You don’t have enough money! :\(] for (2) seconds\n\nset [score v] to [50]\n\nwhen I receive [already bought the jump v]\nif <mouse down?> then\n    say [You already bought high jump!] for (2) seconds\nend\n\nwhen flag clicked\nset [speed v] to [1]\n\n\n\n@Enemy\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nforever\n    Smooth Glide x: (67) y: (-112) speed: (10)\n    Smooth Glide x: (-160) y: (-112) speed: (10)\nend\n\ngo to x: (67) y: (-112)\ngo to x: (-160) y: (-112)\n\n@Extra coins\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [invisibility is bought v] to [0]\nforever\n    if <(player wants shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [player wants shop v]\nwait (0.5) seconds\nforever\n    if <(player wants shop) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <<(Score) > [29]> and <mouse down?>> then\n                if <(invisibility is bought) = [0]> then\n                    set [invisibility is bought v] to [1]\n                    broadcast (The player bought invisibility! v)\n                end\n            else\n                if <<(Score) < [30]> and <mouse down?>> then\n                    broadcast (No money to buy invisibility  v)\n                end\n                if <<(invisibility is bought) = [1]> and <mouse down?>> then\n                    wait (0.2) seconds\n                    broadcast (already bought the invisibility v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [the player bought invisibility! v]\nsay [You now have extra coins!] for (2) seconds\nswitch costume to (costume2 v)\nset [score v] to ((Score) - (30))\nset [score v] to ((Score) + (50))\n\nwhen I receive [no money to buy invisibility  v]\nsay [You don’t have enough money! :\(] for (2) seconds\n\nwhen I receive [already bought the invisibility v]\nif <mouse down?> then\n    say [You already bought extra coins!] for (2) seconds\nend\n\nset [score v] to [0]\n\n@Water\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (costume13 v)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Shark\n\nwhen I receive [you won and the world is saved v]\nforever\n    switch costume to (shark-a13 v)\nend\n\nwhen I receive [new level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (shark-a v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    hide\n    go to x: (274) y: (pick random (-96) to (-165))\n    show\n    repeat until <(x position) < [-101]>\n        change x by (-6)\n    end\n    if <(x position) < [-101]> then\n        go to [front v] layer\n        hide\n        show\n        repeat until <(x position) < [-101]>\n            change x by (-6)\n        end\n        go to x: (274) y: (pick random (-96) to (-165))\n    end\nend\n\n@Love and fave commander\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (10)\n        set [ghost v] effect to (-10)\n    end\n    wait (3.5) seconds\n    repeat (10)\n        set [ghost v] effect to (10)\n    end\n    set [ghost v] effect to (100)\n    wait (10) seconds\nend\n\nwhen I receive [flag v]\nforever\n    hide variable [level v]\nend\n\nset [ghost v] effect to (0)\n\nforever\n\n@Win the game!\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [win is bought v] to [0]\nforever\n    if <(player wants shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [player wants shop v]\nwait (0.5) seconds\nforever\n    if <(player wants shop) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <<(Score) > [99]> and <mouse down?>> then\n                if <(win is bought) = [0]> then\n                    set [win is bought v] to [1]\n                    broadcast (the player boughtwin v)\n                end\n            else\n                if <<(Score) < [100]> and <mouse down?>> then\n                    broadcast (no moniess to buy win v)\n                end\n                if <<(win is bought) = [1]> and <mouse down?>> then\n                    wait (0.2) seconds\n                    broadcast (already bought win v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [the player boughtwin v]\nsay [You have officially won the game!] for (2) seconds\nswitch costume to (costume2 v)\nset [score v] to ((Score) - (100))\nbroadcast (you won and the world is saved v)\n\nwhen I receive [no moniess to buy win v]\nsay [You don’t have enough money! :\(] for (2) seconds\n\nwhen I receive [already bought win v]\nif <mouse down?> then\n    say [You already won the game!] for (2) seconds\nend\n\nset [score v] to [1000]\n\n@Lives\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [lives is bought v] to [0]\nforever\n    if <(player wants shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [player wants shop v]\nwait (0.5) seconds\nforever\n    if <(player wants shop) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            if <<(Score) > [39]> and <mouse down?>> then\n                if <(lives is bought) = [0]> then\n                    set [lives is bought v] to [1]\n                    broadcast (player bought lives v)\n                end\n            else\n                if <<(Score) < [40]> and <mouse down?>> then\n                    broadcast (no moneeee to buy lives v)\n                end\n                if <<(win is bought) = [1]> and <mouse down?>> then\n                    wait (0.2) seconds\n                    broadcast (already bought lives v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [player bought lives v]\nsay [You now have lives!] for (2) seconds\nswitch costume to (costume2 v)\nset [score v] to ((Score) - (40))\n\nwhen I receive [no moneeee to buy lives v]\nsay [You don’t have enough money! :\(] for (2) seconds\n\nwhen I receive [already bought lives v]\nif <mouse down?> then\n    say [You already bought lives!] for (2) seconds\nend\n\nset [☁ highscore v] to [0]\n\n@Lives2\n\nwhen flag clicked\nhide\n\nwhen I receive [player bought lives v]\nswitch costume to (5 v)\nshow\n\nwhen flag clicked\nforever\n    switch costume to (lower lives)\nend\n\n@You loose!\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [you loose! :\( v]\nshow\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\n\n@Up enemy\n\nwhen flag clicked\nforever\n    Smooth Glide x: (144) y: (41) speed: (10)\n    Smooth Glide x: (144) y: (-155) speed: (10)\nend\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Down enemy\n\nwhen flag clicked\nwait (1.5) seconds\nforever\n    Smooth Glide x: (144) y: (41) speed: (10)\n    Smooth Glide x: (144) y: (-155) speed: (10)\nend\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new level v]\nnext costume\n\n@Crystal\n\nwhen flag clicked\nshow\nswitch costume to (crystal-b v)\n\nwhen I receive [new level v]\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (-90)\nforever\n    glide (1) secs to x: (0) y: ((y position) + (15))\n    glide (1) secs to x: (0) y: ((y position) - (15))\nend\n\nwhen I receive [got da crysel v]\nforever\n    hide\nend\n\nset [☁ highscore v] to [0]\n\n