3D Platformer Levels 1-4


@Stage\n\nwhen I receive [endintro v]\nswitch backdrop to (ice land v)\n\nwhen I receive [endintro v]\nforever\n    if <(level) = [12]> then\n        switch backdrop to (ice land v)\n    end\nend\n\nwhen I receive [credits v]\nstop [other scripts in sprite v]\nclear graphic effects\nswitch backdrop to (thumbnail v)\n\nwhen flag clicked\nswitch backdrop to (intro v)\n\n@Blank\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nrepeat (7)\n    switch costume to (trail v)\n    change size by (-4)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [mati v]\nhide\nwait (0) seconds\nshow\nset [x v] to [0]\nset [y v] to [0]\nclear graphic effects\nif <<(level) = []> or <(level) = [14]>> then\n    set x to (-210)\n    set y to (-93)\nelse\n    set x to (-210)\n    set y to (0)\nend\nbroadcast (Game on v)\nstop [this script v]\n\nwhen I receive [game on v]\nforever\n    create clone of (_myself_ v)\n    set rotation style [left-right v]\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        create clone of (_myself_ v)\n        change [x v] by (-1)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        create clone of (_myself_ v)\n        change [x v] by (1)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n        create clone of (_myself_ v)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n        create clone of (_myself_ v)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    switch costume to (hitbox v)\n    if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n        change y by (1)\n        if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n            change y by (1)\n            if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n                change y by (1)\n                if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n                    change y by (1)\n                    if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n                        change y by (1)\n                        if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n                            change x by ((X) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [14]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    switch costume to (hitbox v)\n    if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [13]\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (Y)\n    if <<touching (red v)?> or <<touching (level v)?> or <touching (door v)?>>> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    hide variable [x v]\n    if <(x position) > [230]> then\n        broadcast (next level v)\n        change [level v] by (1)\n        set [y v] to [0]\n        set [x v] to [0]\n        if <(level) = [9]> then\n            go to x: (-190) y: (100)\n        else\n            if <<(level) = []> or <(level) = [14]>> then\n                go to x: (-190) y: (-93)\n            else\n                go to x: (-190) y: (0)\n            end\n        end\n    end\n    if <(y position) < [-179]> then\n        set [x v] to [0]\n        set [y v] to [0]\n        if <(level) = [9]> then\n            go to x: (-190) y: (100)\n        else\n            if <<(level) = []> or <(level) = [14]>> then\n                go to x: (-190) y: (-93)\n            else\n                go to x: (-190) y: (-50)\n            end\n        end\n    end\nend\n\nwhen I receive [game on v]\nforever\n    Set Costume\nend\n\ndefine Set Costume\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n    switch costume to (player v)\n    point in direction (90)\nelse\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n        switch costume to (player v)\n        point in direction (-90)\n    else\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> then\n            switch costume to (player v)\n            point in direction (direction)\n        else\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (-20)) > (x position)> and <mouse down?>>> then\n                switch costume to (player v)\n                point in direction (90)\n            else\n                if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (-20)) < (x position)> and <mouse down?>>> then\n                    switch costume to (player v)\n                    point in direction (-90)\n                else\n                    switch costume to (player v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [game on v]\nforever\n    if <touching (water v)?> then\n        broadcast (In water v)\n        if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < ((x position) - (20))>>>> then\n            set [x v] to [-2]\n        end\n        if <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > ((x position) + (20))>>>> then\n            set [x v] to [2]\n        end\n        if <<key (s v) pressed?> or <<key (down arrow v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) < [10]>>>> then\n            change [y v] by (-1)\n        end\n        if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [20]>>>> then\n            change [y v] by (1)\n        end\n        set [y v] to ((Y) * (0.8))\n        change [y v] by (((Y) / (15)) + (0.5))\n    end\nend\n\nwhen I receive [mati v]\nif <<touching (saw v)?> or <touching (spikes v)?>> then\n    set [x v] to [0]\n    set [y v] to [0]\n    clear graphic effects\n    set x to (-210)\n    set y to (150)\n    broadcast (Game on v)\n    stop [this script v]\nend\n\nwhen I receive [game on v]\nforever\n    if <not <touching (water v)?>> then\n        broadcast (Out water v)\n    end\nend\n\nwhen I receive [game on v]\nforever\n    if <touching (map v)?> then\n        broadcast (MAP find v)\n    end\nend\n\nwhen I receive [endintro v]\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nset size to (60) %\nswitch costume to (player v)\ngo to x: (-190) y: (50)\nset drag mode [not draggable v]\npoint in direction (90)\nbroadcast (Game on v)\nset [level v] to [1]\n\nwhen I receive [game on v]\nforever\n    if <<touching (smasher v)?> or <<touching (saw2 v)?> or <<touching (saw3 v)?> or <<<touching (saw v)?> or <<touching (spikes v)?> or <touching (lava v)?>>> or <touching (enemy v)?>>>>> then\n        stop [other scripts in sprite v]\n        set volume to (100) %\n        start sound [GG v]\n        broadcast (Hansd v)\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        broadcast (Mati v)\n    end\nend\n\nwhen I receive [map find v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [game on v]\nforever\n    if <touching (trampoline v)?> then\n        broadcast (Bounce v)\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [game on v]\nforever\n    if <touching (doublejump v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [y v] to [13]\n        end\n    end\nend\n\nstop [other scripts in sprite v]\n\nwhen I receive [endintro v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [game on v]\nforever\n    if <touching (key v)?> then\n        broadcast (Door Open v)\n    end\nend\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nswitch costume to (join [level] (level))\n\nwhen I receive [endintro v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (level1 v)\n\nwhen I receive [map find v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [endintro v]\nbroadcast (no rain v)\n\nwhen I receive [next level v]\nif <(level) = [11]> then\n    broadcast (| Snow On | | Rain Off | v)\nend\n\nbroadcast (no rain v)\n\n@Spikes\n\nwhen I receive [next level v]\nwait (0) seconds\nSpawn [Spike 1] at [0] [0] at the direction of [90] at the level [2]\nSpawn [Spike 2] at [0] [0] at the direction of [90] at the level [5]\nSpawn [Spike 4] at [0] [0] at the direction of [90] at the level [7]\nSpawn [Spike 3] at [0] [0] at the direction of [90] at the level [6]\nSpawn [Spike 5] at [0] [0] at the direction of [90] at the level [11]\nSpawn [Spike 7] at [0] [0] at the direction of [90] at the level [9]\nSpawn [Spike 8] at [0] [0] at the direction of [90] at the level []\nSpawn [Spike 9] at [0] [0] at the direction of [90] at the level []\n\nwhen flag clicked\nhide\n\ndefine Spawn (name) at (x) (y) at the direction of (dir) at the level (level)\nif <(level) = (level)> then\n    switch costume to (name)\n    go to x: (x) y: (y)\n    point in direction (dir)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\n\nwhen I receive [next level v]\ndelete this clone\n\n@Saw\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [next level v]\nif <(level) = []> then\n    switch costume to (saw v)\n    show\n    set size to (150) %\n    go to x: (10) y: (-72)\nelse\n    if <(level) = [11]> then\n        switch costume to (saw v)\n        show\n        set size to (150) %\n        go to [back v] layer\n        go to x: (-18) y: (-50)\n        forever\n            wait (2) seconds\n            glide (1) secs to x: (-18) y: (-130)\n            wait (0.5) seconds\n            glide (1) secs to x: (-18) y: (-50)\n        end\n    else\n        if <(level) = []> then\n            switch costume to (saw v)\n            show\n            set size to (80) %\n            go to x: (-41) y: (-77)\n        else\n            if <(level) = []> then\n                switch costume to (saw2 v)\n                point in direction (90)\n                show\n                set size to (200) %\n                go to x: (22) y: (-93)\n                forever\n                    glide (1) secs to x: (22) y: (-180)\n                    wait (2) seconds\n                    glide (1) secs to x: (22) y: (-93)\n                    wait (2) seconds\n                end\n            else\n                if <(level) = []> then\n                    switch costume to (saw v)\n                    show\n                    set size to (120) %\n                    go to x: (1) y: (-83)\n                else\n                    if <(level) = []> then\n                        show\n                        set size to (150) %\n                        go to x: (-77) y: (-102)\n                    else\n                        if <(level) = [17]> then\n                            show\n                            set size to (150) %\n                            go to x: (154) y: (-68)\n                        else\n                            if <(level) = [20]> then\n                                show\n                                set size to (150) %\n                                go to x: (177) y: (-75)\n                            else\n                                hide\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [endintro v]\nforever\n    if <<(level) = [20]> or <<(level) = [15]> or <<(level) = [17]> or <<(level) = [12]> or <<(level) = [11]> or <<<(level) = [3]> or <(level) = []>> or <(level) = [6]>>>>>>> then\n        go to [back v] layer\n        turn right (15) degrees\n    else\n        hide\n    end\nend\n\n@Hands\n\nwhen flag clicked\nhide\n\nforever\n    go to [front v] layer\n    go to (player v)\nend\n\nwhen I receive [hansd v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nbroadcast (Mati v)\n\nwhen I receive [mati v]\nshow\nclear graphic effects\nforever\n    go to [front v] layer\n    go to (player v)\nend\n\nwhen I receive [endintro v]\nshow\nset size to (60) %\nforever\n    go to [front v] layer\n    go to (player v)\nend\n\nwhen I receive [map find v]\nstop [other scripts in sprite v]\nhide\n\n@Cloud\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nset x to (240)\npoint in direction (pick random (-90) to (90))\nset rotation style [left-right v]\nset y to (pick random (50) to (180))\nset [ghost v] effect to (pick random (0) to (50))\nswitch costume to (costume1 v)\nset size to (pick random (80) to (100)) %\nrepeat (160)\n    change x by (-3)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nwhen I receive [endintro v]\nhide\nforever\n    create clone of (_myself_ v)\n    wait (1) seconds\nend\n\nwhen I receive [credits v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@MAP\n\nwhen I receive [map find v]\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nwait (5) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nhide\nbroadcast (Credits v)\n\nwhen flag clicked\nhide\n\nwait (1) seconds\n\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Water\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = [3]> then\n    switch costume to (water3.0 v)\n    go to [back v] layer\n    set [ghost v] effect to (20)\n    show\n    go to x: (0) y: (0)\n    forever\n        change [frame v] by (0.4)\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n        switch costume to (join [Water3.] (([floor v] of (frame) ) mod (4)))\n    end\nelse\n    if <(level) = []> then\n        switch costume to (water0 v)\n        set [ghost v] effect to (20)\n        show\n        go to [back v] layer\n        go to x: (0) y: (0)\n        forever\n            change [frame v] by (0.4)\n            set y to ((3) * ([sin v] of ((timer) * (180)) ))\n            switch costume to (join [Water] (([floor v] of (frame) ) mod (4)))\n        end\n    else\n        if <(level) = []> then\n            switch costume to (water2.0 v)\n            show\n            go to [back v] layer\n            go to x: (0) y: (0)\n            forever\n                change [frame v] by (0.4)\n                set y to ((3) * ([sin v] of ((timer) * (180)) ))\n                switch costume to (join [Water2.] (([floor v] of (frame) ) mod (4)))\n            end\n        else\n            if <(level) = []> then\n                switch costume to (water3.0 v)\n                show\n                go to [back v] layer\n                go to x: (0) y: (0)\n                forever\n                    change [frame v] by (0.4)\n                    set y to ((3) * ([sin v] of ((timer) * (180)) ))\n                    switch costume to (join [Water3.] (([floor v] of (frame) ) mod (4)))\n                end\n            else\n                if <(level) = [16]> then\n                    switch costume to (water2.0 v)\n                    show\n                    go to [back v] layer\n                    go to x: (0) y: (0)\n                    forever\n                        change [frame v] by (0.4)\n                        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n                        switch costume to (join [Water2.] (([floor v] of (frame) ) mod (4)))\n                    end\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\ngo [forward v] (1) layers\n\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\n\nwhen I receive [endintro v]\nforever\n    go to [back v] layer\nend\n\n@map\n\nwhen flag clicked\nhide\n\nwhen I receive [endintro v]\nforever\n    if <(level) = [12]> then\n        show\n        go to x: (0) y: (0)\n        forever\n            set [ghost v] effect to (100)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [credits v]\nhide\n\n@Trampoline\n\ndefine Go to (x) (y) size (size) direction (dir) level (level)\nif <(level) = (level)> then\n    go to x: (x) y: (y)\n    set size to (size) %\n    point in direction (dir)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [bounce v]\nswitch costume to (costume1 v)\nrepeat (6)\n    wait (0) seconds\n    next costume\nend\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [next level v]\nwait (0) seconds\nGo to [-178] [-61] size [70] direction [90] level [6]\nGo to [113] [-73] size [70] direction [90] level []\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [front v] layer\n\n@Sword\n\nwhen flag clicked\nhide\n\nwhen [space v] key pressed\nstart sound [Sword v]\nset size to (80) %\npoint in direction (0)\ngo to [back v] layer\nforever\n    go to (player v)\nend\n\nwhen [space v] key pressed\nset rotation style [all around v]\nset size to (80) %\npoint in direction (0)\ngo to [back v] layer\nshow\nrepeat (12)\n    turn right (30) degrees\nend\nhide\n\n@Text\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [credits v]\nhide\n\nwhen I receive [bomb v]\nswitch costume to (costume3 v)\n\nwhen I receive [endintro v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (download__1_-removebg-preview v)\nshow\n\n@Enemy\n\ndefine Gravity (gravity) Jump Height (jump height) Speed (speed) Friction (friction) Slope (slope)\nchange [yv v] by (gravity)\nchange y by (yv)\nif <<touching (level v)?> or <touching (door v)?>> then\n    repeat until <not <<touching (level v)?> or <touching (door v)?>>>\n        change y by ((([abs v] of (yv) ) / (yv)) * (-1))\n    end\n    set [yv v] to (<<(y position) < (([y position v] of [player v]) - (10))> and <(([abs v] of (yv) ) / (yv)) = [-1]>> * (jump height))\nend\nset [xv v] to (((xv) + ((<(x position) > ([x position v] of [player v])> * ((speed) * (-1))) + (<(x position) < ([x position v] of [player v])> * (speed)))) * (friction))\nchange x by (xv)\nset [enemy - slope v] to [0]\nrepeat until <<(Enemy - Slope) = ((slope) * (-1))> or <not <<touching (level v)?> or <touching (door v)?>>>>\n    change y by (1)\n    change [enemy - slope v] by (-1)\nend\nif <<touching (level v)?> or <touching (door v)?>> then\n    change y by (Enemy - Slope)\n    repeat until <not <<touching (level v)?> or <touching (door v)?>>>\n        change x by ((([abs v] of (xv) ) / (xv)) * (-1))\n    end\nend\npoint towards (player v)\nif <(y position) < [-180]> then\n    delete this clone\nend\n\nwhen I receive [next level v]\nif  then\n    delete this clone\nend\nif <(level) = [3]> then\n    Clone at [163] [52] [3]\n    Clone at [80] [52] [3]\nelse\n    if <(level) = [4]> then\n        Clone at [-94] [149] [3]\n        Clone at [-10] [-40] [3]\n        Clone at [196] [132] [3]\n    else\n        if <(level) = [8]> then\n            Clone at [196] [144] [3]\n            Clone at [53] [137] [3]\n            Clone at [-82] [69] [3]\n        else\n            if <(level) = [11]> then\n                Clone at [126] [7] [3]\n            end\n        end\n    end\nend\n\ndefine Clone at (x) (y) (type)\ngo to x: (x) y: (y)\nswitch costume to (type)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    forever\n        if <not <(Switch In Progress) = [yes]>> then\n            Gravity [-1] Jump Height [10] Speed [0.5] Friction [.75] Slope [5]\n            if <<<touching (sword v)?> or <touching (shuriken v)?>> or <touching (lava v)?>> then\n                start sound [Hit v]\n                set [slime x v] to (x position)\n                set [slime type v] to (costume [number v])\n                set [slime y v] to (y position)\n                broadcast (Slime Particles v)\n                delete this clone\n            end\n        end\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        forever\n            if <not <(Switch In Progress) = [yes]>> then\n                Gravity [-1] Jump Height [7] Speed [0.2] Friction [.75] Slope [2]\n                if <<<touching (sword v)?> or <touching (shuriken v)?>> or <touching (lava v)?>> then\n                    start sound [Hit v]\n                    set [slime x v] to (x position)\n                    set [slime type v] to (costume [number v])\n                    set [slime y v] to (y position)\n                    broadcast (Slime Particles v)\n                    delete this clone\n                end\n            end\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            forever\n                if <not <(Switch In Progress) = [yes]>> then\n                    Gravity [-1] Jump Height [18] Speed [0.8] Friction [.75] Slope [5]\n                    if <<<touching (sword v)?> or <touching (shuriken v)?>> or <touching (lava v)?>> then\n                        start sound [Hit v]\n                        set [slime x v] to (x position)\n                        set [slime type v] to (costume [number v])\n                        set [slime y v] to (y position)\n                        broadcast (Slime Particles v)\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [mati v]\nif <not <(level) = [1]>> then\n    delete this clone\nend\nif <(level) = [3]> then\n    Clone at [163] [52] [3]\n    Clone at [80] [52] [3]\nelse\n    if <(level) = [4]> then\n        Clone at [-94] [149] [3]\n        Clone at [-10] [-40] [3]\n        Clone at [196] [132] [3]\n    else\n        if <(level) = [8]> then\n            Clone at [196] [144] [3]\n            Clone at [53] [137] [3]\n            Clone at [-82] [69] [3]\n        else\n            if <(level) = [11]> then\n                Clone at [126] [7] [3]\n            end\n        end\n    end\nend\n\nwhen I receive [boss battle v]\nrepeat until <(HP) < [1]>\n    wait (pick random (1) to (2)) seconds\n    if <(pick random (0) to (3)) > [1]> then\n        Clone at (pick random (100) to (200)) [-65] (pick random (1) to (3))\n    else\n        Clone at [-200] [-65] (pick random (2) to (3))\n    end\nend\n\nif <(level) = [3]> then\n    Clone at [200] [-50] [1]\n    Clone at [65] [-40] [1]\nelse\n    if <(level) = [4]> then\n        Clone at [200] [-50] [2]\n        Clone at [65] [-40] [2]\n        Clone at [-20] [15] [2]\n    else\n        if <(level) = [5]> then\n            Clone at [200] [-50] [3]\n            Clone at [40] [-30] [3]\n        else\n            if <(level) = [8]> then\n                Clone at [200] [-50] [3]\n                Clone at [150] [-30] [2]\n                Clone at [100] [0] [1]\n            else\n                if <(level) = [9]> then\n                    Clone at [200] [-50] [2]\n                else\n                    if <(level) = [11]> then\n                        Clone at [-168] [80] [3]\n                        Clone at [-100] [80] [3]\n                        Clone at [105] [53] [3]\n                    else\n                        if <(level) = [12]> then\n                            Clone at [213] [61] [2]\n                            Clone at [-117] [88] [2]\n                            Clone at [-10] [88] [2]\n                            Clone at [130] [-68] [2]\n                        else\n                            if <(level) = [13]> then\n                                Clone at [-118] [116] [2]\n                            else\n                                if <(level) = [15]> then\n                                    Clone at [47] [105] [3]\n                                else\n                                    if <(level) = [19]> then\n                                        Clone at [155] [-1] [1]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = []> then\n    show\n    switch costume to (lava2.0 v)\n    go to [back v] layer\n    go to x: (0) y: (0)\n    forever\n        change [frame v] by (0.4)\n        set y to ((3) * ([sin v] of ((timer) * (180)) ))\n        switch costume to (join [Lava2.] (([floor v] of (frame) ) mod (4)))\n    end\nelse\n    if <(level) = []> then\n        show\n        switch costume to (lava2.0 v)\n        go to [back v] layer\n        go to x: (0) y: (0)\n        forever\n            change [frame v] by (0.4)\n            set y to ((3) * ([sin v] of ((timer) * (180)) ))\n            switch costume to (join [Lava2.] (([floor v] of (frame) ) mod (4)))\n        end\n    else\n        if <(level) = [4]> then\n            show\n            switch costume to (lava2.0 v)\n            go to [back v] layer\n            go to x: (0) y: (0)\n            forever\n                change [frame v] by (0.4)\n                set y to ((3) * ([sin v] of ((timer) * (180)) ))\n                switch costume to (join [Lava3.] (([floor v] of (frame) ) mod (4)))\n            end\n        else\n            if <(level) = []> then\n                show\n                switch costume to (lava2.0 v)\n                go to [back v] layer\n                go to x: (0) y: (0)\n                forever\n                    change [frame v] by (0.4)\n                    set y to ((3) * ([sin v] of ((timer) * (180)) ))\n                    switch costume to (join [Lava2.] (([floor v] of (frame) ) mod (4)))\n                end\n            else\n                hide\n            end\n        end\n    end\nend\n\n@Slime Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [slime particles v]\nif <not <(Is clone?) = [1]>> then\n    repeat (4)\n        Particles\n    end\nend\n\nwhen I start as a clone\nswitch costume to (SLIME TYPE)\nset [ghost v] effect to (0)\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-40) to (10))\nset [is clone? v] to [1]\ngo to x: (SLIME X) y: (SLIME Y)\nshow\nset [xv v] to (pick random (-12) to (12))\nset [yv v] to (pick random (5) to (20))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [yv v] by (-2)\n    set [xv v] to ((xv) * (0.9))\n    set [yv v] to ((yv) * (0.9))\n    change x by (xv)\n    change y by (yv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (1)\n                                    if <touching (level v)?> then\n                                        change y by (1)\n                                        if <touching (level v)?> then\n                                            change y by (1)\n                                            if <touching (level v)?> then\n                                                change y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\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\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine Particles\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\n@Credits\n\nwhen I receive [credits v]\ngo to x: (0) y: (-999999)\ngo to [front v] layer\nshow\nrepeat (1050)\n    change y by (1)\nend\nhide\n\nwhen flag clicked\nhide\n\nif <(y position) > [566]> then\n    hide\nend\n\n@DoubleJump\n\ndefine Spawn (name) go to (x) (y) point in the direction of (dir) in the level (level)\nif <(level) = (level)> then\n    switch costume to (name)\n    go to x: (x) y: (y)\n    point in direction (dir)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset size to (100) %\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [next level v]\nSpawn [Double jump] go to [-92] [1] point in the direction of [90] in the level []\nSpawn [Double jump] go to [-52] [-63] point in the direction of [90] in the level [8]\nSpawn [Double jump] go to [-52] [4] point in the direction of [90] in the level [8]\nSpawn [Double jump] go to [-52] [83] point in the direction of [90] in the level [8]\nSpawn [Double jump] go to [-52] [142] point in the direction of [90] in the level [8]\n\n@Intro\n\nwhen I start as a clone\nif <(ID) = [CircleExplosion]> then\n    set size to (100) %\n    go to x: (0) y: (0)\n    clear graphic effects\n    switch costume to (costume5 v)\n    wait until <(Zsxgdb) = [1]>\n    show\n    repeat (22)\n        turn right (5) degrees\n        move (Move) steps\n        change [move v] by (-.04)\n        change size by (-2)\n    end\n    repeat (12)\n        turn right (5) degrees\n        move (Move) steps\n        change size by (-4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Cool]> then\n    switch costume to (costume4 v)\n    go to x: (0) y: (0)\n    set size to (21) %\n    clear graphic effects\n    show\n    repeat (30)\n        change size by (10)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Cool]> then\n    switch costume to (costume4 v)\n    set size to (21) %\n    show\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing1]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (217) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing2]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (122) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing3]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (28) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing4]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (-65) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing5]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (-158) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [BarThing6]> then\n    switch costume to (bar2 v)\n    point in direction (90)\n    clear graphic effects\n    go to x: (-314) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    Smooth Glide x: (-250) y: (0) speed: (5)\nend\n\nwhen I start as a clone\nif <(ID) = [Particles]> then\n    switch costume to (costume1 v)\n    go to x: (0) y: (0)\n    set [x v] to [0]\n    wait until <(Show) = [1]>\n    clear graphic effects\n    set size to (70) %\n    set [x v] to [0]\n    wait until <(Show) = [1]>\n    show\n    go to [front v] layer\n    repeat until <touching (_edge_ v)?>\n        change y by (Y)\n        move (8) steps\n        change [y v] by (-.07)\n    end\n    delete this clone\nend\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change [ghost v] effect by (-30)\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen I start as a clone\nif <(ID) = [Bars]> then\n    switch costume to (bar v)\n    show\n    point in direction (51)\n    set size to (34) %\n    wait (.02) seconds\n    change size by (20)\n    turn right (12) degrees\n    wait (.02) seconds\n    change size by (14)\n    turn right (9) degrees\n    wait (.02) seconds\n    change size by (12)\n    turn right (6) degrees\n    wait (.02) seconds\n    change size by (7)\n    turn right (3) degrees\n    wait (.02) seconds\n    change size by (5)\n    turn right (3) degrees\n    wait (.02) seconds\n    change size by (3)\n    turn right (2) degrees\n    wait (.02) seconds\n    change size by (2)\n    turn right (1.5) degrees\n    wait (.02) seconds\n    change size by (1)\n    turn right (1) degrees\n    wait (.02) seconds\n    change size by (1)\n    turn right (1) degrees\n    wait (.02) seconds\n    change size by (1)\n    point in direction (90)\n    wait (.02) seconds\nend\n\nwhen flag clicked\nhide\nset [id v] to [Bars]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [y v] to [8]\nset [show v] to [0]\nwait (.5) seconds\nstart sound [Avicii - Broken Arrows v]\nwait (.5) seconds\nclear graphic effects\nset [size v] to [12]\nset [id v] to [Bars]\nrepeat (3)\n    go to x: (-216) y: (0)\n    hide\n    repeat (10)\n        create clone of (_myself_ v)\n        change x by (48)\n    end\n    change [brightness v] effect by (50)\nend\nwait () seconds\nset [id v] to [Line]\ncreate clone of (_myself_ v)\nwait () seconds\nset [id v] to [Thing]\ncreate clone of (_myself_ v)\nwait (1.2) seconds\nclear graphic effects\nrepeat (10)\n    set [id v] to [Square]\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (.02) seconds\nend\nset [id v] to [BarThing1]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [id v] to [BarThing2]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [id v] to [BarThing3]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [id v] to [BarThing4]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [id v] to [BarThing5]\ncreate clone of (_myself_ v)\nwait (.1) seconds\nset [id v] to [BarThing6]\ncreate clone of (_myself_ v)\nwait () seconds\nset [id v] to [Circleeeee]\ncreate clone of (_myself_ v)\nwait (.2) seconds\nset [id v] to [Circleeeee2]\ncreate clone of (_myself_ v)\nwait () seconds\npoint in direction (90)\nrepeat (10)\n    set [id v] to [Particles]\n    create clone of (_myself_ v)\n    turn right (pick random (-90) to (90)) degrees\nend\nset [show v] to [1]\nset [id v] to [Text]\ncreate clone of (_myself_ v)\nwait () seconds\nset [id v] to [Flash]\ncreate clone of (_myself_ v)\nwait (.4) seconds\ngo to x: (9) y: (91)\nset [id v] to [CoolThing]\nhide\nrepeat (7)\n    create clone of (_myself_ v)\n    change x by (36)\nend\ngo to x: (-25) y: (91)\nset [id v] to [CoolThing2]\nrepeat (7)\n    create clone of (_myself_ v)\n    change x by (-36)\nend\nwait (.2) seconds\nrepeat (15)\n    turn right (pick random (-90) to (90)) degrees\n    set [id v] to [Cool]\n    create clone of (_myself_ v)\nend\nwait () seconds\nset [zsxgdb v] to [0]\nset [id v] to [CircleExplosion]\ngo to x: (0) y: (0)\nset [move v] to [12]\nrepeat (12)\n    turn right (30) degrees\n    create clone of (_myself_ v)\nend\nset [zsxgdb v] to [1]\nwait () seconds\nrepeat (30)\n    turn right (pick random (-90) to (90)) degrees\n    set [id v] to [Cool]\n    create clone of (_myself_ v)\nend\nwait (.05) seconds\nset [id v] to [End]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(ID) = [Bars]> then\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Line]> then\n    set size to (100) %\n    point in direction (90)\n    clear graphic effects\n    go to x: (-480) y: (0)\n    switch costume to (line v)\n    set [ghost v] effect to (80)\n    show\n    set size to (100) %\n    Smooth Glide x: (0) y: (0) speed: (3)\n    repeat (12)\n        switch costume to (sizehack v)\n        change size by ((size) * (.5))\n        switch costume to (line v)\n        turn left ((direction) * (.05)) degrees\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Thing]> then\n    set size to (100) %\n    point in direction (90)\n    clear graphic effects\n    go to x: (0) y: (-201)\n    switch costume to (thing v)\n    wait (.8) seconds\n    show\n    repeat (12)\n        switch costume to (sizehack v)\n        change size by ((size) * (.3))\n        switch costume to (thing v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Particles]> then\n    wait until <(Show) = [1]>\n    wait (12) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nif <(ID) = [Square]> then\n    set size to (100) %\n    point in direction (45)\n    go to x: (0) y: (0)\n    switch costume to (costume2 v)\n    show\n    repeat (12)\n        switch costume to (sizehack v)\n        change size by ((size) * (.3))\n        switch costume to (costume2 v)\n        turn left ((direction) * (.2)) degrees\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Circleeeee]> then\n    set size to (100) %\n    point in direction (90)\n    clear graphic effects\n    go to x: (0) y: (201)\n    switch costume to (thing2 v)\n    show\n    wait (.05) seconds\n    repeat (12)\n        switch costume to (sizehack v)\n        change size by ((size) * (.3))\n        switch costume to (thing2 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Circleeeee]> then\n    Smooth Glide x: (0) y: (0) speed: (3)\nend\n\nwhen I start as a clone\nif <(ID) = [Circleeeee2]> then\n    set size to (100) %\n    point in direction (90)\n    clear graphic effects\n    go to x: (0) y: (201)\n    switch costume to (thing v)\n    show\n    wait (.05) seconds\n    repeat (12)\n        switch costume to (sizehack v)\n        change size by ((size) * (.3))\n        switch costume to (thing v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Circleeeee2]> then\n    Smooth Glide x: (0) y: (0) speed: (3)\nend\n\nwhen I start as a clone\nif <(ID) = [Text]> then\n    go to x: (0) y: (0)\n    clear graphic effects\n    point in direction (90)\n    set size to (20) %\n    show\n    switch costume to (text v)\n    repeat (29)\n        go to x: (([sin v] of ((timer) * (1000)) ) * (((size) - (100)) * (0.1))) y: (([sin v] of ((timer) * (800)) ) * (((size) - (100)) * (0.1)))\n        change size by (((70) - (size)) / (12))\n    end\n    set size to (80) %\n    forever\n        switch costume to (text v)\n        set size to (300) %\n        repeat (29)\n            go to x: (([sin v] of ((timer) * (1000)) ) * (((size) - (100)) * (0.1))) y: (([sin v] of ((timer) * (800)) ) * (((size) - (100)) * (0.1)))\n            change size by (((70) - (size)) / (12))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Flash]> then\n    switch costume to (flash v)\n    go to x: (0) y: (0)\n    clear graphic effects\n    point in direction (90)\n    set size to (100) %\n    show\n    repeat (15)\n        change [ghost v] effect by (8)\n    end\n    repeat (50)\n        wait (.3) seconds\n        switch costume to (flash v)\n        go to x: (0) y: (0)\n        clear graphic effects\n        point in direction (90)\n        set size to (100) %\n        show\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Bars]> then\n    set size to (100) %\n    forever\n        switch costume to (costume3 v)\n        go to x: (0) y: (0)\n        clear graphic effects\n        point in direction (90)\n        go to [front v] layer\n        show\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [CoolThing]> then\n    switch costume to (coolthing1 v)\n    point in direction (90)\n    set size to (100) %\n    clear graphic effects\n    set y to (255)\n    wait (.2) seconds\n    show\n    point in direction (90)\n    repeat (3)\n        change y by (-40)\n    end\n    go to x: (x position) y: (91)\n    repeat (17)\n        next costume\n    end\nelse\n    if <(ID) = [CoolThing2]> then\n        set size to (100) %\n        point in direction (-90)\n        switch costume to (coolthing1 v)\n        clear graphic effects\n        set y to (-255)\n        show\n        repeat (3)\n            change y by (40)\n        end\n        go to x: (x position) y: (-91)\n        repeat (17)\n            next costume\n        end\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Text]> then\n    forever\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Bars]> then\n    repeat (100)\n        switch costume to (sizehack v)\n        set size to (100) %\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [Bars]> then\n    wait (8.1) seconds\n    repeat (1)\n        change size by (-6)\n    end\n    repeat (1)\n        change size by (-6)\n    end\n    repeat (1)\n        change size by (-4)\n    end\n    repeat (1)\n        change size by (-3)\n    end\n    repeat (2)\n        change size by (-2)\n    end\n    repeat (2)\n        change size by (-1)\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [CoolThing]> then\n    forever\n        set size to (100) %\n    end\nelse\n    if <(ID) = [CoolThing2]> then\n        forever\n            set size to (100) %\n        end\n    end\nend\n\nwhen I start as a clone\nif <(ID) = [End]> then\n    switch costume to (costume6 v)\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (-100)\n    point in direction (90)\n    set size to (100) %\n    show\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    broadcast (EndIntro v)\n    wait (.3) 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\nif <(ID) = [End]> then\n    forever\n        go to [front v] layer\n    end\nend\n\nwhen I receive [endintro v]\nif <(costume [number v]) = [34]> then\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen flag clicked\nstop all sounds\n\nwhen I receive [credits v]\nstop [other scripts in sprite v]\nset volume to (100) %\nforever\n    play sound [Satisfied v] until done\nend\n\nwhen I receive [map find v]\nrepeat (10)\n    change volume by (-10)\nend\n\nwhen I receive [endintro v]\nforever\n    hide\n    set volume to (50) %\n    play sound [Lost and stoned v] until done\nend\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (thumbnail v)\n\n@Key\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <(level) = []> then\n    stop [other scripts in sprite v]\n    go to x: (165) y: (-59)\n    show\n    forever\n        change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n    end\nelse\n    if <(level) = [6]> then\n        stop [other scripts in sprite v]\n        go to x: (51) y: (36)\n        show\n        forever\n            change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n        end\n    else\n        if <(level) = []> then\n            stop [other scripts in sprite v]\n            go to x: (-7) y: (67)\n            show\n            forever\n                change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [mati v]\nif <(level) = []> then\n    stop [other scripts in sprite v]\n    go to x: (165) y: (-59)\n    show\n    forever\n        change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n    end\nelse\n    if <(level) = [6]> then\n        stop [other scripts in sprite v]\n        go to x: (51) y: (36)\n        show\n        forever\n            change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n        end\n    else\n        if <(level) = []> then\n            stop [other scripts in sprite v]\n            go to x: (-7) y: (61)\n            show\n            forever\n                change y by ((0.5) * ([sin v] of ((timer) * (180)) ))\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [door open v]\nhide\n\n@Door\n\ndefine Spawn (door) at x (x) y (y) direction (dir) size (size) level (level)\nif <(level) = (level)> then\n    switch costume to (door)\n    go to x: (x) y: (y)\n    point in direction (dir)\n    set size to (size) %\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [door open v]\ngo to [back v] layer\nshow\nstart sound [Buzz Whir v]\nswitch costume to (costume1 v)\nrepeat (11)\n    wait (0.02) seconds\n    next costume\nend\nhide\n\nswitch costume to (costume11 v)\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen I receive [next level v]\nSpawn [costume1] at x [6] y [120] direction [90] size [135] level []\nSpawn [costume1] at x [225] y [-35] direction [90] size [110] level [6]\nSpawn [costume1] at x [218] y [129] direction [90] size [100] level []\nSpawn [costume1] at x [216] y [136] direction [90] size [100] level []\n\nwhen I start as a clone\nshow\ngo to [back v] layer\n\nwhen I receive [mati v]\nSpawn [costume1] at x [6] y [120] direction [90] size [135] level []\nSpawn [costume1] at x [225] y [-35] direction [90] size [110] level [6]\nSpawn [costume1] at x [218] y [129] direction [90] size [100] level []\nSpawn [costume1] at x [216] y [136] direction [90] size [100] level []\n\n@Smasher\n\nwhen I receive [next level v]\n\nif <(level) = [4]> then\n    show\n    go to [back v] layer\n    go to x: (-111) y: (167)\n    switch costume to (smasher 1 v)\n    forever\n        wait (0.5) seconds\n        repeat (6)\n            change y by (-18)\n        end\n        set volume to (300) %\n        start sound [Slam v]\n        wait (1) seconds\n        repeat (54)\n            change y by (2)\n        end\n    end\nelse\n    if <(level) = [5]> then\n        show\n        go to [back v] layer\n        go to x: (0) y: (0)\n        switch costume to (smasher 2 v)\n        forever\n            wait (0.5) seconds\n            repeat (6)\n                change y by (-16)\n            end\n            start sound [Slam v]\n            wait (1) seconds\n            repeat (48)\n                change y by (2)\n            end\n        end\n    else\n        if <(level) = [6]> then\n            show\n            go to [back v] layer\n            go to x: (0) y: (0)\n            switch costume to (smasher 3 v)\n            forever\n                wait (0.5) seconds\n                repeat (6)\n                    change y by (-10)\n                end\n                start sound [Slam v]\n                wait (1) seconds\n                repeat (30)\n                    change y by (2)\n                end\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@snow\n\ndefine Update\nchange [angle v] by (0.5)\nset [i v] to [0]\nrepeat until <(i) = (maxParticles)>\n    replace item (i) of [y v] with ((item (i) of [y v]) - ((([cos v] of ((Angle) + (item (i) of [d v])) ) + (1)) + ((item (i) of [r v]) / (2))))\n    replace item (i) of [x v] with ((item (i) of [x v]) + (([sin v] of (Angle) ) * (2)))\n    if <<(item (i) of [x v]) > [245]> or <<(item (i) of [x v]) < [-245]> or <(item (i) of [y v]) < [-180]>>> then\n        if <((i) mod (3)) > [0]> then\n            replace item (i) of [x v] with (((pick random (0) to (0.99)) * (W)) - (240))\n            replace item (i) of [y v] with [190]\n        else\n            if <([sin v] of (Angle) ) > [0]> then\n                replace item (i) of [x v] with [-245]\n                replace item (i) of [y v] with (((pick random (0) to (0.99)) * (H)) - (180))\n            else\n                replace item (i) of [x v] with [245]\n                replace item (i) of [y v] with (((pick random (0) to (0.99)) * (H)) - (180))\n            end\n        end\n    end\n    change [i v] by (1)\nend\n\ndefine Draw\nerase all\nset [i v] to [0]\nrepeat until <(i) = (maxParticles)>\n    go to x: (item (i) of [x v]) y: (item (i) of [y v])\n    set pen size to (item (i) of [r v])\n    pen down\n    pen up\n    change [i v] by (1)\nend\nUpdate\n\nwhen flag clicked\nhide\n\nwhen I receive [endintro v]\ngo to [front v] layer\ngo [backward v] (1) layers\nset pen color to (#ffffff)\nset [h v] to [360]\nset [w v] to [480]\nset [angle v] to [0]\nset [maxparticles v] to [75]\ndelete (all) of [x v]\ndelete (all) of [y v]\ndelete (all) of [r v]\ndelete (all) of [d v]\nset [i v] to [0]\nrepeat until <(i) = (maxParticles)>\n    add (((W) * (pick random (0) to (0.99))) - (240)) to [x v]\n    add (((H) * (pick random (0) to (0.99))) - (180)) to [y v]\n    add (((pick random (0) to (0.99)) * (4)) + (1)) to [r v]\n    add ((maxParticles) * (pick random (0) to (0.99))) to [d v]\n    change [i v] by (1)\nend\nforever\n    Draw\nend\n\nwhen I receive [credits v]\nstop [other scripts in sprite v]\nerase all\n\nwhen flag clicked\nerase all\n\n