Platformer(プラットフォーマー)

Instructions: ㅤㅤ★★★★★ The Ninja Squad ★★★★★\nㅤㅤㅤㅤㅤㅤㅤby @JC_ProGold\n\n=========================================\nGLITCH WITH NO MONSTERS IS FIXED!!!!!\n=========================================\n\nIncludes 1.5K blocks of code :) and took about 1 month to make.\n\nSkip the intro with the space bar or click on the mouse.\n\nThree ninjas are on a quest up to head up a mountain. Along the way, there are enemies, spikes and a sword. Each of the three ninjas have their own power and resistance.\n\nAbilities:\nRed: Can jump high and is resistant to lava\nGreen: Can move fast and is resistant to long grass\nBlue: Can shrink and is resistant to water\n\nControls:\n➜Reset Level - Press 'r'\n➜Skip Level if it is allowed - Press 's'\n\n➜Move and jump - Arrow keys, WASD or use the mouse pointer\n➜Switch ninja - Click the 'switch button' or press 'z'\n\n# These abilities are not always on, you have to turn them on\n➜Turn on or off special ability - Space bar or click the icon on the bottom left \n\n# Only possible if you have collected the sword\n➜Use sword - Press 't' or click the 'attack button' 

@Stage\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    play sound [Popsicle v] until done\nend\n\nwhen flag clicked\nforever\n    if <(Level) > [8]> then\n        switch backdrop to (backdrop2 v)\n    else\n        switch backdrop to (backdrop1 v)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nwait (0.001) seconds\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [retry v]\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\ngo to x: (0) y: (0)\n\n@Player\n\ndefine Reset\nbroadcast (Reset v)\npoint in direction (90)\nset size to (20) %\nset rotation style [left-right v]\nif <(Level) = [9]> then\n    go to x: (-200) y: (-100)\nelse\n    go to x: (-200) y: (0)\nend\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\n\nwhen I receive [green flag clicked v]\nReset\nbroadcast (Retry v)\nset [level v] to [1]\nset [vibration v] to [6]\nforever\n    if <(Can move?) = [1]> then\n        Platforming Engine\n        if <<touching (moving spikes v)?> or <<touching (spikes v)?> or <touching (right/left v)?>>> then\n            set [death v] to [1]\n            broadcast (Shake v)\n            switch costume to (die  v)\n            start sound [whoop v]\n            Go down\n            repeat (11)\n                next costume\n            end\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            broadcast (Retry v)\n            set [ghost v] effect to (0)\n            go to x: (-200) y: (0)\n            Reset\n        end\n    end\nend\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> and <([abs v] of (speed) ) > [3]>> then\n        start sound [Jump v]\n        if <(wall jump) = [0]> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [max bounce v] to [11]\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-7))\nelse\n    change [frame v] by ((speed) / (7))\nend\n\nwhen I receive [retry v]\nReset\n\nwhen I receive [next level v]\nReset\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to ([floor v] of ((13) + ((Idle Frame) mod (15))) )\n        change [idle frame v] by (0.5)\n        set [frame v] to [0]\n    else\n        switch costume to ([floor v] of ((29) + ((frame) mod (15))) )\n    end\nelse\n    switch costume to ([floor v] of ((((15) / ((Max Bounce) * (2))) * ((speed y) + (Max Bounce))) + (45)) )\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen flag clicked\nhide\n\ndefine Go down\nrepeat until <<touching (_edge_ v)?> or <touching (ground v)?>>\n    change y by (-2)\nend\n\nwhen flag clicked\nset [level v] to [1]\n\ndefine Platforming Engine\nswitch costume to (hitbox v)\nif <touching (water v)?> then\n    set [max bounce v] to [0]\nend\nif <<(speed y) < [4]> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>>> then\n    if <touching (water v)?> then\n        change [speed y v] by (1)\n    else\n        change [speed y v] by (-1)\n    end\nelse\n    if <touching (water v)?> then\n        change [speed y v] by (0.5)\n    else\n        change [speed y v] by (-2)\n    end\nend\nif <<<<mouse down?> and <(mouse y) < (y position)>> or <key (down arrow v) pressed?>> and <touching (water v)?>> then\n    change [speed y v] by (-1)\nend\nchange y by (speed y)\nTouch Ground <(speed y) > [0]>\nif <(wall jump) > [0]> then\n    change [wall jump v] by (-1)\nelse\n    set [speed x v] to ((speed x) * (0.7))\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        change [speed x v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [speed x v] by (1.5)\n    end\nend\nif <(speed x) < [-0.5]> then\n    Walk (-90) (speed x)\nelse\n    if <(speed x) > [0.5]> then\n        Walk (90) (speed x)\n    else\n        set [frame v] to [0]\n    end\nend\nif <<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        start sound [Jump v]\n        set [max bounce v] to [14]\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <(y position) < [-180]> then\n    go to x: (-200) y: (0)\n    broadcast (Retry v)\n    set [speed y v] to [0]\nend\nif <touching (portal v)?> then\n    if <not <(Level) = (Max Level)>> then\n        if <(Collected) = (Collected Max)> then\n            start sound [Connect v]\n            go to x: (-200) y: (0)\n            change [level v] by (1)\n            Reset\n            broadcast (Next level v)\n        end\n    end\nend\nif <touching (bounce v)?> then\n    start sound [Jump v]\n    set [max bounce v] to [25]\n    set [speed y v] to [25]\nend\nif <<<key (w v) pressed?> or <<key (space v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> and <touching (ladder v)?>> then\n    set [speed y v] to [5]\nend\nSet Costume\n\nwhen flag clicked\nbroadcast (Green Flag clicked v)\n\ndefine Clone (#)\nrepeat (#)\n    create clone of (particles v)\nend\n\nbroadcast (Delete v)\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    if <(Level) > [8]> then\n        set [brightness v] effect to (-100)\n    else\n        clear graphic effects\n    end\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [next level v]\ngo to x: (0) y: (0)\n\nwhen I receive [retry v]\ngo to x: (0) y: (0)\n\n@Coins\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset size to (7) %\nswitch costume to (image 1 v)\nset [my level v] to (Level)\nchange [collected max v] by (1)\nrepeat until <<not <(My Level) = (Level)>> or <touching (player v)?>>\n    next costume\nend\nif <touching (player v)?> then\n    change [collected v] by (1)\n    start sound [collect v]\n    set [death v] to [0]\n    Clone [10]\nend\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\ndefine Spawn Level (level)\nset [collected max v] to [0]\nif <(level) = [1]> then\n    Clone [-27] [-59]\n    Clone [85] [-59]\n    Clone [-142] [-59]\nend\nif <(level) = [2]> then\n    Clone [-122] [95]\n    Clone [68] [32]\nend\nif <(level) = [3]> then\n    Clone [0] [-30]\nend\nif <(level) = [4]> then\n    Clone [43] [-9]\n    Clone [141] [94]\n    Clone [-141] [136]\nend\nif <(level) = [5]> then\n    Clone [-137] [-83]\n    Clone [-51] [1]\n    Clone [93] [88]\nend\nif <(level) = [6]> then\n    Clone [-26] [-73]\nend\n\nwhen I receive [next level v]\nwait (0.1) seconds\nset [collected v] to [0]\nSpawn Level (Level)\n\nwhen I receive [retry v]\nwait (0.01) seconds\nset [collected v] to [0]\nSpawn Level (Level)\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\ndefine Clone (#)\nrepeat (#)\n    create clone of (particles v)\nend\n\nwhen I receive [delete v]\ndelete this clone\n\nwhen I receive [reset v]\ndelete this clone\n\n@Portal\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nforever\n    broadcast (Tick v)\n    turn left (10) degrees\n    if <(Collected) = (Collected Max)> then\n        switch costume to (portal open v)\n    else\n        switch costume to (portal closed v)\n    end\nend\n\nwhen I start as a clone\nforever\n    turn right (10) degrees\n    if <(Collected) = (Collected Max)> then\n        switch costume to (portal open v)\n    else\n        switch costume to (portal closed v)\n    end\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I receive [tick v]\nif <(Level) = [4]> then\n    go to x: (-140) y: (69)\nend\nif <(Level) = [3]> then\n    go to x: (197) y: (-60)\nend\nif <(Level) = [2]> then\n    go to x: (197) y: (-60)\nend\nif <(Level) = [1]> then\n    go to x: (197) y: (-60)\nend\nif <(Level) = [5]> then\n    go to x: (203) y: (103)\nend\nif <(Level) = [6]> then\n    go to x: (197) y: (-60)\nend\nif <(Level) = [7]> then\n    go to x: (197) y: (160)\nend\nif <(Level) = [8]> then\n    go to x: (197) y: (0)\nend\nif <(Level) = [9]> then\n    go to x: (197) y: (60)\nend\nif <(Level) = [10]> then\n    go to x: (197) y: (130)\nend\nif <(Level) = [11]> then\n    go to x: (140) y: (100)\nend\nif <(Level) = [12]> then\n    go to x: (197) y: (100)\nend\nif <(Level) = [13]> then\n    go to x: (-110) y: (140)\nend\n\nwhen flag clicked\nforever\n    if <(Level) > [8]> then\n        set [brightness v] effect to (-100)\n    else\n        clear graphic effects\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Level) > [8]> then\n        set [brightness v] effect to (-100)\n    else\n        clear graphic effects\n    end\nend\n\n@Clouds\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (1) to (5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (40) to (80))\ngo to x: (240) y: (pick random (100) to (180))\nglide (pick random (1) to (5.0)) secs to x: (-240) y: (y position)\ndelete this clone\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I start as a clone\nif <(Level) > [8]> then\n    delete this clone\nend\n\n@Particles\n\nwhen I start as a clone\nif <(Death) = [1]> then\n    switch costume to (costume2 v)\nelse\n    switch costume to (costume1 v)\nend\nshow\ngo to (player v)\nset size to (pick random (80) to (130)) %\nset [brightness v] effect to (pick random (6) to (-6))\nset [xv v] to (pick random (-5) to (5))\nset [yv v] to (pick random (0) to (10))\nrepeat until <<touching (ground v)?> or <touching (_edge_ v)?>>\n    go to x: ((x position) + (Xv)) y: ((y position) + (Yv))\n    change [yv v] by (-1)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I receive [delete v]\ndelete this clone\n\n@Decor\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I receive [next level v]\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [retry v]\ngo to x: (0) y: (0)\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    show\nend\n\n@Moving Spikes\n\nwhen flag clicked\ngo to [front v] layer\nforever\n    glide (1) secs to x: (0) y: (0)\n    glide (1) secs to x: (0) y: (-40)\n    wait (2) seconds\nend\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\ngo to [front v] layer\n\n@Bounce\n\nwhen flag clicked\nforever\n    next costume\nend\n\n@Background1920x1080\n\nwhen flag clicked\nshow\nClone\nhide\n\ndefine Clone\n\nrepeat (8)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nset size to (200) %\nforever\n    set [brightness v] effect to (-10)\n    if <(costume [number v]) = [1]> then\n        go to [back v] layer\n        Parallax [30]\n    end\n    if <(costume [number v]) = [2]> then\n        Go to Layer [2]\n        Parallax [20]\n    end\n    if <(costume [number v]) = [3]> then\n        Go to Layer [3]\n        Parallax [18]\n    end\n    if <(costume [number v]) = [4]> then\n        Go to Layer [4]\n        Parallax [15]\n    end\n    if <(costume [number v]) = [5]> then\n        Go to Layer [5]\n        Parallax [10]\n    end\n    if <(costume [number v]) = [6]> then\n        Go to Layer [6]\n        Parallax [5]\n    end\n    if <(costume [number v]) = [7]> then\n        Go to Layer [7]\n        Parallax [3]\n    end\n    if <(costume [number v]) = [8]> then\n        Go to Layer [8]\n        Parallax [2]\n    end\nend\n\ndefine Parallax (layer)\ngo to x: (((0) - ([x position v] of [player v])) / (layer)) y: (((0) - ([y position v] of [player v])) / (layer))\n\ndefine Go to Layer (layer)\ngo to [back v] layer\ngo [forward v] (layer) layers\n\n@Beam\n\nwhen flag clicked\nwait (0.5) seconds\nforever\n    hide\n    clear graphic effects\n    create clone of (_myself_ v)\n    wait (pick random (4) to (6)) seconds\nend\n\nwhen I start as a clone\nclear graphic effects\npoint in direction (90)\ngo [forward v] (100) layers\nswitch costume to (pick random (1) to (3))\ngo to x: (240) y: (180)\nset size to (pick random (150) to (300)) %\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-1)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat until <(x position) < [-240]>\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (2)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\ndelete this clone\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I start as a clone\nif <(Level) > [8]> then\n    delete this clone\nend\n\n@Bubbles\n\nwhen flag clicked\nclear graphic effects\nhide\nwait (.2) seconds\nforever\n    create clone of (_myself_ v)\n    wait (0.15) seconds\nend\n\nwhen I start as a clone\npoint in direction (pick random (0) to (360))\ngo to (random position v)\nswitch costume to (pick random (1) to (3))\nset size to (pick random (300) to (500)) %\nset [ghost v] effect to (100)\nshow\nrepeat (17)\n    go to [front v] layer\n    change [ghost v] effect by (-1)\nend\nwait (0.1) seconds\nrepeat (7)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\ngo [backward v] (200) layers\n\n@Size swipe\n\nwhen I start as a clone\nset [color v] effect to (Color)\nset size to (0) %\nshow\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\nif <(cid) = [1]> then\n    switch costume to (costume2 v)\n    go to [front v] layer\n    repeat until <(round (size)) = [100]>\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(cid) = [2]> then\n    switch costume to (costume3 v)\n    go to [front v] layer\n    repeat until <(round (size)) = [100]>\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(cid) = [3]> then\n    switch costume to (costume4 v)\n    go to [front v] layer\n    repeat until <(round (size)) = [100]>\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(cid) = [4]> then\n    switch costume to (costume5 v)\n    go to [front v] layer\n    repeat until <(round (size)) = [100]>\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(cid) = [5]> then\n    switch costume to (costume6 v)\n    go to [front v] layer\n    repeat until <(round (size)) = [100]>\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [next level v]\nreset timer\nset [color v] to (pick random (0) to (200))\nset [ghost v] effect to (0)\nhide\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nset [cid v] to [1]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\nset [cid v] to [2]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [3]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [4]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [5]\n\nwhen flag clicked\nset [can move? v] to [1]\n\nwhen I receive [retry v]\n\nset [can move? v] to [0]\nwait (2.5) seconds\nset [can move? v] to [1]\n\nwhen I receive [next level v]\nset [can move? v] to [0]\nwait (2) seconds\nset [can move? v] to [1]\n\nwhen I receive [retry v]\n\nreset timer\nset [color v] to (pick random (0) to (200))\nset [ghost v] effect to (0)\nhide\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nset [cid v] to [1]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\nset [cid v] to [2]\nwait (0.1) seconds\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [3]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [4]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [cid v] to [5]\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\n@Pause/Play\n\nwhen flag clicked\nSet size\nforever\n    if <(Can move?) = [0]> then\n        Set size\n        go to [front v] layer\n        go to x: (0) y: (0)\n        if <touching (mouse-pointer v)?> then\n            switch costume to (costume4 v)\n        else\n            switch costume to (costume3 v)\n        end\n    else\n        set size to (50) %\n        go to x: (-209) y: (154)\n        if <touching (mouse-pointer v)?> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(Can move?) = [0]> then\n    set [can move? v] to [1]\nelse\n    set [can move? v] to [0]\nend\n\ndefine Set size\nswitch costume to (blank v)\nset size to (100) %\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Retry\n\nwhen flag clicked\nforever\n    go to x: (-209) y: (120)\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 this sprite clicked\nbroadcast (Retry v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Skip\n\nwhen flag clicked\nset [max level v] to [13]\nforever\n    go to x: (-209) y: (85)\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 this sprite clicked\nif <not <(Level) = (Max Level)>> then\n    change [level v] by (1)\n    broadcast (Next level v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    set [ghost v] effect to (30)\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\n