slime platformer

Instructions: (:la barre espace pour changer de niveau\net les flèches pour bouger vous pouvez changé la musique sois en appuient sur la touche 1 2 3 4 et 5 ou en cliquant dessus:)\n(: the space bar to change level\nand the arrows to move you can change the music or press the button 1 2 3 4 or 5 or by clicking on it :)\n(: la barra espaciadora para cambiar de nivel\ny las flechas para moverte puedes cambiar la música o presionar el botón 1 2 3 4 y 5 o haciendo clic en él :)\n

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    set volume to (100) %\n    play sound [Avicii_-_Hey_Brother_Lyric v] until done\nend\n\nwhen I receive [next level v]\nwait (1) seconds\nnext backdrop\n\n@Next level\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Player\n\nwhen flag clicked\nshow\n\nwhen I receive [next level v]\nhide\nwait (1) seconds\nshow\ngo to x: (-171) y: (-127)\nset size to (200) %\n\ndefine platformer\nif <key (right arrow v) pressed?> then\n    change [xv v] by (0.75)\n    switch costume to (normal2 v)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-0.75)\n    switch costume to (normal v)\nend\nset [xv v] to ((xV) * (0.9))\nchange x by (xV)\nif <touching (base v)?> then\n    change y by (1)\n    erase all\n    if <touching (base v)?> then\n        change y by (1)\n        erase all\n        if <touching (base v)?> then\n            change y by (1)\n            erase all\n            if <touching (base v)?> then\n                change y by (1)\n                erase all\n                if <touching (base v)?> then\n                    change y by (1)\n                    erase all\n                    if <touching (base v)?> then\n                        change x by ((xV) * (-1))\n                        change y by (-5)\n                        erase all\n                        if <key (up arrow v) pressed?> then\n                            if <(xV) > [0]> then\n                                set [xv v] to [-5]\n                            else\n                                set [xv v] to [5]\n                            end\n                            set [yv v] to [13]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (yV)\nif <touching (base v)?> then\n    change y by ((yV) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (base v)?> then\n    if <key (up arrow v) pressed?> then\n        set [yv v] to [15]\n    end\n    change y by (1)\nend\nif <touching (next level v)?> then\n    broadcast (Next Level v)\nend\nif <touching (bounce v)?> then\n    set [yv v] to [18]\nend\nif <touching (move v)?> then\n    set [yv v] to [0]\n    set [xv v] to [18]\nend\nif <key (space v) pressed?> then\n    broadcast (Next Level v)\n    wait (2) seconds\nend\nif <<touching (danger v)?> or <touching (danger2 v)?>> then\n    go to x: (-177) y: (-100)\n    set size to (200) %\n    set [xv v] to [0]\nend\nif <(y position) < [-187]> then\n    go to x: (-177) y: (-100)\n    set size to (200) %\nend\n\nwhen [loudness v] > (10)\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (normal2 v)\n    end\nend\n\nwhen flag clicked\nset size to (200) %\ngo to [front v] layer\ngo to x: (-0) y: (0)\nswitch costume to (costume1 v)\nshow\nif <(costume [number v]) = [4]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set size to (220) %\n        else\n            set size to (200) %\n        end\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            broadcast (start v)\n            go to x: (-171) y: (-127)\n            switch costume to (normal2 v)\n            go to [back v] layer\n        end\n    end\nend\n\nwhen I receive [start v]\nset size to (200) %\nforever\n    if <key (down arrow v) pressed?> then\n        switch costume to (normal3 v)\n        change volume by (100)\n    end\nend\n\nwhen I receive [start v]\ncreate clone of (_myself_ v)\nshow\nforever\n    platformer\nend\n\nwhen I start as a clone\nswitch costume to (normal4 v)\nrepeat (10)\n    change size by (-20)\nend\ncreate clone of (_myself_ v)\ndelete this clone\n\n@Front\n\nwhen flag clicked\nset size to (200) %\nshow\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nrepeat (20)\n    change [ghost v] effect by (-20)\nend\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nhide\n\n@Base\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Danger\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Bounce\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Move\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Move2\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nwait (1) seconds\nnext costume\n\n@Sprite1\n\nwhen I receive [next level v]\ngo to [front v] layer\nset [trans v] to [0]\nset [ghost v] effect to (0)\nshow\ngo to x: (-450) y: (0)\nset [sprite1: speed v] to [15]\nrepeat until <(x position) > [0]>\n    change x by (Sprite1: speed)\n    change [sprite1: speed v] by (-0.1)\nend\nset [sprite1: speed v] to [17]\nset [trans v] to [1]\nrepeat (25)\n    change y by (Sprite1: speed)\n    change [sprite1: speed v] by (-0.07)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen flag clicked\nset [trans v] to [1]\nhide\n\nchange [sprite1: speed v] by (-0.1)\n\nwait (0.003) seconds\n\n@Sprite15\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [back v] layer\nset [ghost v] effect to (75)\nshow\ngo to (random position v)\nswitch costume to (pick random (1) to (3))\nset size to (pick random (50) to (100)) %\ngo to [back v] layer\nrepeat (7)\n    wait (0.1) seconds\n    change [ghost v] effect by (4)\nend\ndelete this clone\n\nrepeat (4)\n    wait (0.1) seconds\n    change [ghost v] effect by (-25)\nend\n\n@Button3\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset size to (50) %\n\nwhen [3 v] key pressed\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<key (3 v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        stop all sounds\n        start sound [DJ Snake  Lil Jon - Turn Down for What.mp3 v]\n    end\nend\n\n@Button2\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset size to (50) %\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<key (2 v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        stop all sounds\n        start sound [Nya Nya Dance fu v]\n    end\nend\n\n@Button1\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset size to (50) %\n\nwhen [1 v] key pressed\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<key (1 v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        stop all sounds\n        start sound [Jason Derulo - Wiggle feat. Snoop Dogg \(Official HD Music Video\).mp3 v]\n    end\nend\n\n@Button4\n\nwhen flag clicked\nforever\n    if <<key (4 v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        stop all sounds\n        start sound [Fall_Out_Boy_-_Centuries.mp3 v]\n    end\nend\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset size to (50) %\n\nstart sound [Fall_Out_Boy_-_Centuries.mp3 v]\n\n@Button5\n\nwhen flag clicked\nset size to (50) %\n\nwhen flag clicked\ngo to [back v] layer\nshow\nset size to (50) %\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <<key (5 v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        stop all sounds\n        start sound [Soprano - En feu \(Clip officiel\).mp3 v]\n    end\nend\n\n@Sprite2\n\nwhen I receive [start v]\nwait (1) seconds\ngo to [front v] layer\n\nwhen flag clicked\ngo to [back v] layer\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to [front v] layer\n\nwhen I receive [back v]\nhide\n\n@SetupTail\n\nwhen flag clicked\nhide\nset size to (20) %\nset [ghost v] effect to (4)\nset [trailnumber v] to [1]\ndelete all of [trailx v]\ndelete all of [traily v]\nrepeat (20)\n    create clone of (_myself_ v)\n    change size by (1)\n    change [trailnumber v] by (1)\n    add (mouse x) to [trailx v]\n    add (mouse y) to [traily v]\nend\nforever\n    delete (1) of [trailx v]\n    delete (1) of [traily v]\n    delete (2) of [trailx v]\n    delete (2) of [traily v]\n    delete (3) of [trailx v]\n    delete (3) of [traily v]\n    delete (4) of [trailx v]\n    delete (4) of [traily v]\n    add (((mouse x) * (0.25)) + ((item (16) of [trailx v]) * (0.75))) to [trailx v]\n    add (((mouse x) * (0.5)) + ((item (16) of [trailx v]) * (0.5))) to [trailx v]\n    add (((mouse x) * (0.75)) + ((item (16) of [trailx v]) * (0.25))) to [trailx v]\n    add (mouse x) to [trailx v]\n    add (((mouse y) * (0.25)) + ((item (16) of [traily v]) * (0.75))) to [traily v]\n    add (((mouse y) * (0.5)) + ((item (16) of [traily v]) * (0.5))) to [traily v]\n    add (((mouse y) * (0.75)) + ((item (16) of [traily v]) * (0.25))) to [traily v]\n    add (mouse y) to [traily v]\nend\n\nwhen I start as a clone\nwait (0.3) seconds\nforever\n    if <<([abs v] of ((x position) - (mouse x)) ) < [9]> and <([abs v] of ((y position) - (mouse y)) ) < [9]>> then\n        hide\n    else\n        go to [front v] layer\n        show\n        point towards (controlcharacter v)\n        go to x: (item (TrailNumber) of [trailx v]) y: (item (TrailNumber) of [traily v])\n    end\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nadd [thing] to [trailx v]\n\n@Sprite 1\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset size to (50) %\nset [pixelate v] effect to (-100)\nrepeat (33)\n    create clone of (_myself_ v)\n    change size by (2)\n    change [color v] effect by (4)\nend\n\nwhen I start as a clone\nwait (3) seconds\ngo to x: (0) y: (0)\nset size to (50) %\nset [pixelate v] effect to (100)\nrepeat (33)\n    change size by (-2)\n    change [color v] effect by (-4)\nend\nbroadcast (BACK v)\nhide\n\nwhen I receive [back v]\nhide\n\nwhen I receive [back v]\nshow\nwait (5) seconds\nhide\n\nwhen flag clicked\nwait (0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001) seconds\nforever\n    go to [front v] layer\nend\n\n