Cute platformer

Instructions: DON'T FORGET TO REFRESH THE PAGE\n\n\nIn this game baggy will explain you everything ;)\nBut I will explain the instruction even so:\n- Move with WASD or Arrows Keys \n- You can glide by maintaining Up Arrow or W\n- Your goal is to reach the candy\n- You have only 15 lives and if you die you loose your progression\n\nGood Luck

@Stage\n\nwhen flag clicked\nset [ghost v] effect to (60)\n\nwhen [l v] key pressed\n\nwhen I receive [next level v]\nif <(World) = [1]> then\n    switch backdrop to (backdrop1 v)\n    set [ghost v] effect to (60)\n    set [brightness v] effect to (0)\nelse\n    if <(World) = [2]> then\n        switch backdrop to (backdrop2 v)\n        set [ghost v] effect to (60)\n        set [brightness v] effect to (-10)\n    end\nend\n\nwhen I receive [start1 v]\nif <(World) = [1]> then\n    switch backdrop to (backdrop1 v)\nelse\n    if <(World) = [2]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen I receive [main menu v]\nif <(World) = [1]> then\n    switch backdrop to (backdrop1 v)\nelse\n    if <(World) = [2]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen I receive [@@@@changed world v]\nif <(World) = [1]> then\n    switch backdrop to (backdrop1 v)\nelse\n    if <(World) = [2]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\n@Player's costume\n\nwhen I receive [start2 v]\nset [skin v] to (========Skin select)\nset size to (40) %\nrepeat until <not <(Game mod) = [2]>>\n    a\nend\n\nwhen flag clicked\nhide\n\nset [skin v] to [1]\n\nset [level v] to [14]\n\nbroadcast (next level v)\n\nbroadcast (Boss Fight 1 v)\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nbroadcast (Game over v)\n\nbroadcast (spooky skin unlock v)\n\nset [world v] to [2]\n\nset [level v] to [14]\nbroadcast (next level v)\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nbroadcast (Angel skin unlock v)\n\nwhen [m v] key pressed\nbroadcast (spooky skin unlock v)\nbroadcast (Angel skin unlock v)\nbroadcast (Candy skin unlock v)\n\nwhen I receive [-1 live v]\nrepeat (2)\n    set [ghost v] effect to (10)\n    set [brightness v] effect to (10)\n    wait (0.375) seconds\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    wait (0.375) seconds\nend\n\nset [live v] to [15]\n\nwhen [c v] key pressed\nset [skin v] to [5]\nbroadcast (change skin v)\n\ndefine a\nshow\ngo to (player's hit box v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    if <(skin) = [1]> then\n        switch costume to (droite v)\n    end\n    if <(skin) = [2]> then\n        switch costume to (candy droite v)\n    end\n    if <(skin) = [3]> then\n        switch costume to (spooky droite v)\n    end\n    if <(skin) = [4]> then\n        switch costume to (angel droite v)\n    end\n    if <(skin) = [5]> then\n        switch costume to (chat droite v)\n    end\nelse\n    if <<key (left arrow v) pressed?> or <<key (q v) pressed?> or <key (a v) pressed?>>> then\n        if <(skin) = [1]> then\n            switch costume to (gauche v)\n        end\n        if <(skin) = [2]> then\n            switch costume to (candy gauche v)\n        end\n        if <(skin) = [3]> then\n            switch costume to (spooky gauche v)\n        end\n        if <(skin) = [4]> then\n            switch costume to (angel gauche v)\n        end\n        if <(skin) = [5]> then\n            switch costume to (chat gauche v)\n        end\n    end\nend\n\nwhen [j v] key pressed\nset [world v] to [2]\n\n@player's hit box\n\nwhen flag clicked\n\nwhen flag clicked\nhide\n\nwhen I receive [start2 v]\nshow\nset [ghost v] effect to (99)\nset size to (40) %\nif <(World) = [1]> then\n    go to x: (-205) y: (-40)\nelse\n    go to x: (-205) y: (-55)\nend\nset [speedx v] to [0]\nset [speedy v] to [0]\nset [game mod v] to [2]\nwait (2) seconds\nrepeat until <not <(Game mod) = [2]>>\n    if <<touching color (#ff7fea)?> or <touching color (#ff7fea)?>> then\n        Speed: [0.3] Friction: [0.8] Jump hight: [5] Gravity: [0.6] Gliding: [1]\n    else\n        if <touching color (#00bf01)?> then\n            Speed: [0.35] Friction: [0.9] Jump hight: [15] Gravity: [0.6] Gliding: [6]\n        else\n            if <touching color (#830000)?> then\n                Speed: [0.2] Friction: [0.97] Jump hight: [10] Gravity: [0.6] Gliding: [6]\n            else\n                Speed: [0.4] Friction: [0.9] Jump hight: [10] Gravity: [0.6] Gliding: [6]\n            end\n        end\n    end\n    if <touching (end v)?> then\n        if <not <(Level) = [16]>> then\n            broadcast (next level v)\n            stop [this script v]\n        else\n            wait (3) seconds\n            broadcast (Boss animation v)\n            set [game mod v] to [1]\n            broadcast (main menu v)\n        end\n    end\nend\n\nset [game mod v] to [2]\n\nbroadcast (start2 v)\n\ndefine Speed: (speed) Friction: (friction) Jump hight: (jump hight) Gravity: (gravity) Gliding: (gliding)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [speedx v] by (speed)\nend\nif <<key (left arrow v) pressed?> or <<key (q v) pressed?> or <key (a v) pressed?>>> then\n    change [speedx v] by ((speed) * (-1))\nend\nchange x by (speedX)\nif <touching (platform v)?> then\n    change y by (2)\n    if <touching (platform v)?> then\n        change y by (-2)\n        change x by ((speedX) * (-1))\n        set [speedx v] to [0]\n    end\nelse\n    set [speedx v] to ((speedX) * (friction))\nend\nchange y by (speedY)\nif <touching (platform v)?> then\n    change y by ((speedY) * (-1))\n    set [speedy v] to [0]\n    if <(lock) = [0]> then\n        if <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <<key (z v) pressed?> or <key (w v) pressed?>>>> then\n            set [speedy v] to (jump hight)\n            set [lock v] to [1]\n        end\n    end\nelse\n    if <(speedY) < [0]> then\n        if <<key (up arrow v) pressed?> or <<key (space v) pressed?> or <<key (z v) pressed?> or <key (w v) pressed?>>>> then\n            change [speedy v] by (((gravity) / (gliding)) * (-1))\n        else\n            change [speedy v] by ((gravity) * (-1))\n        end\n    else\n        change [speedy v] by ((gravity) * (-1))\n    end\n    set [lock v] to [0]\nend\n\nchange x by ((speedX) * (-1))\n\nchange x by (10)\n\nif <touching (platform2 v)?> then\n    if <(y position) < [30]> then\n        change y by (2)\n    end\n    if <touching (platform2 v)?> then\n        if <(y position) < [30]> then\n            change y by (-2)\n        end\n        change x by ((speedX) * (-1))\n    end\nelse\n    set [speedx v] to ((speedX) * (friction))\nend\nif <(y position) < [30]> then\n    change y by (speedY)\nend\nif <touching (platform2 v)?> then\n    if <(x position) < [0]> then\n        change y by ((speedY) * (-1))\n    end\n    set [speedy v] to [0]\n    if <(lock) = [0]> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [speedy v] to (jump hight)\n            set [lock v] to [1]\n        end\n    end\nelse\n    if <(speedY) < [0]> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            change [speedy v] by (((gravity) / (gliding)) * (-1))\n        else\n            change [speedy v] by ((gravity) * (-1))\n        end\n    else\n        change [speedy v] by ((gravity) * (-1))\n    end\n    set [lock v] to [0]\nend\nchange x by (speedX)\nif <touching (platform v)?> then\n    change x by ((speedX) * (-1))\nend\n\nset [speedx v] to [0]\n\nset [speedx v] to [0]\n\nif <(x position) < [0]> then\n\n\n\nchange y by (2)\n\nif <[] = [1]> then\n    change y by (10)\nend\n\nwhen I receive [next level v]\nshow\nset [ghost v] effect to (99)\nbroadcast (start2 v)\nif <(World) = [1]> then\n    go to x: (-205) y: (-40)\nelse\n    go to x: (-205) y: (-55)\nend\nset size to (40) %\nset [speedx v] to [0]\nset [speedy v] to [0]\nset [game mod v] to [2]\nwait (2) seconds\n\nwhen I receive [start2 v]\nrepeat until <not <(Game mod) = [2]>>\n    if <<<touching color (#a50000)?> or <<touching color (#ff5bbc)?> or <<touching color (#20d1e2)?> or <touching color (#cff5ff)?>>>> and <touching (enemies w1 v)?>> then\n        broadcast (-1 live v)\n        wait (1) seconds\n    end\n    if <<touching (enemies w1 v)?> and <<([costume # v] of [enemies w1 v]) = [4]> or <([costume # v] of [enemies w1 v]) = [5]>>> then\n        broadcast (-1 live v)\n        wait (1) seconds\n    end\n    if <<touching (_edge_ v)?> and <(y position) < [-179]>> then\n        broadcast (-1 live v)\n        wait (1) seconds\n    end\n    if <<touching (bosses head v)?> or <<touching (bosses right fist v)?> or <<touching (bosses  1 attack v)?> or <touching (bosses left fist v)?>>>> then\n        broadcast (-1 live v)\n        wait (1.5) seconds\n    end\n    if <<<touching color (#a500ff)?> or <<touching color (#ff92fa)?> or <<touching color (#fffdca)?> or <<touching color (#310045)?> or <<touching color (#560084)?> or <<touching color (#fff3f3)?> or <<touching color (#560084)?> or <<touching color (#f5a300)?> or <<touching color (#191000)?> or >>>>>>>>> and <touching (enemies w2 v)?>> then\n        broadcast (-1 live v)\n        wait (1) seconds\n    end\n    if <<touching (bosses head2 v)?> or <touching (boss 2 attack 1 v)?>> then\n        broadcast (-1 live v)\n        wait (1.5) seconds\n    end\nend\n\nwhen I receive [-1 live v]\nshow\nset [ghost v] effect to (99)\nif <(World) = [1]> then\n    go to x: (-205) y: (-40)\nelse\n    go to x: (-205) y: (-55)\nend\nset size to (40) %\nchange [live v] by (-1)\nset [speedx v] to [0]\nset [speedy v] to [0]\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nif <(World) = [1]> then\n    go to x: (-205) y: (-40)\nelse\n    go to x: (-205) y: (-55)\nend\n\nstop [other scripts in sprite v]\n\nset [world v] to [2]\n\nwhen I receive [start2 v]\nrepeat until <not <(Game mod) = [2]>>\n    if <<touching (pcp platform change physique  v)?> and <<([costume # v] of [pcp platform change physique  v]) = [5]> or <<([costume # v] of [pcp platform change physique  v]) = [6]> or <([costume # v] of [pcp platform change physique  v]) = [7]>>>> then\n        if <[100] < (Liquide rouge pv)> then\n            set [liquide rouge pv v] to [100]\n        else\n            if <(Liquide rouge pv) = [100]> then\n                set [liquide rouge pv v] to [0]\n                broadcast (-1 live v)\n                broadcast (liquide rouge v)\n            else\n                change [liquide rouge pv v] by (1.1)\n                broadcast (liquide rouge v)\n            end\n        end\n    else\n        if <(Liquide rouge pv) < [0]> then\n            set [liquide rouge pv v] to [0]\n        else\n            if <not <(Liquide rouge pv) = [0]>> then\n                change [liquide rouge pv v] by (-0.75)\n                broadcast (liquide rouge v)\n            end\n        end\n    end\n    wait (0.01) seconds\nend\n\nwhen I receive [-1 live v]\nset [liquide rouge pv v] to [0]\nbroadcast (liquide rouge v)\n\n@continue button\n\nwhen I receive [start1 v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nset [game mod v] to [1]\ngo to x: (0) y: (-115)\nhide\n\nwhen this sprite clicked\nhide\nset [game mod v] to [2]\nbroadcast (next level v)\nchange [level v] by (-1)\nbroadcast (start2 v)\n\nwhen I receive [start2 v]\nhide\n\nwhen I receive [main menu v]\nshow\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [main menu v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [worlds v]\nhide\n\n@Save button2\n\nwhen I receive [home v]\nshow\ngo [forward v] (99999999999999999) layers\ngo to x: (-110) y: (110)\nrepeat until <not <(Game mod) = [2]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nset size to (60) %\nhide\n\nwhen this sprite clicked\nhide\nset [game mod v] to [1]\nbroadcast (main menu v)\nstop [other scripts in sprite v]\n\nwhen I receive [skins v]\nhide\n\nset [game mod v] to [1]\nhide\n\nwhen I receive [game over v]\nshow\nset size to (75) %\ngo to x: (0) y: (-130)\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [5]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [home 4356262654524 v]\nhide\n\nwhen I receive [worlds v]\nhide\n\n@Worlds button\n\nwhen flag clicked\ngo to x: (0) y: (-10)\nhide\nset [level w1 v] to [1]\nset [level w2 v] to [1]\n\nwhen I receive [worlds v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [main menu v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    go to x: (0) y: (-10)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [start2 v]\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [2]> then\n    set [game mod v] to [10]\n    switch costume to (2_1 v)\n    broadcast (Worlds v)\n    show\n    go to x: (-165) y: (100)\nelse\n    set [game mod v] to [1]\n    go to x: (0) y: (105)\n    broadcast (main menu v)\nend\n\nwhen I receive [start1 v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    go to x: (0) y: (-10)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [worlds v]\nshow\n\nwhen I receive [next level v]\nwait (1) seconds\nif <(World) = [1]> then\n    set [level w1 v] to (Level)\nelse\n    if <(World) = [2]> then\n        set [level w2 v] to (Level)\n    end\nend\n\n@Skins button\n\nwhen I receive [start1 v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (1_2 v)\n    else\n        switch costume to (1_1 v)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (105)\nhide\n\nwhen this sprite clicked\nif <(costume [number v]) = [2]> then\n    set [game mod v] to [3]\n    switch costume to (2_1 v)\n    broadcast (Skins v)\n    show\nelse\n    set [game mod v] to [1]\n    go to x: (0) y: (105)\n    broadcast (main menu v)\nend\n\nwhen I receive [start2 v]\nhide\n\nwhen I receive [skins v]\nshow\ngo to x: (-165) y: (100)\ngo [forward v] (1000000000000000) layers\n\nbroadcast (main menu v)\n\n\n\nbroadcast (Skins v)\nhide\nwait (1) seconds\n\nwhen I receive [main menu v]\nshow\ngo [forward v] (99999999999999999) layers\nrepeat until <not <(Game mod) = [1]>>\n    if <touching (mouse-pointer v)?> then\n        switch costume to (1_2 v)\n    else\n        switch costume to (1_1 v)\n    end\nend\n\nwhen I receive [worlds v]\nhide\n\n@platform\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [world v] to [1]\nset [level v] to [1]\nswitch costume to (level 1 v)\n\nwhen I receive [start2 v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [next level v]\nchange [level v] by (1)\nwait (1) seconds\ngo [backward v] (8575758965746288723495469436314734764395349645) layers\ngo to [back v] layer\nif <(World) = [1]> then\n    if <(Level) = [1]> then\n        switch costume to (level 1 v)\n    end\n    if <(Level) = [2]> then\n        switch costume to (level 2 v)\n    end\n    if <(Level) = [3]> then\n        switch costume to (level 3 v)\n    end\n    if <(Level) = [4]> then\n        switch costume to (level 4 v)\n    end\n    if <(Level) = [5]> then\n        switch costume to (level 5 v)\n    end\n    if <(Level) = [6]> then\n        switch costume to (level 6 v)\n    end\n    if <(Level) = [7]> then\n        switch costume to (level 7 v)\n    end\n    if <(Level) = [8]> then\n        switch costume to (level 8 v)\n    end\n    if <(Level) = [9]> then\n        switch costume to (level 9 v)\n    end\n    if <(Level) = [10]> then\n        switch costume to (level 10 v)\n    end\n    if <(Level) = [11]> then\n        switch costume to (level 11 v)\n    end\n    if <(Level) = [12]> then\n        switch costume to (level 12 v)\n    end\n    if <(Level) = [13]> then\n        switch costume to (level 13 v)\n    end\n    if <(Level) = [14]> then\n        switch costume to (level 14 v)\n    end\n    if <(Level) = [15]> then\n        switch costume to (level 15 v)\n        broadcast (Boss Fight 1 v)\n    end\nelse\n    if <(World) = [2]> then\n        if <(Level) = [1]> then\n            switch costume to (w2 level 1 v)\n        end\n        if <(Level) = [2]> then\n            switch costume to (w2 level 2 v)\n        end\n        if <(Level) = [3]> then\n            switch costume to (w2 level 3 v)\n        end\n        if <(Level) = [4]> then\n            switch costume to (w2 level 4 v)\n        end\n        if <(Level) = [5]> then\n            switch costume to (w2 level 5 v)\n        end\n        if <(Level) = [6]> then\n            switch costume to (w2 level 6 v)\n        end\n        if <(Level) = [7]> then\n            switch costume to (w2 level 7 v)\n        end\n        if <(Level) = [8]> then\n            switch costume to (w2 level 8 v)\n        end\n        if <(Level) = [9]> then\n            switch costume to (w2 level 9 v)\n        end\n        if <(Level) = [10]> then\n            switch costume to (w2 level 10 v)\n        end\n        if <(Level) = [11]> then\n            switch costume to (w2 level 11 v)\n        end\n        if <(Level) = [12]> then\n            switch costume to (w2 level 12 v)\n        end\n        if <(Level) = [13]> then\n            switch costume to (w2 level 13 v)\n        end\n        if <(Level) = [14]> then\n            switch costume to (w2 level 14 v)\n        end\n        if <(Level) = [15]> then\n            switch costume to (w2 level 15 v)\n            broadcast (===Boss Fight 2 v)\n        end\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\ngo to x: (0) y: (0)\n\nif <(Level) = [12]> then\n    switch costume to (level 12 v)\nend\nif <(Level) = [13]> then\n    switch costume to (level 13 v)\nend\nif <(Level) = [14]> then\n    switch costume to (level 14 v)\nend\nif <(Level) = [15]> then\n    switch costume to (level 15 v)\n    broadcast (Boss Fight 1 v)\nend\n\nset [world v] to [2]\n\nset [world v] to [2]\n\nbroadcast (===Boss Fight 2 v)\n\nset [level v] to [15]\n\n@sub nail\n\nwhen flag clicked\ngo [forward v] (9999999999999999999) layers\nswitch costume to (1 v)\nshow\ngo to x: (0) y: (0)\nset size to (105) %\nset [ghost v] effect to (0)\nwait (1) seconds\nswitch costume to (2 v)\nwait until <not <mouse down?>>\nwait until <mouse down?>\nbroadcast (start1 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [start1 v]\nrepeat (35)\n    wait (0.01) seconds\n    change [ghost v] effect by (3)\nend\n\nwhen I start as a clone\nswitch costume to (main menu v)\nshow\ngo to x: (0) y: (0)\nset size to (100) %\nset [ghost v] effect to (0)\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [start2 v]\nrepeat (35)\n    wait (0.01) seconds\n    change [ghost v] effect by (3)\nend\ndelete this clone\n\nwhen I receive [game over v]\nset [game mod v] to [5]\nshow\nset [ghost v] effect to (0)\nswitch costume to (game over v)\nset [level v] to [1]\n\nwhen I receive [main menu v]\nshow\nswitch costume to (main menu v)\nset [ghost v] effect to (0)\n\nwhen I receive [skins v]\nswitch costume to (skins menu v)\n\nset [======= spooky skin v] to [2]\nset [========  angel skin v] to [2]\nset [========  candy skin v] to [2]\n\nwhen I receive [start2 v]\ndelete this clone\n\nwhen I receive [worlds v]\nshow\nswitch costume to (worlds menu v)\nset [ghost v] effect to (0)\n\n@Enemies W1\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (2) seconds\nif <(World) = [1]> then\n    if <(Level) = [4]> then\n        point in direction (90)\n        show\n        switch costume to (lollipop v)\n        set size to (80) %\n        Lolipop x: [30] y: [85] speed [3] level [4]\n    else\n        if <(Level) = [5]> then\n            point in direction (90)\n            show\n            switch costume to (lollipop v)\n            set size to (80) %\n            Lolipop x: [-50] y: [80] speed [2] level [5]\n        else\n            if <(Level) = [6]> then\n                point in direction (90)\n                show\n                switch costume to (lollipop v)\n                set size to (80) %\n                Lolipop x: [-50] y: [50] speed [2.5] level [6]\n            else\n                if <(Level) = [7]> then\n                    point in direction (90)\n                    set size to (60) %\n                    switch costume to (cute cloud1 v)\n                    Cute Cloud x: [0] y: [80] level [7] speed [3]\n                else\n                    if <(Level) = [8]> then\n                        point in direction (90)\n                        set size to (60) %\n                        switch costume to (cute cloud1 v)\n                        Cute Cloud x: [0] y: [0] level [8] speed [2.5]\n                    else\n                        if <(Level) = [9]> then\n                            point in direction (90)\n                            set size to (60) %\n                            switch costume to (lollipop v)\n                            Lolipop x: [0] y: [-40] speed [4.25] level [9]\n                        else\n                            if <(Level) = [11]> then\n                                point in direction (90)\n                                set size to (60) %\n                                switch costume to (lollipop v)\n                                create clone of (_myself_ v)\n                                Cute Cloud x: [-75] y: [80] level [11] speed [2]\n                            else\n                                if <(Level) = [12]> then\n                                    show\n                                    point in direction (90)\n                                    set size to (50) %\n                                    switch costume to (gum ball machine1 v)\n                                    Gum Ball Machine x: [200] y: [-40] level: [12] Speed of Shoot: [1.75]\n                                else\n                                    if <(Level) = [13]> then\n                                        show\n                                        point in direction (90)\n                                        set size to (30) %\n                                        switch costume to (gum ball machine1 v)\n                                        Gum Ball Machine x: [200] y: [95] level: [13] Speed of Shoot: [2]\n                                    else\n                                        if <(Level) = [14]> then\n                                            show\n                                            point in direction (90)\n                                            set size to (28) %\n                                            switch costume to (gum ball machine1 v)\n                                            Gum Ball Machine x: [215] y: [82] level: [14] Speed of Shoot: [1.8]\n                                        else\n                                            hide\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Lolipop x: (x) y: (y) speed (speed) level (level)\ngo [forward v] (10) layers\nshow\nset size to (80) %\ngo to x: (x) y: (y)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    turn right (speed) degrees\nend\nhide\n\ndefine Cute Cloud x: (x) y: (y) level (level) speed (speed)\npoint in direction (90)\nshow\nset size to (60) %\ngo to x: (x) y: (y)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    switch costume to (cute cloud1 v)\n    wait (speed) seconds\n    switch costume to (cute cloud2 v)\n    wait (1) seconds\n    repeat (10)\n        switch costume to (cute cloud3 v)\n        wait (0.1) seconds\n        switch costume to (cute cloud4 v)\n        wait (0.1) seconds\n    end\nend\nhide\n\ndefine Gum Ball Machine x: (x) y: (y) level: (level) Speed of Shoot: (speed of shoot)\npoint in direction (90)\nshow\ngo to x: (x) y: (y)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    wait (0.2) seconds\n    switch costume to (gum ball machine1 v)\n    wait (speed of shoot) seconds\n    switch costume to (gum ball machine2 v)\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\nshow\nif <(Level) = [11]> then\n    point in direction (90)\n    show\n    set size to (60) %\n    go to x: (120) y: (80)\n    switch costume to (cute cloud1 v)\n    repeat until <<not <(Level) = [11]>> or <not <(Game mod) = [2]>>>\n        switch costume to (cute cloud1 v)\n        wait (2) seconds\n        switch costume to (cute cloud2 v)\n        wait (1) seconds\n        repeat (10)\n            switch costume to (cute cloud3 v)\n            wait (0.1) seconds\n            switch costume to (cute cloud4 v)\n            wait (0.1) seconds\n        end\n    end\n    hide\nend\nif <(Level) = [12]> then\n    point in direction (90)\n    go [forward v] (10) layers\n    show\n    set size to (50) %\n    go to x: (x position) y: (y position)\n    switch costume to (gum ball machine 3 v)\n    repeat until <<<touching (player's hit box v)?> or <touching (_edge_ v)?>> or <not <(Game mod) = [2]>>>\n        change x by (-4)\n    end\n    change x by (-4)\n    wait (0.1) seconds\n    delete this clone\nend\nif <(Level) = [13]> then\n    point in direction (90)\n    go [forward v] (10) layers\n    switch costume to (gum ball machine 3 v)\n    show\n    set size to (50) %\n    go to x: (x position) y: (y position)\n    repeat until <<<touching (player's hit box v)?> or <touching (_edge_ v)?>> or <not <(Game mod) = [2]>>>\n        change x by (-4)\n    end\n    change x by (-4)\n    wait (0.1) seconds\n    delete this clone\nend\nif <(Level) = [14]> then\n    point in direction (90)\n    go [forward v] (10) layers\n    switch costume to (gum ball machine 3 v)\n    show\n    set size to (50) %\n    go to x: (x position) y: (y position)\n    repeat until <<<touching (player's hit box v)?> or <touching (_edge_ v)?>> or <not <(Game mod) = [2]>>>\n        change x by (-4)\n    end\n    change x by (-4)\n    wait (0.1) seconds\n    delete this clone\nend\nwait (0.1) seconds\ndelete this clone\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nbroadcast (Angel skin unlock v)\n\nbroadcast (Candy skin unlock v)\n\nbroadcast (spooky skin unlock v)\n\n@end\n\nbroadcast (next level v)\n\nwhen flag clicked\nhide\nset size to (100) %\ngo to x: (200) y: (-40)\n\nwhen I receive [start2 v]\nhide\nwait (0) seconds\nif <(World) = [1]> then\n    show\n    if <(Level) = [1]> then\n        go to x: (200) y: (-40)\n    end\n    if <(Level) = [2]> then\n        go to x: (210) y: (-50)\n    end\n    if <(Level) = [3]> then\n        go to x: (195) y: (-30)\n    end\n    if <(Level) = [4]> then\n        go to x: (195) y: (-30)\n    end\n    if <(Level) = [5]> then\n        go to x: (-190) y: (105)\n    end\n    if <(Level) = [6]> then\n        go to x: (205) y: (165)\n    end\n    if <(Level) = [7]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [8]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [9]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [10]> then\n        go to x: (204) y: (-70)\n    end\n    if <(Level) = [11]> then\n        go to x: (215) y: (-65)\n    end\n    if <(Level) = [12]> then\n        go to x: (195) y: (115)\n    end\n    if <(Level) = [13]> then\n        go to x: (205) y: (-60)\n    end\n    if <(Level) = [14]> then\n        go to x: (215) y: (-65)\n    end\n    if <(Level) = [15]> then\n        go to x: (0) y: (10)\n        hide\n    end\nelse\n    if <(World) = [2]> then\n        if <(Level) = [1]> then\n            hide\n            go to x: (-218) y: (18)\n        end\n        if <(Level) = [2]> then\n            go to x: (201) y: (159)\n            show\n        end\n        if <(Level) = [3]> then\n            hide\n            go to x: (-200) y: (0)\n        end\n        if <(Level) = [4]> then\n            go to x: (-215) y: (47)\n            show\n        end\n        if <(Level) = [5]> then\n            go to x: (215) y: (40)\n            show\n        end\n        if <(Level) = [6]> then\n            go to x: (200) y: (27)\n            show\n        end\n        if <(Level) = [7]> then\n            hide\n            go to x: (-195) y: (0)\n        end\n        if <(Level) = [8]> then\n            go to x: (210) y: (147)\n            show\n        end\n        if <(Level) = [9]> then\n            go to x: (205) y: (155)\n            show\n        end\n        if <(Level) = [10]> then\n            go to x: (-128) y: (135)\n            show\n        end\n        if <(Level) = [11]> then\n            go to x: (215) y: (-65)\n            show\n        end\n        if <(Level) = [12]> then\n            go to x: (195) y: (-67)\n            show\n        end\n        if <(Level) = [13]> then\n            go to x: (-143) y: (132)\n            show\n        end\n    end\nend\n\ngo to x: (205) y: (-65)\n\nwhen I receive [next level v]\nhide\nwait (0) seconds\nif <(World) = [1]> then\n    show\n    if <(Level) = [1]> then\n        go to x: (200) y: (-40)\n    end\n    if <(Level) = [2]> then\n        go to x: (210) y: (-50)\n    end\n    if <(Level) = [3]> then\n        go to x: (195) y: (-30)\n    end\n    if <(Level) = [4]> then\n        go to x: (195) y: (-30)\n    end\n    if <(Level) = [5]> then\n        go to x: (-190) y: (105)\n    end\n    if <(Level) = [6]> then\n        go to x: (205) y: (165)\n    end\n    if <(Level) = [7]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [8]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [9]> then\n        go to x: (195) y: (-60)\n    end\n    if <(Level) = [10]> then\n        go to x: (204) y: (-70)\n    end\n    if <(Level) = [11]> then\n        go to x: (215) y: (-65)\n    end\n    if <(Level) = [12]> then\n        go to x: (195) y: (115)\n    end\n    if <(Level) = [13]> then\n        go to x: (205) y: (-60)\n    end\n    if <(Level) = [14]> then\n        go to x: (215) y: (-65)\n    end\n    if <(Level) = [15]> then\n        go to x: (0) y: (10)\n        hide\n    end\nelse\n    if <(World) = [2]> then\n        if <(Level) = [1]> then\n            hide\n            go to x: (-218) y: (18)\n        end\n        if <(Level) = [2]> then\n            go to x: (201) y: (159)\n            show\n        end\n        if <(Level) = [3]> then\n            hide\n            go to x: (-200) y: (0)\n        end\n        if <(Level) = [4]> then\n            go to x: (-215) y: (47)\n            show\n        end\n        if <(Level) = [5]> then\n            go to x: (215) y: (40)\n            show\n        end\n        if <(Level) = [6]> then\n            go to x: (200) y: (27)\n            show\n        end\n        if <(Level) = [7]> then\n            hide\n            go to x: (-195) y: (0)\n        end\n        if <(Level) = [8]> then\n            go to x: (210) y: (147)\n            show\n        end\n        if <(Level) = [9]> then\n            go to x: (205) y: (155)\n            show\n        end\n        if <(Level) = [10]> then\n            go to x: (205) y: (-65)\n            show\n        end\n        if <(Level) = [11]> then\n            go to x: (208) y: (-155)\n            show\n        end\n        if <(Level) = [12]> then\n            go to x: (200) y: (-67)\n            show\n        end\n        if <(Level) = [13]> then\n            go to x: (-143) y: (132)\n            show\n        end\n        if <(Level) = [14]> then\n            go to x: (-210) y: (100)\n            show\n        end\n        if <(Level) = [15]> then\n            go to x: (0) y: (10)\n            hide\n        end\n    else\n    end\nend\n\ngo to x: (-128) y: (135)\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [boss fight 1 v]\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\n\nwhen I receive [fake end v]\n\nwhen I receive [___fake candy v]\nshow\n\nset [world v] to [2]\n\nshow\n\nhide\n\nset [world v] to [2]\n\ngo to x: (207) y: (-70)\n\nset [level v] to [9]\n\nset [world v] to [2]\n\nwhen I receive [===boss fight 2 v]\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\n\n@PCP platform change physique \n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(World) = [1]> then\n    if <(Level) = [3]> then\n        go [forward v] (100) layers\n        show\n        switch costume to (sticky jelly.  lv 3 v)\n        go to x: (-65) y: (-120)\n    else\n        if <(Level) = [5]> then\n            go [forward v] (100) layers\n            show\n            switch costume to (sticky jelly lv5 v)\n            go to x: (-65) y: (-120)\n        else\n            if <(Level) = [11]> then\n                show\n                switch costume to (bounce jelly. lv11 v)\n                go to x: (-65) y: (-140)\n                go [forward v] (100) layers\n            else\n                if <(Level) = [14]> then\n                    show\n                    switch costume to (bounce jelly. lv11 v)\n                    go to x: (-65) y: (-140)\n                    go [forward v] (100) layers\n                else\n                    hide\n                end\n            end\n        end\n    end\nelse\n    if <(World) = [2]> then\n        if <(Level) = [12]> then\n            go [forward v] (100) layers\n            show\n            switch costume to (bloody jelly.  lv12 v)\n            go to x: (-43) y: (-120)\n        else\n            if <(Level) = [13]> then\n                show\n                switch costume to (bloody jelly.  lv2 v)\n                go to x: (-23) y: (-127)\n                go [forward v] (100) layers\n            else\n                if <(Level) = [14]> then\n                    show\n                    switch costume to (bloody jelly.  lv3 v)\n                    go to x: (-26) y: (21)\n                    go [forward v] (100) layers\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (chocolat v)\n\ngo to x: (-65) y: (-120)\n\nset [level v] to [11]\nbroadcast (next level v)\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\n@Life 1\n\nwhen flag clicked\nhide\nset [live v] to [15]\n\nwhen I receive [start2 v]\nshow\nswitch costume to (no damage v)\ngo [forward v] (100000000) layers\ngo to x: (-200) y: (-150)\nforever\n    go to [front v] layer\n    if <(Live) > [5]> then\n        switch costume to (no damage v)\n    end\n    if <(Live) = [4]> then\n        switch costume to (1 v)\n    end\n    if <(Live) = [3]> then\n        switch costume to (2 v)\n    end\n    if <(Live) = [2]> then\n        switch costume to (3 v)\n    end\n    if <(Live) = [1]> then\n        switch costume to (4 v)\n    end\n    if <(Live) < [1]> then\n        switch costume to (5 v)\n        broadcast (Game over v)\n        set [live v] to [15]\n    end\nend\n\ngo [forward v] (100000000) layers\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\ngo to [front v] layer\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen [b v] key pressed\nif <not <(Live) > [9]>> then\n    change [live v] by (1)\nend\n\nwhen I receive [next level v]\nwait (0.12) seconds\ngo [forward v] (100000000) layers\n\n@Life 2\n\nwhen flag clicked\nhide\n\nwhen I receive [start2 v]\nshow\nswitch costume to (no damage v)\ngo [forward v] (100000000) layers\ngo to x: (-130) y: (-150)\nforever\n    go to [front v] layer\n    if <(Live) > [9]> then\n        switch costume to (no damage v)\n    end\n    if <(Live) = [9]> then\n        switch costume to (1 v)\n    end\n    if <(Live) = [8]> then\n        switch costume to (2 v)\n    end\n    if <(Live) = [7]> then\n        switch costume to (3 v)\n    end\n    if <(Live) = [6]> then\n        switch costume to (4 v)\n    end\n    if <(Live) < [6]> then\n        switch costume to (5 v)\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [next level v]\nwait (0.12) seconds\ngo [forward v] (100000000) layers\n\n@Life 3\n\nwhen flag clicked\nhide\n\nwhen I receive [start2 v]\nshow\nswitch costume to (no damage v)\ngo [forward v] (100000000) layers\ngo to x: (-60) y: (-150)\nforever\n    go to [front v] layer\n    if <(Live) = [15]> then\n        switch costume to (no damage v)\n    end\n    if <(Live) = [14]> then\n        switch costume to (1 v)\n    end\n    if <(Live) = [13]> then\n        switch costume to (2 v)\n    end\n    if <(Live) = [12]> then\n        switch costume to (3 v)\n    end\n    if <(Live) = [11]> then\n        switch costume to (4 v)\n    end\n    if <(Live) < [11]> then\n        switch costume to (5 v)\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [next level v]\nwait (0.12) seconds\ngo [forward v] (100000000) layers\n\nwhen [h v] key pressed\nchange [live v] by (1)\n\n@1 Default Skin \n\nwhen flag clicked\ngo to x: (-135) y: (-20)\nswitch costume to (sélectionner v)\nset [======= spooky skin v] to [1]\nset [========  angel skin v] to [1]\nset [========  candy skin v] to [1]\nset [========skin select v] to [1]\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nshow\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (sélectionner v)\n    set [========skin select v] to [1]\n    broadcast (change skin v)\nelse\n    switch costume to (sélectionner v)\nend\n\ngo to x: (-135) y: (-20)\n\nwhen I receive [change skin v]\nif <(========Skin select) = [1]> then\n    switch costume to (sélectionner v)\nelse\n    switch costume to (non selectionné v)\nend\n\nwhen I receive [start1 v]\nhide\n\n@2 Candy Skin\n\nwhen I receive [main menu v]\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nhide\n\nwhen this sprite clicked\nif <not <(========  Candy Skin) = [1]>> then\n    if <(costume [number v]) = [2]> then\n        switch costume to (sélectionner v)\n        set [========skin select v] to [2]\n        broadcast (change skin v)\n    else\n        switch costume to (sélectionner v)\n    end\nend\n\nwhen I receive [skins v]\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nshow\nif <(========  Candy Skin) = [1]> then\n    switch costume to (locked2 v)\nend\n\nwhen flag clicked\nset [========  candy skin v] to [2]\ngo to x: (-45) y: (-20)\nswitch costume to (non selectionné v)\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nhide\n\nwhen I receive [change skin v]\nif <(========Skin select) = [2]> then\n    switch costume to (sélectionner v)\nelse\n    if <(========  Candy Skin) = [1]> then\n        switch costume to (locked v)\n    else\n        switch costume to (non selectionné v)\n    end\nend\n\nbroadcast (Candy skin unlock v)\n\nbroadcast (Candy skin unlock v)\n\nwhen I receive [start1 v]\nhide\n\n@3 Spooky Skin\n\nwhen I receive [main menu v]\nhide\n\nwhen this sprite clicked\nif <not <(======= Spooky Skin) = [1]>> then\n    if <(costume [number v]) = [2]> then\n        switch costume to (sélectionner v)\n        set [========skin select v] to [3]\n        broadcast (change skin v)\n    else\n        switch costume to (sélectionner v)\n    end\nend\n\nwhen flag clicked\ngo to x: (55) y: (-20)\nswitch costume to (locked v)\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nhide\n\nwhen I receive [skins v]\nshow\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nif <(======= Spooky Skin) = [1]> then\n    switch costume to (locked2 v)\nend\n\nwhen I receive [change skin v]\nif <(========Skin select) = [3]> then\n    switch costume to (sélectionner v)\nelse\n    if <(======= Spooky Skin) = [1]> then\n        switch costume to (locked v)\n    else\n        switch costume to (non selectionné v)\n    end\nend\n\nwhen I receive [spooky skin unlock v]\nswitch costume to (non selectionné v)\nset [======= spooky skin v] to [2]\n\nbroadcast (spooky skin unlock v)\n\nwhen I receive [start1 v]\nhide\n\n@4 Angel Skin\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nshow\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nif <(========  Angel Skin) = [1]> then\n    switch costume to (locked2 v)\nend\n\nwhen this sprite clicked\nif <not <(========  Angel Skin) = [1]>> then\n    if <(costume [number v]) = [2]> then\n        switch costume to (sélectionner v)\n        set [========skin select v] to [4]\n        broadcast (change skin v)\n    else\n        switch costume to (sélectionner v)\n    end\nend\n\nwhen flag clicked\ngo to x: (150) y: (-20)\ngo [forward v] (9999999999999999999999999999999999999908999999999987899897988987985708876969860859878975809359768096783097869508907860980956) layers\nswitch costume to (locked2 v)\nhide\n\nset [======= spooky skin v] to [2]\n\nwhen I receive [change skin v]\nif <(========Skin select) = [4]> then\n    switch costume to (sélectionner v)\nelse\n    if <(========  Angel Skin) = [1]> then\n        switch costume to (locked v)\n    else\n        switch costume to (non selectionné v)\n    end\nend\n\nwhen I receive [angel skin unlock v]\nswitch costume to (non selectionné v)\nset [========  angel skin v] to [2]\n\nbroadcast (Candy skin unlock v)\n\nbroadcast (Angel skin unlock v)\n\nwhen I receive [start1 v]\nhide\n\n@Home Button\n\nwhen I receive [start2 v]\nbroadcast (home 4356262654524 v)\n\nwhen this sprite clicked\nif <not <(costume [number v]) = [3]>> then\n    broadcast (Home v)\n    stop [other scripts in sprite v]\n    switch costume to (home menu v)\n    show variable [music volume v]\nelse\n    broadcast (home 4356262654524 v)\nend\n\nwhen I receive [main menu v]\nhide\nhide variable [music volume v]\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\ngo [forward v] (9999999999999999999999999999999999999999999999999999999999999999999999999847653789287367892873647839287364738298736473828736473829873674839187673829283746782983654738374654372876) layers\nhide variable [music volume v]\ngo to x: (-60) y: (40)\nhide\n\nwhen I receive [home 4356262654524 v]\nshow\nrepeat until <not <(Game mod) = [2]>>\n    hide variable [music volume v]\n    if <touching (mouse-pointer v)?> then\n        switch costume to (home button2 v)\n    else\n        switch costume to (home button v)\n    end\nend\n\nset size to (75) %\n\n@Text\n\nwhen I receive [next level v]\nwait (1) seconds\ngo [backward v] (8575758965746288723495469436314734764395349645) layers\ngo to [back v] layer\nshow\nset [ghost v] effect to (0)\ngo [forward v] (9) layers\nif <(World) = [1]> then\n    if <(Level) = [1]> then\n        show\n        switch costume to (level 1_ part1 v)\n        go to [front v] layer\n        set [ghost v] effect to (0)\n        wait until <not <key (space v) pressed?>>\n        go to [front v] layer\n        set [ghost v] effect to (0)\n        wait until <key (space v) pressed?>\n        Fade animation\n        go to [front v] layer\n        hide\n    else\n        if <(Level) = [2]> then\n            show\n            switch costume to (level 2 v)\n            go to [front v] layer\n            wait until <not <key (space v) pressed?>>\n            go to [front v] layer\n            wait until <key (space v) pressed?>\n            Fade animation\n            go to [front v] layer\n            hide\n        else\n            if <(Level) = [3]> then\n                show\n                switch costume to (level 3 v)\n                go to [front v] layer\n                set [ghost v] effect to (0)\n                wait until <not <key (space v) pressed?>>\n                go to [front v] layer\n                set [ghost v] effect to (0)\n                wait until <key (space v) pressed?>\n                Fade animation\n                go to [front v] layer\n                hide\n            else\n                if <(Level) = [4]> then\n                    show\n                    switch costume to (level 4 v)\n                    set [ghost v] effect to (0)\n                    go to [front v] layer\n                    wait until <not <key (space v) pressed?>>\n                    go to [front v] layer\n                    set [ghost v] effect to (0)\n                    wait until <key (space v) pressed?>\n                    Fade animation\n                    go to [front v] layer\n                    hide\n                else\n                    if <(Level) = [7]> then\n                        show\n                        switch costume to (level 7 v)\n                        go to [front v] layer\n                        set [ghost v] effect to (0)\n                        wait until <not <key (space v) pressed?>>\n                        go to [front v] layer\n                        set [ghost v] effect to (0)\n                        wait until <key (space v) pressed?>\n                        Fade animation\n                        go to [front v] layer\n                        hide\n                    else\n                        if <(Level) = [12]> then\n                            show\n                            switch costume to (level 12 v)\n                            go to [front v] layer\n                            set [ghost v] effect to (0)\n                            wait until <not <key (space v) pressed?>>\n                            go to [front v] layer\n                            set [ghost v] effect to (0)\n                            wait until <key (space v) pressed?>\n                            Fade animation\n                            go to [front v] layer\n                            hide\n                        else\n                            if <(Level) = [15]> then\n                                show\n                                switch costume to (boss 1 v)\n                                go to [front v] layer\n                                set [ghost v] effect to (0)\n                                wait until <not <key (space v) pressed?>>\n                                go to [front v] layer\n                                set [ghost v] effect to (0)\n                                wait until <key (space v) pressed?>\n                                Fade animation\n                                go to [front v] layer\n                                hide\n                            else\n                                hide\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(World) = [2]> then\n        if <(Level) = [1]> then\n            show\n            switch costume to (level 1 w2 v)\n            go to [front v] layer\n            set [ghost v] effect to (0)\n            wait until <not <key (space v) pressed?>>\n            go to [front v] layer\n            set [ghost v] effect to (0)\n            wait until <key (space v) pressed?>\n            Fade animation\n            go to [front v] layer\n            hide\n        else\n            if <(Level) = [2]> then\n                show\n                switch costume to (level 2 w2 v)\n                go to [front v] layer\n                wait until <not <key (space v) pressed?>>\n                go to [front v] layer\n                wait until <key (space v) pressed?>\n                Fade animation\n                go to [front v] layer\n                hide\n            else\n                if <(Level) = [5]> then\n                    show\n                    switch costume to (level 5 w2 v)\n                    go to [front v] layer\n                    set [ghost v] effect to (0)\n                    wait until <not <key (space v) pressed?>>\n                    go to [front v] layer\n                    set [ghost v] effect to (0)\n                    wait until <key (space v) pressed?>\n                    Fade animation\n                    go to [front v] layer\n                    hide\n                else\n                    if <(Level) = [7]> then\n                        show\n                        switch costume to (level 7 w2 v)\n                        set [ghost v] effect to (0)\n                        go to [front v] layer\n                        wait until <not <key (space v) pressed?>>\n                        go to [front v] layer\n                        set [ghost v] effect to (0)\n                        wait until <key (space v) pressed?>\n                        Fade animation\n                        go to [front v] layer\n                        hide\n                    else\n                        if <(Level) = [12]> then\n                            show\n                            switch costume to (level 12 w2 v)\n                            go to [front v] layer\n                            set [ghost v] effect to (0)\n                            wait until <not <key (space v) pressed?>>\n                            go to [front v] layer\n                            set [ghost v] effect to (0)\n                            wait until <key (space v) pressed?>\n                            Fade animation\n                            go to [front v] layer\n                            hide\n                        else\n                            if <(Level) = [15]> then\n                                show\n                                switch costume to (boss w2 v)\n                                go to [front v] layer\n                                set [ghost v] effect to (0)\n                                wait until <not <key (space v) pressed?>>\n                                go to [front v] layer\n                                set [ghost v] effect to (0)\n                                wait until <key (space v) pressed?>\n                                Fade animation\n                                go to [front v] layer\n                                hide\n                            else\n                                hide\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (200) y: (-160)\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\ngo to x: (200) y: (-160)\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [start2 v]\ngo to x: (200) y: (-160)\n\nif <(Level) = [2]> then\n    switch costume to (level 3 v)\nend\nif <(Level) = [3]> then\n    switch costume to (level 3 v)\nend\nif <(Level) = [4]> then\n    switch costume to (level 4 v)\nend\nif <(Level) = [5]> then\n    switch costume to (level 5 v)\nend\nif <(Level) = [6]> then\n    switch costume to (level 6 v)\nend\nif <(Level) = [7]> then\n    switch costume to (level 7 v)\nend\nif <(Level) = [8]> then\n    switch costume to (level 8 v)\nend\nif <(Level) = [9]> then\n    switch costume to (level 9 v)\nend\nif <(Level) = [10]> then\n    switch costume to (level 10 v)\nend\nif <(Level) = [11]> then\n    switch costume to (level 11 v)\nend\nif <(Level) = [12]> then\n    switch costume to (level 12 v)\nend\nif <(Level) = [13]> then\n    switch costume to (level 13 v)\nend\nif <(Level) = [14]> then\n    switch costume to (level 14 v)\nend\nif <(Level) = [15]> then\n    switch costume to (level 15 v)\n    broadcast (Boss Fight 1 v)\nend\n\nwhen I receive [boss fight 1 v]\nshow\nswitch costume to (boss 1 v)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nhide\n\nswitch costume to (level 1 v)\n\ndefine Fade animation\nset [ghost v] effect to (0)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nset [@@@@world 2 unlocked v] to [1]\n\ndefine World 2\n\n@world 1\n\nwhen flag clicked\ngo to x: (-135) y: (-20)\nhide\n\nwhen I receive [start1 v]\nhide\n\nwhen I receive [start2 v]\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [worlds v]\nshow\ngo to [front v] layer\n\ngo to [front v] layer\n\nwhen this sprite clicked\nif <not <(World) = [1]>> then\n    set [world v] to [1]\n    set [level v] to (level W1)\n    broadcast (@@@@changed world v)\nend\nset size to (75) %\nwait (0.2) seconds\nset size to (85) %\n\nset [@@@@world 2 unlocked v] to [2]\n\n@world 2\n\nwhen flag clicked\nset [@@@@world 2 unlocked v] to [0]\ngo to x: (0) y: (-20)\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [start2 v]\nhide\n\nwhen I receive [worlds v]\nshow\ngo to [front v] layer\ngo to [front v] layer\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [start1 v]\nhide\n\nwhen this sprite clicked\nif <(@@@@World 2 Unlocked) = [1]> then\n    if <not <(World) = [2]>> then\n        set [world v] to [2]\n        set [level v] to (level W2)\n        broadcast (@@@@changed world v)\n    end\n    set size to (75) %\n    wait (0.2) seconds\n    set size to (85) %\nend\n\nwhen I receive [boss animation v]\nswitch costume to (costume2 v)\n\nset [@@@@world 2 unlocked v] to [1]\n\n@world 3\n\nwhen flag clicked\ngo to x: (140) y: (-20)\nhide\n\nwhen I receive [worlds v]\n\nshow\n\nwhen I receive [start2 v]\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [start1 v]\nhide\n\nwhen I receive [worlds v]\nshow\ngo to [front v] layer\n\nif <(World unlocked:) > [2]> then\nend\n\n@Level indicator\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [next level v]\ngo to [front v] layer\ngo [forward v] (8760987654334567876543234567876543456786545676545656787294357264938764096149749349319746537634976765418734879745438567493146996665466674673479749963496603445) layers\nswitch costume to (boss - 01 v)\nif <(World) = [1]> then\n    switch costume to ((Level) + (1))\nelse\n    if <(World) = [2]> then\n        switch costume to (((Level) + (1)) + (16))\n    end\nend\nif <(costume [number v]) = [10]> then\n    change [live v] by (5)\n    if <(Live) > [15]> then\n        set [live v] to [15]\n    end\nend\nshow\nreset timer\nrepeat until <(timer) > [2]>\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\n    go to [front v] layer\nend\nhide\n\nif <(Level) = [0]> then\n\nwhen I receive [start2 v]\n\nbroadcast (next level v)\nchange [level v] by (-1)\n\n@bow\n\nwhen flag clicked\nhide\n\nwhen I receive [boss fight 1 v]\nset size to (40) %\ngo to x: (0) y: (-50)\nswitch costume to (item v)\nshow\nrepeat until <touching (player's costume v)?>\n    point in direction (90)\n    go to [front v] layer\n    repeat (25)\n        change y by (0.5)\n    end\n    repeat (25)\n        change y by (-0.5)\n    end\nend\nswitch costume to (1 v)\npoint in direction (120)\nrepeat until <(Boss 1 pv) < [1]>\n    go to [back v] layer\n    if <<([costume # v] of [player's costume v]) = [2]> or <<([costume # v] of [player's costume v]) = [4]> or <<([costume # v] of [player's costume v]) = [6]> or <<([costume # v] of [player's costume v]) = [10]> or <([costume # v] of [player's costume v]) = [8]>>>>> then\n        point in direction (120)\n        go to x: (([x position v] of [player's hit box v]) + (30)) y: (([y position v] of [player's hit box v]) + (55))\n    else\n        if <<([costume # v] of [player's costume v]) = [1]> or <<([costume # v] of [player's costume v]) = [3]> or <<([costume # v] of [player's costume v]) = [5]> or <<([costume # v] of [player's costume v]) = [9]> or <([costume # v] of [player's costume v]) = [7]>>>>> then\n            point in direction (60)\n            go to x: (([x position v] of [player's hit box v]) + (-30)) y: (([y position v] of [player's hit box v]) + (55))\n        end\n    end\nend\nswitch costume to (1 v)\n\nset size to (50) %\n\nset [boss 1 pv v] to [4]\n\nwhen I receive [boss fight 1 v]\nwait (0.1) seconds\nrepeat until <(Boss 1 pv) < [1]>\n    if <mouse down?> then\n        if <(costume [number v]) = [2]> then\n            switch costume to (2 v)\n            wait (0.000001) seconds\n            switch costume to (3 v)\n            wait (0.000001) seconds\n            create clone of (_myself_ v)\n            switch costume to (4 v)\n            wait (0.000001) seconds\n            switch costume to (1 v)\n            wait (2) seconds\n        end\n    end\nend\nswitch costume to (1 v)\n\nset size to (35) %\n\nwhen I start as a clone\nif <(World) = [1]> then\n    show\n    switch costume to (costume1 v)\n    go to x: (x position) y: (y position)\n    if <(direction) = [60]> then\n        point in direction (-30)\n    else\n        if <(direction) = [120]> then\n            point in direction (30)\n        end\n    end\n    repeat until <<touching (bosses head v)?> or <touching (_edge_ v)?>>\n        move (20) steps\n    end\n    move (20) steps\n    move (20) steps\n    wait (0.1) seconds\n    delete this clone\nelse\n    if <(World) = [2]> then\n        show\n        switch costume to (costume2 v)\n        go to x: (x position) y: (y position)\n        if <(direction) = [60]> then\n            point in direction (-30)\n        else\n            if <(direction) = [120]> then\n                point in direction (30)\n            end\n        end\n        repeat until <<touching (bosses head2 v)?> or <touching (_edge_ v)?>>\n            move (25) steps\n        end\n        move (25) steps\n        move (25) steps\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [boss 1 death v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [===boss fight 2 v]\nset size to (40) %\ngo to x: (0) y: (-50)\nswitch costume to (item2 v)\nshow\nrepeat until <touching (player's costume v)?>\n    point in direction (90)\n    go to [front v] layer\n    repeat (25)\n        change y by (0.5)\n    end\n    repeat (25)\n        change y by (-0.5)\n    end\nend\nswitch costume to (2-1 v)\npoint in direction (120)\nrepeat until <(Boss 2 Pv) < [1]>\n    go to [back v] layer\n    if <<([costume # v] of [player's costume v]) = [2]> or <<([costume # v] of [player's costume v]) = [4]> or <<([costume # v] of [player's costume v]) = [6]> or <<([costume # v] of [player's costume v]) = [10]> or <([costume # v] of [player's costume v]) = [8]>>>>> then\n        point in direction (120)\n        switch costume to (2-2 v)\n        go to x: (([x position v] of [player's hit box v]) + (30)) y: (([y position v] of [player's hit box v]) + (55))\n    else\n        if <<([costume # v] of [player's costume v]) = [1]> or <<([costume # v] of [player's costume v]) = [3]> or <<([costume # v] of [player's costume v]) = [5]> or <<([costume # v] of [player's costume v]) = [9]> or <([costume # v] of [player's costume v]) = [7]>>>>> then\n            point in direction (60)\n            switch costume to (2-1 v)\n            go to x: (([x position v] of [player's hit box v]) + (-30)) y: (([y position v] of [player's hit box v]) + (55))\n        end\n    end\nend\nswitch costume to (1 v)\n\nwhen I receive [===boss fight 2 v]\nrepeat until <(Boss 2 Pv) < [1]>\n    if <mouse down?> then\n        if <<(costume [number v]) = [8]> or <(costume [number v]) = [9]>> then\n            create clone of (_myself_ v)\n            wait (2) seconds\n        end\n    end\nend\nswitch costume to (1 v)\n\nwhen I receive [boss 2 death v]\nhide\n\n@Bosses left fist\n\nbroadcast (Attack 3 boss 1 v)\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [-1 live v]\n\nwhen I receive [attack2 boss 1 v]\nswitch costume to (costume2 v)\nrepeat (30)\n    point towards (player's hit box v)\nend\nrepeat (2)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\nrepeat until <touching (platform v)?>\n    move (20) steps\nend\nbroadcast (Shaking effect v)\nwait (1) seconds\nswitch costume to (costume1 v)\nturn left (90) degrees\nglide (0.5) secs to x: (-105) y: (50)\npoint in direction (90)\n\nwhen I receive [boss fight 1 v]\npoint in direction (90)\nswitch costume to (costume1 v)\ngo to x: (-105) y: (50)\nset [boss 1 pv v] to [30]\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [boss 1 death v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\n@Bosses head\n\nwhen I receive [boss fight 1 v]\nset [brightness v] effect to (0)\ngo to x: (0) y: (80)\nset [boss 1 pv v] to [30]\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nrepeat until <(Boss 1 pv) < [1]>\n    if <touching (bow v)?> then\n        change [boss 1 pv v] by (-1)\n        repeat (1)\n            set [brightness v] effect to (20)\n            broadcast (Boss damage v)\n            set [ghost v] effect to (20)\n            wait (0.3) seconds\n            set [brightness v] effect to (0)\n            set [ghost v] effect to (0)\n            wait (0.3) seconds\n        end\n    end\nend\nbroadcast (Boss 1 death v)\n\nwhen flag clicked\nhide\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [attack 3 boss 1 v]\nif <not <(Boss 1 pv) < [11]>> then\n    switch costume to (normal v)\n    wait (0.05) seconds\n    repeat (3)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (0.5) seconds\n    switch costume to (mentos 4 v)\n    broadcast (Shaking effect v)\n    wait (0.2) seconds\n    switch costume to (mentos 3 v)\n    wait (0.5) seconds\n    switch costume to (mentos 2 v)\n    wait (0.1) seconds\n    switch costume to (mentos 1 v)\n    wait (0.1) seconds\n    switch costume to (normal v)\nelse\n    if <(Boss 1 pv) < [11]> then\n        switch costume to (normal2 v)\n        wait (0.05) seconds\n        repeat (3)\n            wait (0.05) seconds\n            next costume\n        end\n        wait (0.5) seconds\n        switch costume to (mentos 5 v)\n        broadcast (Shaking effect v)\n        wait (0.2) seconds\n        switch costume to (mentos 13 v)\n        wait (0.5) seconds\n        switch costume to (mentos 12 v)\n        wait (0.1) seconds\n        switch costume to (mentos 11 v)\n        wait (0.1) seconds\n        switch costume to (normal2 v)\n    end\nend\n\nwhen I receive [boss 1 death v]\nshow\nset [brightness v] effect to (0)\nswitch costume to (end v)\nwait (2) seconds\nrepeat (24)\n    change x by (5)\n    change y by (-5)\n    wait (0.05) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.05) seconds\nend\nrepeat (50)\n    change [brightness v] effect by (2)\nend\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [boss fight 1 v]\nset [brightness v] effect to (0)\nswitch costume to (normal v)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (1) seconds\nAttack aléatoire [7] [2]\nwait (pick random (0.25) to (1)) seconds\nrepeat until <(Boss 1 pv) < [11]>\n    Attack aléatoire (pick random (1) to (15)) (pick random (1) to (4))\nend\nswitch costume to (normal2 v)\nrepeat until <(Boss 1 pv) < [1]>\n    Attack aléatoire (pick random (1) to (12)) (pick random (1) to (4))\nend\n\nAttack aléatoire [7] [1]\n\ndefine Attack aléatoire (nombre d'attack) (choix de l'attaque)\nif <(nombre d'attack) > [3]> then\n    if <(choix de l'attaque) = [1]> then\n        broadcast (Attack boss 1 v)\n        wait (8) seconds\n    else\n        if <(choix de l'attaque) = [2]> then\n            broadcast (Attack2 boss 1 v)\n            wait (4) seconds\n        else\n            if <(choix de l'attaque) = [3]> then\n                broadcast (Attack2 boss 1 v)\n                wait (4) seconds\n            else\n                if <(choix de l'attaque) = [4]> then\n                    broadcast (Attack 3 boss 1 v)\n                    wait (8) seconds\n                end\n            end\n        end\n    end\nelse\n    if <<(nombre d'attack) = [2]> or <(nombre d'attack) = [3]>> then\n        if <(choix de l'attaque) = [1]> then\n            broadcast (Attack boss 1 v)\n            broadcast (Attack2 boss 1 v)\n            wait (6) seconds\n        else\n            if <(choix de l'attaque) = [2]> then\n                broadcast (Attack boss 1 v)\n                wait (6) seconds\n            else\n                if <(choix de l'attaque) = [3]> then\n                    broadcast (Attack 3 boss 1 v)\n                    broadcast (Attack boss 1 v)\n                    wait (8) seconds\n                else\n                    if <(choix de l'attaque) = [4]> then\n                        broadcast (Attack 3 boss 1 v)\n                        broadcast (Attack2 boss 1 v)\n                        wait (8) seconds\n                    end\n                end\n            end\n        end\n    else\n        if <(nombre d'attack) = [1]> then\n            broadcast (Attack 3 boss 1 v)\n            broadcast (Attack boss 1 v)\n            broadcast (Attack2 boss 1 v)\n            wait (9) seconds\n        end\n    end\nend\nwait (pick random (1) to (2)) seconds\n\nif <(choix de l'attaque) = [4]> then\n    broadcast (Attack boss 1 v)\n    wait (7) seconds\nend\n\nif <(choix de l'attaque) = [4]> then\n    broadcast (Attack boss 1 v)\n    broadcast (Attack2 boss 1 v)\nend\n\nset [world v] to [2]\n\n@Bosses right fist\n\nwhen I receive [attack boss 1 v]\npoint in direction (90)\nrepeat until <(direction) = [180]>\n    turn right (9) degrees\nend\nglide (0.15) secs to x: (105) y: (-85)\nbroadcast (Shaking effect v)\nwait (1) seconds\nglide (0.5) secs to x: (105) y: (50)\nrepeat until <(direction) = [90]>\n    turn right (-9) degrees\nend\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nbroadcast (Attack boss 1 v)\n\nshow\n\nwhen I receive [boss fight 1 v]\ngo to x: (105) y: (50)\npoint in direction (90)\nset [boss 1 pv v] to [30]\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [boss 1 death v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nset [boss 1 pv v] to [3]\n\n@Bosses  1 attack\n\nwhen I receive [attack boss 1 v]\nwait (1) seconds\nrepeat (pick random (10) to (15))\n    create clone of (_myself_ v)\n    wait (pick random (0.2) to (0.4)) seconds\nend\n\nwhen I start as a clone\nset size to (60) %\nshow\ngo to x: (pick random (220) to (-220)) y: (195)\nswitch costume to (pick random (1) to (4))\nrepeat (10)\n    change y by (-6)\nend\nrepeat until <<touching (player's hit box v)?> or <touching (_edge_ v)?>>\n    change y by (-6)\nend\nwait (0.1) seconds\ndelete this clone\n\nwhen flag clicked\nhide\n\nbroadcast (Attack2 boss 1 v)\n\ngo to (enemies w2 v)\n\n@mantos\n\nwhen I receive [attack 3 boss 1 v]\nwait (3) seconds\nset [ghost v] effect to (0)\nshow\nswitch costume to (costume1 v)\nset size to (60) %\nshow\nRandomiser for mantos (pick random (1) to (2))\nset [attack 3 boss 1a v] to [1]\nrepeat until <touching (platform v)?>\n    turn right (5) degrees\n    change y by ((Attack 3 Boss 1A) * (-1))\n    change [attack 3 boss 1a v] by (0.5)\nend\nrepeat (1)\n    turn right (5) degrees\n    change y by ((Attack 3 Boss 1A) * (-1))\n    change [attack 3 boss 1a v] by (0.5)\nend\ncreate clone of (_myself_ v)\npoint in direction (90)\nset [attack 3 boss 1a v] to [10]\nset size to (100) %\nset y to (-170)\nswitch costume to (costume2 v)\nrepeat until <(y position) < [-170]>\n    change y by (Attack 3 Boss 1A)\n    change [attack 3 boss 1a v] by (-0.5)\nend\nhide\n\nwhen I start as a clone\nset [ghost v] effect to (0)\ngo to x: (x position) y: (-145)\npoint in direction (90)\nset size to (100) %\nswitch costume to (costume4 v)\nshow\ngo to [front v] layer\n\nbroadcast (Attack 3 boss 1 v)\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [attack 3 boss 1 v]\nrepeat (40)\n    change [ghost v] effect by (2.5)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\ndefine Randomiser for mantos (number or text)\nif <(number or text) = [1]> then\n    go to x: (pick random (-235) to (235)) y: (190)\nend\nif <(number or text) = [2]> then\n    go to x: ([x position v] of [player's hit box v]) y: (190)\nend\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [main menu v]\nhide\n\nset [level v] to [14]\n\n@Health Bar for bosses\n\nwhen I receive [boss fight 1 v]\nswitch costume to (30/30 v)\ngo to x: (0) y: (160)\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\nwhen I receive [boss damage v]\nif <(World) = [1]> then\n    switch costume to ((Boss 1 pv) + (1))\nelse\n    if <(World) = [2]> then\n        switch costume to ((Boss 2 Pv) + (1))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [boss 1 death v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [boss fight 1 v]\npoint in direction (90)\nswitch costume to (30/30 v)\ngo to x: (0) y: (160)\nset [boss 1 pv v] to [30]\nshow\n\ngo to x: (-105) y: (50)\n\nwhen I receive [===boss fight 2 v]\nswitch costume to (30/30 v)\ngo to x: (0) y: (160)\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\n\nwhen I receive [===boss fight 2 v]\npoint in direction (90)\nswitch costume to (30/30 v)\ngo to x: (0) y: (160)\nset [boss 2 pv v] to [30]\nshow\n\nwhen I receive [boss 2 death v]\nhide\n\n@End Boss\n\nbroadcast (next level v)\n\nwhen flag clicked\nhide\nset size to (100) %\ngo to x: (200) y: (-40)\n\nwhen I receive [start2 v]\nwait (0.5) seconds\nhide\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\nwhen I receive [boss fight 1 v]\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\n\nwhen I receive [boss 1 death v]\nwait (6) seconds\nshow\nwait until <touching (player's hit box v)?>\nbroadcast (Boss animation v)\nhide\n\nwhen I receive [next level v]\nwait (0.5) seconds\nhide\n\nwhen I receive [===boss fight 2 v]\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\nwait (1) seconds\nhide\n\nwhen I receive [boss 2 death v]\nwait (6) seconds\nshow\nwait until <touching (player's hit box v)?>\nbroadcast (Boss animation2 v)\nhide\n\n@Animation boss\n\nset [game mod v] to [1]\n\nbroadcast (next level v)\nset [level v] to [14]\n\nset [level v] to [1]\n\nwhen I receive [boss animation v]\nshow\nset [ghost v] effect to (100)\nswitch costume to (world 2 animation 1 v)\nrepeat (16)\n    change [ghost v] effect by (-6.25)\nend\nswitch costume to (world 2 animation 1 v)\nwait (2) seconds\nrepeat (10)\n    wait (0.1) seconds\n    switch costume to (world 2 animation 2 v)\n    wait (0.1) seconds\n    switch costume to (world 2 animation 3 v)\nend\nswitch costume to (world 2 animation 4 v)\nwait (0.5) seconds\nswitch costume to (world 2 animation 5 v)\nwait (1.5) seconds\nrepeat (5)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 6 v)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 7 v)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 8 v)\nend\nswitch costume to (skin animation 1 v)\nwait (1.5) seconds\nswitch costume to (skin animation 1 v)\nrepeat (10)\n    wait (0.1) seconds\n    switch costume to (skin animation 2 v)\n    wait (0.1) seconds\n    switch costume to (skin animation 3 v)\nend\nswitch costume to (skin animation 4 v)\nwait (0.5) seconds\nrepeat (5)\n    wait (0.5) seconds\n    switch costume to (skin animation 5 v)\n    wait (0.5) seconds\n    switch costume to (skin animation 6 v)\n    wait (0.5) seconds\n    switch costume to (skin animation 7 v)\nend\nset [ghost v] effect to (0)\nset [@@@@world 2 unlocked v] to [1]\nset [level w1 v] to [1]\nset [game mod v] to [1]\nset [world v] to [2]\nset [level v] to (level W2)\nbroadcast (spooky skin unlock v)\nbroadcast (main menu v)\nrepeat (16)\n    change [ghost v] effect by (6.25)\nend\nhide\nset [ghost v] effect to (0)\nstop [other scripts in sprite v]\n\nwhen I receive [boss animation v]\nrepeat (10000)\n    go to [front v] layer\nend\n\ndefine Ghost effect (speed)\n\nwhen flag clicked\nhide\n\nwhen I receive [boss animation2 v]\nshow\nset [ghost v] effect to (100)\nswitch costume to (boss - 4 v)\nrepeat (16)\n    change [ghost v] effect by (-6.25)\nend\nswitch costume to (boss - 4 v)\nwait (4) seconds\nswitch costume to (boss - 3 v)\n\nrepeat (10)\n    wait (0.1) seconds\nend\nswitch costume to (world 2 animation 4 v)\nwait (0.5) seconds\nswitch costume to (world 2 animation 5 v)\nwait (1.5) seconds\nrepeat (5)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 6 v)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 7 v)\n    wait (0.5) seconds\n    switch costume to (world 2 animation 8 v)\nend\nswitch costume to (skin animation 1 v)\nwait (1.5) seconds\nswitch costume to (skin animation 1 v)\nrepeat (10)\n    wait (0.1) seconds\n    switch costume to (skin animation 2 v)\n    wait (0.1) seconds\n    switch costume to (skin animation 3 v)\nend\nswitch costume to (skin animation 4 v)\nwait (0.5) seconds\nrepeat (5)\n    wait (0.5) seconds\n    switch costume to (skin animation 5 v)\n    wait (0.5) seconds\n    switch costume to (skin animation 6 v)\n    wait (0.5) seconds\n    switch costume to (skin animation 7 v)\nend\nset [ghost v] effect to (0)\nset [@@@@world 2 unlocked v] to [1]\nset [game mod v] to [1]\nset [world v] to [2]\nbroadcast (spooky skin unlock v)\nbroadcast (main menu v)\nrepeat (16)\n    change [ghost v] effect by (6.25)\nend\nhide\nset [ghost v] effect to (0)\nstop [other scripts in sprite v]\n\nwhen I receive [main menu v]\nhide\n\n@Enemies W2\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (2) seconds\nstop [other scripts in sprite v]\nif <(World) = [2]> then\n    if <(Level) = [2]> then\n        set [w2 enemies variable v] to [2]\n        create clone of (_myself_ v)\n        Fantôme position initiale [-73] [-110] position finale [-73] [160] Taille: [30] Level: [2] Speed [3]\n    else\n        if <(Level) = [3]> then\n            set [w2 enemies variable v] to [2]\n            create clone of (_myself_ v)\n            set [w2 enemies variable v] to [3]\n            create clone of (_myself_ v)\n            Fantôme position initiale [0] [75] position finale [0] [-110] Taille: [30] Level: [3] Speed [1.75]\n        else\n            if <(Level) = [4]> then\n                set [w2 enemies variable v] to [2]\n                create clone of (_myself_ v)\n                Fantôme position initiale [-215] [85] position finale [87] [85] Taille: [20] Level: [4] Speed [2]\n            else\n                if <(Level) = [5]> then\n                    Canon a citrouille [155] [43] level [5] speed [4] taille [30]\n                else\n                    if <(Level) = [6]> then\n                        Canon a citrouille [195] [-73] level [6] speed [2] taille [30]\n                    else\n                        if <(Level) = [7]> then\n                            Chauderon position: [0] [100] speed [2] level [7]\n                        else\n                            if <(Level) = [8]> then\n                                Canon a citrouille [207] [-70] level [8] speed [0.5] taille [35]\n                            else\n                                if <(Level) = [9]> then\n                                    Chauderon position: [0] [125] speed [2] level [9]\n                                else\n                                    if <(Level) = [10]> then\n                                        Canon a citrouille [187] [-26] level [10] speed [5.5] taille [60]\n                                    else\n                                        if <(Level) = [11]> then\n                                            Canon a citrouille [207] [43] level [11] speed [1.85] taille [35]\n                                        else\n                                            if <(Level) = [12]> then\n                                                Fantôme position initiale [143] [30] position finale [-135] [30] Taille: [50] Level: [12] Speed [1.6]\n                                            else\n                                                if <(Level) = [13]> then\n                                                    set [w2 enemies variable v] to [2]\n                                                    create clone of (_myself_ v)\n                                                    Canon a citrouille [187] [-26] level [13] speed [5.5] taille [60]\n                                                else\n                                                    if <(Level) = [14]> then\n                                                        Canon a citrouille [210] [-75] level [14] speed [2.1] taille [25]\n                                                    else\n                                                        hide\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [main menu v]\nhide\n\nwhen I receive [skins v]\nhide\n\ndefine Canon a citrouille (x) (y) level (level) speed (speed) taille (taille)\nswitch costume to (canon v)\npoint in direction (90)\nset size to (taille) %\nshow\ngo [forward v] (10) layers\ngo to x: (x) y: (y)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    change x by (3)\n    set [w2 enemies variableyyy v] to (taille)\n    set [w2 enemies variable v] to [0]\n    create clone of (_myself_ v)\n    wait (0.0000001) seconds\n    change x by (-3)\n    wait (speed) seconds\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nif <<(Level) = [15]> and <(World) = [2]>> then\n    show\n    set size to (pick random (90) to (110)) %\n    go to x: (0) y: (160)\n    Random (pick random (1) to (4))\n    point in direction (pick random (50) to (130))\n    set [w2 enemiianfaijn v] to (pick random (-8) to (8.0001))\n    set [w2 enemies variable v] to (pick random (1) to (4.000005))\n    broadcast (W2 enemies 2 v)\n    if <(W2 enemiianfaijn) > [0]> then\n        repeat until <<<touching (_edge_ v)?> and <(y position) < [-155]>> or <touching (player's hit box v)?>>\n            change y by (W2 Enemies variable)\n            change [w2 enemies variable v] by (-0.3)\n            if <not <[0] > (W2 enemiianfaijn)>> then\n                change x by (W2 enemiianfaijn)\n                change [w2 enemiianfaijn v] by (-0.075)\n            end\n        end\n        delete this clone\n    else\n        repeat until <<<touching (_edge_ v)?> and <(y position) < [-155]>> or <touching (player's hit box v)?>>\n            change y by (W2 Enemies variable)\n            change [w2 enemies variable v] by (-0.3)\n            if <not <(W2 enemiianfaijn) > [0]>> then\n                change x by (W2 enemiianfaijn)\n                change [w2 enemiianfaijn v] by (0.075)\n            end\n        end\n        delete this clone\n    end\nelse\n    if <(W2 Enemies variable) = [0]> then\n        show\n        switch costume to (citrouille v)\n        set size to (W2 Enemies variableyyy) %\n        set [w2 enemies variable v] to [0]\n        set [w2 enemi citrouille direction v] to [-1]\n        go to x: (0) y: (0)\n        point in direction (90)\n        go to (enemies w2 v)\n        change x by (-30)\n        repeat until <<<<<(x position) < [-180]> and <touching (_edge_ v)?>> or <<[180] < (x position)> and <touching (_edge_ v)?>>> or <<(y position) < [-180]> and <touching (_edge_ v)?>>> or <touching (player's hit box v)?>>\n            change x by ((W2 Enemi citrouille direction) * (2))\n            if <touching (platform v)?> then\n                change x by (1)\n                change y by (1)\n                if <touching (platform v)?> then\n                    change x by (-1)\n                    change y by (-1)\n                    set [w2 enemi citrouille direction v] to ((W2 Enemi citrouille direction) * (-1))\n                end\n            end\n            turn right ((W2 Enemi citrouille direction) * (3)) degrees\n            change y by (W2 Enemies variable)\n            if <touching (platform v)?> then\n                change y by (((W2 Enemies variable) * (-1)) + (1))\n                set [w2 enemies variable v] to [0]\n                if <not <touching (platform v)?>> then\n                    change y by (-1)\n                end\n            else\n                change [w2 enemies variable v] by (-0.6)\n            end\n        end\n        wait (0.1) seconds\n        change y by (((W2 Enemies variable) * (-1)) + (1))\n        change y by (((W2 Enemies variable) * (-1)) + (1))\n        delete this clone\n    else\n        if <(W2 Enemies variable) = [1]> then\n            set size to (pick random (90) to (110)) %\n            go to (enemies w2 v)\n            Random (pick random (1) to (4))\n            point in direction (pick random (50) to (130))\n            set [w2 enemiianfaijn v] to (pick random (-4) to (4.0001))\n            set [w2 enemies variable v] to (pick random (1) to (4.000005))\n            broadcast (W2 enemies 2 v)\n            if <(W2 enemiianfaijn) > [0]> then\n                repeat until <<<touching (_edge_ v)?> and <(y position) < [-155]>> or <touching (player's hit box v)?>>\n                    change y by (W2 Enemies variable)\n                    change [w2 enemies variable v] by (-0.3)\n                    if <not <[0] > (W2 enemiianfaijn)>> then\n                        change x by (W2 enemiianfaijn)\n                        change [w2 enemiianfaijn v] by (-0.075)\n                    end\n                end\n                delete this clone\n            else\n                repeat until <<<touching (_edge_ v)?> and <(y position) < [-155]>> or <touching (player's hit box v)?>>\n                    change y by (W2 Enemies variable)\n                    change [w2 enemies variable v] by (-0.3)\n                    if <not <(W2 enemiianfaijn) > [0]>> then\n                        change x by (W2 enemiianfaijn)\n                        change [w2 enemiianfaijn v] by (0.075)\n                    end\n                end\n                delete this clone\n            end\n        else\n            if <(W2 Enemies variable) = [2]> then\n                if <(Level) = [2]> then\n                    Fantôme position initiale [73] [160] position finale [73] [-110] Taille: [30] Level: [2] Speed [3]\n                else\n                    if <(Level) = [3]> then\n                        Fantôme position initiale [-100] [-110] position finale [-100] [75] Taille: [30] Level: [3] Speed [1.75]\n                    else\n                        if <(Level) = [4]> then\n                            Fantôme position initiale [200] [-40] position finale [-145] [-40] Taille: [20] Level: [4] Speed [2]\n                        else\n                            if <(Level) = [14]> then\n                                Fantôme position initiale [82] [138] position finale [-217] [138] Taille: [20] Level: [14] Speed [3]\n                                wait (0.1) seconds\n                                delete this clone\n                            end\n                        end\n                    end\n                end\n            else\n                if <(W2 Enemies variable) = [3]> then\n                    if <(Level) = [3]> then\n                        Fantôme position initiale [100] [-110] position finale [100] [75] Taille: [30] Level: [3] Speed [1.75]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Fantôme position initiale (x) (y) position finale (x) (y) Taille: (taille) Level: (level) Speed (speed)\nshow\ngo [forward v] (11) layers\nset size to (taille) %\npoint in direction (90)\nswitch costume to (fantôme v)\nbroadcast (W2 enemies v)\ngo to x: (x) y: (y)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    glide (speed) secs to x: (x) y: (y)\n    glide (speed) secs to x: (x) y: (y)\nend\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [w2 enemies v]\npoint in direction (90)\nrepeat (10)\n    turn right (1) degrees\nend\nforever\n    repeat (20)\n        turn right (-1) degrees\n        change size by (0.25)\n    end\n    repeat (20)\n        turn right (1) degrees\n        change size by (-0.25)\n    end\nend\n\ndefine Random (random)\nif <(random) = [1]> then\n    switch costume to (lolipop v)\nelse\n    if <<(random) = [2]> or <(random) = [3]>> then\n        switch costume to (m et ms v)\n    else\n        if <(random) = [4]> then\n            switch costume to (bonbon 1 v)\n        end\n    end\nend\n\ndefine Chauderon position: (x) (y) speed (speed) level (level)\nshow\ngo [forward v] (12) layers\nset size to (40) %\npoint in direction (90)\ngo to x: (x) y: (y)\nswitch costume to (chaudron v)\nrepeat until <<not <(Level) = (level)>> or <not <(Game mod) = [2]>>>\n    repeat (pick random (1) to (3))\n        set [w2 enemies variable v] to [1]\n        create clone of (_myself_ v)\n        wait (pick random (0.01) to (-0.01)) seconds\n    end\n    wait ((speed) + (pick random (-0.5) to (0.5))) seconds\nend\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nset [world v] to [2]\n\nset [world v] to [2]\n\nCanon a citrouille [100] [0] level [10] speed [3] taille [100]\n\nset [======= normal skin v] to [0]\n\nif <(Level) = [3]> then\n\nChauderon position: [0] [0] speed [1] level [7]\n\nChauderon position: [0] [100] speed [1] level [10]\n\nCanon a citrouille [200] [42] level [10] speed [0] taille [100]\n\n\n\nset [level v] to [14]\n\nChauderon position: [0] [75] speed [3] level [15]\n\nset [level v] to [14]\n\nhide\n\nset [world v] to [2]\n\nset [world v] to [2]\n\nset [level v] to [12]\n\nwhen I receive [next level v]\nwait (1) seconds\nif <(World) = [2]> then\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\ndelete this clone\n\n@Fake end\n\nwhen I receive [next level v]\nwait (0.5) seconds\nif <(World) = [2]> then\n    if <(Level) = [1]> then\n        go to x: (205) y: (70)\n        show\n        set [ghost v] effect to (0)\n        wait until <touching (player's hit box v)?>\n        broadcast (___Fake candy v)\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        hide\n    else\n        if <(Level) = [3]> then\n            go to x: (205) y: (-55)\n            show\n            set [ghost v] effect to (0)\n            wait until <touching (player's hit box v)?>\n            broadcast (___Fake candy v)\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n        else\n            if <(Level) = [7]> then\n                go to x: (205) y: (-55)\n                show\n                set [ghost v] effect to (0)\n                wait until <touching (player's hit box v)?>\n                broadcast (___Fake candy v)\n                repeat (25)\n                    change [ghost v] effect by (4)\n                end\n                hide\n            else\n                if <(Level) = [2]> then\n            end\n        end\n    end\nend\n\nwhen I receive [start2 v]\nwait (0.5) seconds\nif <(World) = [2]> then\nend\n\ngo to x: (205) y: (-55)\nshow\nset [ghost v] effect to (0)\nwait until <touching (player's hit box v)?>\nbroadcast (___Fake candy v)\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide\n\nwhen flag clicked\nhide\n\nset [world v] to [2]\nbroadcast (next level v)\n\nhide\n\nif <(Level) = [2]> then\n\n@Bosses head2\n\nwhen I receive [===boss fight 2 v]\nset [brightness v] effect to (0)\ngo to x: (0) y: (100)\nset [boss 2 pv v] to [30]\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (3) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nrepeat until <(Boss 2 Pv) < [1]>\n    if <touching (bow v)?> then\n        change [boss 2 pv v] by (-1)\n        repeat (1)\n            set [brightness v] effect to (20)\n            broadcast (Boss damage v)\n            set [ghost v] effect to (20)\n            wait (0.3) seconds\n            set [brightness v] effect to (0)\n            set [ghost v] effect to (0)\n            wait (0.3) seconds\n        end\n    end\nend\nbroadcast (Boss 2 death v)\nswitch costume to (dead v)\n\nwhen flag clicked\nset size to (62) %\nhide\n\nwhen I receive [shaking effect v]\nrepeat (3)\n    change x by (5)\n    change y by (-5)\n    wait (0.1) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.1) seconds\nend\n\nwhen I receive [boss 2 death v]\nshow\nset [brightness v] effect to (0)\nswitch costume to (end v)\nwait (2) seconds\nrepeat (24)\n    change x by (5)\n    change y by (-5)\n    wait (0.05) seconds\n    change x by (-5)\n    change y by (5)\n    wait (0.05) seconds\nend\nrepeat (50)\n    change [brightness v] effect by (2)\nend\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [===boss fight 2 v]\nset [brightness v] effect to (0)\nswitch costume to (1-3 v)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (3) seconds\nAttack aléatoire [7] [2]\nrepeat until <(Boss 2 Pv) < [11]>\n    Attack aléatoire (pick random (1) to (12)) (pick random (1) to (4))\nend\nswitch costume to (normal2 v)\nrepeat until <(Boss 2 Pv) < [1]>\n    Attack aléatoire (pick random (1) to (10)) (pick random (1) to (4))\nend\n\nwait (pick random (0.25) to (1)) seconds\n\nAttack aléatoire [7] [1]\n\ndefine Attack aléatoire (nombre d'attack) (choix de l'attaque)\nif <(nombre d'attack) > [3]> then\n    if <(choix de l'attaque) = [1]> then\n        broadcast (BOSS 2 attack 1 v)\n        wait (6) seconds\n    else\n        if <(choix de l'attaque) = [2]> then\n            broadcast (BOSS2 Attack 2 v)\n            wait (4) seconds\n        else\n            if <(choix de l'attaque) = [3]> then\n                broadcast (BOSS2 Attack 2 v)\n                wait (4) seconds\n            else\n                if <(choix de l'attaque) = [4]> then\n                    broadcast (BOSS2 Attack3 v)\n                    wait (6) seconds\n                end\n            end\n        end\n    end\nelse\n    if <<(nombre d'attack) = [2]> or <(nombre d'attack) = [3]>> then\n        if <(choix de l'attaque) = [1]> then\n            broadcast (BOSS 2 attack 1 v)\n            broadcast (BOSS 2 attack 1 v)\n            wait (6) seconds\n        else\n            if <(choix de l'attaque) = [2]> then\n                broadcast (BOSS 2 attack 1 v)\n                wait (6) seconds\n            else\n                if <(choix de l'attaque) = [3]> then\n                    broadcast (BOSS2 Attack 2 v)\n                    broadcast (BOSS 2 attack 1 v)\n                    wait (8) seconds\n                else\n                    if <(choix de l'attaque) = [4]> then\n                        broadcast (BOSS2 Attack3 v)\n                        broadcast (BOSS2 Attack 2 v)\n                        wait (8) seconds\n                    end\n                end\n            end\n        end\n    else\n        if <(nombre d'attack) = [1]> then\n            broadcast (BOSS2 Attack3 v)\n            broadcast (BOSS2 Attack 2 v)\n            broadcast (BOSS 2 attack 1 v)\n            wait (9) seconds\n        end\n    end\nend\nwait (pick random (0.5) to (1)) seconds\n\nset [world v] to [2]\n\ngo to [front v] layer\n\nrepeat (10)\n\nforever\n\nwhen I receive [boss2 attack 2 v]\nrepeat (pick random (5) to (10))\n    create clone of (enemies w2 v)\n    wait (pick random (0.01) to (0.025)) seconds\nend\n\nwhen I receive [boss2 attack3 v]\nBoss 2 Attack 3 (pick random (1) to (2))\n\ndefine Boss 2 Attack 3 (random)\nif <(random) = [1]> then\n    glide (1.75) secs to x: (-190) y: (100)\nelse\n    if <(random) = [2]> then\n        glide (1.75) secs to x: (190) y: (100)\n    end\nend\nrepeat until <([costume # v] of [boss 2 attack 3 v]) = [2]>\n    go to (boss 2 attack 3 v)\nend\nglide (1.75) secs to x: (0) y: (100)\n\nwhen I receive [boss 2 attack 1 v]\nrepeat (20)\n    if <(Boss 2 Pv) < [11]> then\n        switch costume to (colere2 v)\n    else\n        switch costume to (colere 1 v)\n    end\nend\n\nwhen I receive [boss 2 attack 1 v]\nif <(Boss 2 Pv) < [11]> then\n    repeat (20)\n        switch costume to (colere2 v)\n    end\nelse\n    repeat (20)\n        switch costume to (colere 1 v)\n    end\nend\n\nset [boss 2 pv v] to [30]\n\nbroadcast (===Boss Fight 2 v)\n\nforever\n    switch costume to (2-1 v)\n    wait (0.09) seconds\n    switch costume to (2-2 v)\n    wait (0.09) seconds\n    switch costume to (2-3 v)\n    wait (0.09) seconds\nend\n\nwhen I receive [===boss fight 2 v]\nset [brightness v] effect to (0)\ngo to x: (0) y: (100)\nset [boss 2 pv v] to [30]\nshow\nset [ghost v] effect to (100)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (3) seconds\nrepeat until <(Boss 2 Pv) < [1]>\n    if <touching (bow v)?> then\nend\nbroadcast (Boss 2 death v)\n\nwhen I receive [===boss fight 2 v]\nset [brightness v] effect to (0)\nswitch costume to (1-3 v)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nwait (3) seconds\nAttack aléatoire [7] [2]\nrepeat until <(Boss 2 Pv) < [11]>\n    switch costume to (1-1 v)\n    wait (0.09) seconds\n    switch costume to (1-2 v)\n    wait (0.09) seconds\n    switch costume to (1-3 v)\n    wait (0.09) seconds\nend\nswitch costume to (normal2 v)\nrepeat until <(Boss 2 Pv) < [1]>\n    switch costume to (2-1 v)\n    wait (0.09) seconds\n    switch costume to (2-2 v)\n    wait (0.09) seconds\n    switch costume to (2-3 v)\n    wait (0.09) seconds\nend\n\n@Boss 2 Attack 1\n\nwhen I receive [boss 2 attack 1 v]\nset [boss 2 attack 1 v] to [0]\ncreate clone of (_myself_ v)\nwait (0) seconds\nset [boss 2 attack 1 v] to [1]\ncreate clone of (_myself_ v)\nwait (0) seconds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nset size to (50) %\nif <(Boss 2 attack 1) = [0]> then\n    go to x: (247) y: (-76)\n    repeat (10)\n        change x by (-4)\n    end\n    repeat until <touching (_edge_ v)?>\n        change x by (-4)\n    end\n    repeat (10)\n        change x by (-4)\n    end\nelse\n    if <(Boss 2 attack 1) = [1]> then\n        go to x: (-247) y: (-16)\n        repeat (10)\n            change x by (4)\n        end\n        repeat until <touching (_edge_ v)?>\n            change x by (4)\n        end\n        repeat (10)\n            change x by (4)\n        end\n    end\nend\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nset size to (50) %\nrepeat (3)\n    point in direction (90)\n    repeat (10)\n        turn right (1) degrees\n    end\n    forever\n        repeat (20)\n            turn right (-1) degrees\n            change size by (0.25)\n        end\n        repeat (20)\n            turn right (1) degrees\n            change size by (-0.25)\n        end\n    end\nend\nrepeat until <touching (_edge_ v)?>\n    point in direction (90)\n    repeat (10)\n        turn right (1) degrees\n    end\n    forever\n        repeat (20)\n            turn right (-1) degrees\n            change size by (0.25)\n        end\n        repeat (20)\n            turn right (1) degrees\n            change size by (-0.25)\n        end\n    end\nend\nrepeat (3)\n    point in direction (90)\n    repeat (10)\n        turn right (1) degrees\n    end\n    forever\n        repeat (20)\n            turn right (-1) degrees\n            change size by (0.25)\n        end\n        repeat (20)\n            turn right (1) degrees\n            change size by (-0.25)\n        end\n    end\nend\ndelete this clone\n\nrepeat (10)\n\n@Boss 2 Attack 3\n\nwhen I receive [boss2 attack3 v]\nshow\nset [ghost v] effect to (99.99999999)\nswitch costume to (costume1 v)\nwait (1.71) seconds\ngo to (bosses head2 v)\nswitch costume to (costume1 v)\nif <(x position) > [0]> then\n    point in direction (180)\n    repeat (5)\n        move (6) steps\n    end\n    repeat (90)\n        move (6) steps\n        turn right (2) degrees\n    end\n    repeat (5)\n        move (6) steps\n    end\nelse\n    if <[0] > (x position)> then\n        point in direction (180)\n        repeat (5)\n            move (6) steps\n        end\n        repeat (90)\n            move (6) steps\n            turn left (2) degrees\n        end\n        repeat (5)\n            move (6) steps\n        end\n    end\nend\nswitch costume to (costume2 v)\nhide\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (28)\n\nwhen I receive [liquide rouge v]\nshow\nset [ghost v] effect to ((100) - (Liquide rouge pv))\n\n