Minecraft Platformer 3
@Stage\n\nwhen flag clicked\nset volume to (25) %\nforever\n    play sound [enchanted tiki 86 v] until done\n    play sound [TheFatRat - Afterlife \(DOTA 2 Music Pack\) v] until done\nend\n\n@Player\n\nwhen flag clicked\nswitch costume to (1 v)\nset [costume v] to [2]\nforever\n    change [costume v] by (1)\n    if <(Costume) = [6]> then\n        set [costume v] to [2]\n    end\n    wait (0.05) seconds\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nReset\nforever\n    if <<(done?) = [y]> and <(dying) = [n]>> then\n        Movement\n    end\nend\n\ndefine Movement\nswitch costume to (hitbox v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [xv v] by (1.5)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [xv v] by (-1.5)\nend\nset [xv v] to ((xv) * (0.8))\nchange x by (xv)\nif <<touching (platforms v)?> or <touching (obstacles v)?>> then\n    set [slope v] to [0]\n    repeat until <<(slope) = [8]> or <not <<touching (platforms v)?> or <touching (obstacles v)?>>>>\n        change y by (1)\n        change [slope v] by (1)\n    end\n    if <<touching (platforms v)?> or <touching (obstacles v)?>> then\n        change y by ((slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (xv) ) )\n            if <<touching (platforms v)?> or <touching (obstacles v)?>> then\n                change x by ((([abs v] of (xv) ) / (xv)) * (-1))\n            end\n        end\n        set [xv v] to [0]\n    end\nend\nchange y by (yv)\nif <<touching (platforms v)?> or <touching (obstacles v)?>> then\n    if <(([abs v] of (yv) ) / (yv)) = [-1]> then\n        if <(landingsound) = [0]> then\n            start sound [Landing v]\n            set [landingsound v] to [1]\n        end\n    else\n        if <(Knock Sound) = [0]> then\n            start sound [Knock v]\n            set [knock sound v] to [1]\n        end\n    end\n    repeat ([ceiling v] of ([abs v] of (yv) ) )\n        if <<touching (platforms v)?> or <touching (obstacles v)?>> then\n            change y by ((([abs v] of (yv) ) / (yv)) * (-1))\n        end\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(([abs v] of (yv) ) / (yv)) = [-1]>> and <(JumpKeyPressed?) = [n]>> then\n        start sound [Jump v]\n        set [old y v] to (y position)\n        set [yv v] to [12]\n        set [double jump v] to [0]\n        set [jumpkeypressed? v] to [y]\n        set [landingsound v] to [0]\n        set [knock sound v] to [0]\n    else\n        set [yv v] to [0]\n    end\nend\nchange [yv v] by (-1)\nif <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    set [jumpkeypressed? v] to [n]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<(double jump) = [0]> and <(JumpKeyPressed?) = [n]>>> then\n    start sound [Jump v]\n    set [flipping? v] to [y]\n    set [flippingcostume v] to [9]\n    set [yv v] to [10]\n    set [double jump v] to [1]\nend\nif <(yv) > [2]> then\n    if <(Flipping?) = [n]> then\n        switch costume to (jump v)\n    end\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    if <(Flipping?) = [n]> then\n        switch costume to (Costume)\n    end\nelse\n    if <(Flipping?) = [n]> then\n        switch costume to (1 v)\n    end\nend\nif <(yv) > [2]> then\n    if <(Flipping?) = [n]> then\n        switch costume to (jump v)\n    end\nend\nif <(Flipping?) = [y]> then\n    switch costume to (FlippingCostume)\n    if <(FlippingCostume) = [18]> then\n        switch costume to (1 v)\n        set [flipping? v] to [n]\n    end\n    change [flippingcostume v] by (1)\nend\nif <(x position) > [238]> then\n    if <(Level) < [16]> then\n        Next Level\n    end\nend\nif <<<touching color (#00c016)?> or <<(y position) < [-194]> or <(y position) > [150]>>> or <<<(Level) = [6]> or <<(Level) = [7]> or <<(Level) = [9]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [13]> or <<(Level) = [14]> or <(Level) = [15]>>>>>>>> and <touching (tpar v)?>>> then\n    broadcast (Dead v)\nend\n\nchange [yv v] by (10)\n\nif <(x position) < [-238]> then\n    if <(Level X) > [1]> then\n        Next Level\n    end\nend\n\nwhen flag clicked\nset [sound v] to [1]\nforever\n    if <(done?) = [y]> then\n        if <<(dying) = [n]> and <<(yv) = [-1]> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>>> then\n            start sound (sound)\n            wait (0.3) seconds\n        end\n        if <not <(yv) = [-1]>> then\n            wait (0.3) seconds\n        end\n        change [sound v] by (1)\n        if <(sound) = [3]> then\n            set [sound v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [pan left/right v] effect to ((x position) / (4))\nend\n\nwhen I receive [next level v]\nwait (0.5) seconds\nchange [level x v] by (1)\nset x to (() - (x position))\nif <(y position) < [-91]> then\n    set y to (-91)\nend\nrepeat (5)\n    if <(Level) = [12]> then\n        set y to (63)\n    end\n    if <(Level) = [13]> then\n        go to x: (-220) y: (-91)\n    end\n    if <(Level) = [15]> then\n        go to x: (-220) y: (-24)\n    end\nend\n\ndefine Next Level\nif <(trsn) = [n]> then\n    set [done? v] to [n]\n    broadcast (next level v)\nend\n\nwhen I receive [dead v]\nset [dying v] to [y]\nhide\nstart sound [Dead v]\nbroadcast (Par v) and wait\nwait (0.5) seconds\nReset\n\ndefine Reset\nbroadcast (reset v)\nswitch costume to (1 v)\nStart Position\nshow\npoint in direction (90)\nset [xv v] to [0]\nset [yv v] to [0]\nset [slope v] to [0]\nset [landingsound v] to [0]\nset [knock sound v] to [0]\nset [dying v] to [n]\n\nwhen [r v] key pressed\nif <<(dying) = [n]> and <(done?) = [y]>> then\n    broadcast (Dead v)\n    wait until <not <key (r v) pressed?>>\nend\n\ndefine Start Position\nif <(Level) < [10]> then\n    go to x: (-220) y: (-91)\n    if <(Level) = [7]> then\n        go to x: (-230) y: (62)\n    end\n    if <(Level) < [7]> then\n        go to x: (-220) y: (-91)\n    end\nend\nif <(Level) = [10]> then\n    go to x: (-220) y: (24)\nend\nif <(Level) = [11]> then\n    go to x: (-220) y: (9)\nend\nif <(Level) = [12]> then\n    go to x: (-220) y: (63)\nend\nif <(Level) = [13]> then\n    go to x: (-220) y: (-91)\nend\nif <(Level) = [14]> then\n    go to x: (-220) y: (-91)\nend\nif <(Level) = [15]> then\n    go to x: (-220) y: (-24)\nend\nif <(Level) = [16]> then\n    go to x: (-220) y: (-91)\nend\n\nwhen flag clicked\nhide variable [☁ best time v]\nhide variable [time v]\nset [time v] to [0]\nwait until <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>>>>\nreset timer\nwait until <(Level) = [16]>\nbroadcast (HS v)\n\nwhen flag clicked\nif <(username) = [doom1806]> then\n    stop [all v]\nend\n\nwhen I receive [hs v]\nif <(Level) = [16]> then\n    set [time v] to (timer)\n    if <(Time) < (☁ Best time)> then\n        set [☁ best time v] to (Time)\n    end\n    wait (0.5) seconds\n    show variable [time v]\n    show variable [☁ best time v]\nend\n\n@Arms\n\nwhen flag clicked\nset size to (90) %\nforever\n    broadcast (go to player v)\n    point towards (mouse-pointer v)\n    if <(direction) > [0]> then\n        switch costume to (right v)\n    else\n        switch costume to (right2 v)\n    end\nend\n\nwhen I receive [go to player v]\nif <([direction v] of [player v]) = [90]> then\n    go to x: (([x position v] of [player v]) + (0.5)) y: (([y position v] of [player v]) - (-5))\nelse\n    go to x: (([x position v] of [player v]) + (-0.5)) y: (([y position v] of [player v]) - (-5))\nend\n\nwhen flag clicked\nset [shooting v] to [0]\nforever\n    if <mouse down?> then\n        if <<(done?) = [y]> and <<(dying) = [n]> and <(Reloading) = [0]>>> then\n            broadcast (Mouse Down v)\n            if <(Shots) > [0]> then\n                create clone of (laser v)\n                change [shots v] by (-1)\n            else\n                play sound [dry gun v] until done\n            end\n            wait until <not <mouse down?>>\n        end\n    end\nend\n\nwhen flag clicked\nset [reloading v] to [0]\nforever\n    if <<key (e v) pressed?> or <key (down arrow v) pressed?>> then\n        if <<<(Shots) < [5]> and <<(done?) = [y]> and <(dying) = [n]>>> and <(Shooting) = [0]>> then\n            broadcast (reload v)\n            play sound [reload v] until done\n        end\n        wait until <not <<key (e v) pressed?> or <key (down arrow v) pressed?>>>\n    end\nend\n\nwhen I receive [reload v]\nset [reloading v] to [1]\nwait (0.3) seconds\nchange [shots v] by (1)\nset [reloading v] to [0]\n\nwhen flag clicked\nforever\n    set [pan left/right v] effect to ((x position) / (4))\nend\n\nwhen I receive [dead v]\nhide\n\nwhen I receive [reset v]\nshow\n\nwhen I receive [mouse down v]\nset [shooting v] to [1]\nwait (0.3) seconds\nset [shooting v] to [0]\n\n@Laser\n\nwhen flag clicked\nhide\nset size to (80) %\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (([x position v] of [player v]) + (0)) y: (([y position v] of [player v]) - (-3))\npoint in direction ([direction v] of [arms v])\nset [pan left/right v] effect to ((x position) / (4))\nstart sound [Shot v]\nset [ghost v] effect to (100)\nshow\nrepeat until <<touching (obstacles v)?> or <<touching (platforms v)?> or <<(x position) > [300]> or <(y position) > [300]>>>>\n    set size to (900) %\n    move (18) steps\n    set size to (80) %\n    change [ghost v] effect by (-25)\nend\ndelete this clone\n\n@Sprite1\n\nwhen flag clicked\nhide\ngo to x: (-220) y: (155)\nswitch costume to (11 v)\nset [shots v] to [5]\nset [id v] to [0]\nrepeat (5)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset x to ((((id) - (1)) * (18)) - (220))\nset [;-; v] to []\nforever\n    if <(Shots) < (id)> then\n        set [;-; v] to [5]\n        repeat (10)\n            change y by (1)\n            change [ghost v] effect by (10)\n        end\n        wait until <not <(Shots) < (id)>>\n    else\n        if <(;-;) > []> then\n            repeat (10)\n                change y by (-1)\n                change [ghost v] effect by (-10)\n            end\n            wait until <(Shots) < (id)>\n        end\n    end\n    if <not <<(y position) = [155]> or <(y position) = [165]>>> then\n        if <(Shots) < (id)> then\n            repeat until <(y position) = [165]>\n                change y by (1)\n            end\n        else\n            if <(;-;) > []> then\n                repeat until <(y position) = [155]>\n                    change y by (-1)\n                end\n            end\n        end\n    end\nend\n\n@Platforms\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nset [level x v] to [1]\nforever\n    set [level v] to (Level X)\nend\n\n@Obstacles\n\nwhen flag clicked\nhide\ndelete all of [obstacle x v]\ndelete all of [obstacle y v]\nset [overcomeobstacle v] to [0]\nset [id v] to [0]\nrepeat (30)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (id)\nforever\n    go [backward v] (50) layers\n    if <(id) = [1]> then\n        Go to x: [0] y: [-90] Show at level: [3]\n    else\n        if <(id) = [2]> then\n            Go to x: [0] y: [85] Show at level: [4]\n        else\n            if <(id) = [3]> then\n                Go to x: [0] y: [0] Show at level: [5]\n            else\n                if <(id) = [4]> then\n                    Go to x: [-119] y: [-175] Show at level: [6]\n                else\n                    if <(id) = [5]> then\n                        Go to x: [-119] y: [180] Show at level: [6]\n                    else\n                        if <(id) = [6]> then\n                            Go to x: [-134] y: [-100] Show at level: [7]\n                        else\n                            if <(id) = [7]> then\n                                Glide X/Y [y] Show at level: [7] Position: x: [0] y: [] Gliding power: [25] Speed: [3] ID (id)\n                            else\n                                if <(id) = [8]> then\n                                    Glide X/Y [y] Show at level: [8] Position: x: [0] y: [] Gliding power: [60] Speed: [3] ID (id)\n                                else\n                                    if <(id) = [9]> then\n                                        Go to x: [0] y: [0] Show at level: [8]\n                                    else\n                                        if <(id) = [10]> then\n                                            Go to x: [125] y: [7] Show at level: [8]\n                                        else\n                                            if <(id) = [11]> then\n                                                Glide X/Y [y] Show at level: [9] Position: x: [-110] y: [] Gliding power: [80] Speed: [4.5] ID (id)\n                                            else\n                                                if <(id) = [12]> then\n                                                    Glide X/Y [y] Show at level: [9] Position: x: [50] y: [] Gliding power: [24] Speed: [3] ID (id)\n                                                else\n                                                    if <(id) = [13]> then\n                                                        Glide X/Y [x] Show at level: [10] Position: x: [] y: [0] Gliding power: [28] Speed: [5] ID (id)\n                                                    else\n                                                        if <(id) = [14]> then\n                                                            Glide X/Y [x] Show at level: [10] Position: x: [] y: [0] Gliding power: [28] Speed: [-5] ID (id)\n                                                        else\n                                                            if <(id) = [15]> then\n                                                                Go to x: [0] y: [0] Show at level: [10]\n                                                            else\n                                                                if <(id) = [16]> then\n                                                                    Glide X/Y [y] Show at level: [10] Position: x: [] y: [0] Gliding power: [125] Speed: [5] ID (id)\n                                                                else\n                                                                    if <(id) = [17]> then\n                                                                        Go to x: [-40] y: [-43] Show at level: [11]\n                                                                    else\n                                                                        if <(id) = [18]> then\n                                                                            Go to x: [115] y: [-43] Show at level: [11]\n                                                                        else\n                                                                            if <(id) = [19]> then\n                                                                                Go to x: [0] y: [0] Show at level: [12]\n                                                                            else\n                                                                                if <(id) = [20]> then\n                                                                                    Glide X/Y [y] Show at level: [12] Position: x: [0] y: [] Gliding power: [69] Speed: [3] ID (id)\n                                                                                else\n                                                                                    if <(id) = [21]> then\n                                                                                        Glide X/Y [x] Show at level: [12] Position: x: [] y: [0] Gliding power: [80] Speed: [5] ID (id)\n                                                                                    else\n                                                                                        if <(id) = [22]> then\n                                                                                            Glide X/Y [j] Show at level: [13] Position: x: [0] y: [-50] Gliding power: [10] Speed: [5] ID (id)\n                                                                                        else\n                                                                                            if <(id) = [23]> then\n                                                                                                Go to x: [0] y: [0] Show at level: [13]\n                                                                                            else\n                                                                                                if <(id) = [24]> then\n                                                                                                    Go to x: [0] y: [0] Show at level: [13]\n                                                                                                else\n                                                                                                    if <(id) = [25]> then\n                                                                                                        Glide X/Y [y] Show at level: [13] Position: x: [0] y: [] Gliding power: [150] Speed: [4] ID (id)\n                                                                                                    else\n                                                                                                        if <(id) = [26]> then\n                                                                                                            Glide X/Y [y] Show at level: [14] Position: x: [0] y: [] Gliding power: [165] Speed: [2] ID (id)\n                                                                                                        else\n                                                                                                            if <(id) = [27]> then\n                                                                                                                Glide X/Y [y] Show at level: [15] Position: x: [0] y: [] Gliding power: [70] Speed: [5] ID (id)\n                                                                                                            else\n                                                                                                                if <(id) = [28]> then\n                                                                                                                    Glide X/Y [y] Show at level: [15] Position: x: [0] y: [] Gliding power: [-70] Speed: [5] ID (id)\n                                                                                                                else\n                                                                                                                    if <(id) = [29]> then\n                                                                                                                        Glide X/Y [y] Show at level: [15] Position: x: [0] y: [] Gliding power: [70] Speed: [4] ID (id)\n                                                                                                                    else\n                                                                                                                        if <(id) = [30]> then\n                                                                                                                            Glide X/Y [y] Show at level: [15] Position: x: [0] y: [] Gliding power: [150] Speed: [3] ID (id)\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\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\n                end\n            end\n        end\n    end\nend\n\ndefine Go to x: (x) y: (y) Show at level: (level)\nif <(id) = [1]> then\n    repeat until <(OvercomeObstacle) = [1]>\n        Position (x) (y) (level)\n    end\n    Change y at the speed of: [-5] Repeat [50] Off Screen [y]\n    delete this clone\nelse\n    if <(id) = [2]> then\n        repeat until <(OvercomeObstacle) = [2]>\n            Position (x) (y) (level)\n        end\n        Change y at the speed of: [-5] Repeat [25] Off Screen [n]\n        forever\n            Position (x position) (y position) (level)\n        end\n    else\n        if <(id) = [3]> then\n            repeat until <(OvercomeObstacle) = [3]>\n                Position (x) (y) (level)\n            end\n            Fall [25]\n            forever\n                Position (x position) (y position) (level)\n            end\n        else\n            if <(id) = [4]> then\n                repeat until <(OvercomeObstacle) = [4]>\n                    Position (x) (y) (level)\n                end\n                repeat (70)\n                    turn right (2) degrees\n                end\n                delete this clone\n            else\n                if <(id) = [5]> then\n                    repeat until <(OvercomeObstacle) = [4]>\n                        Position (x) (y) (level)\n                    end\n                    repeat (70)\n                        turn right (-2) degrees\n                    end\n                    delete this clone\n                else\n                    if <(id) = [6]> then\n                        repeat until <(OvercomeObstacle) = [5]>\n                            Position (x) (y) (level)\n                        end\n                        Change y at the speed of: [-5] Repeat [17] Off Screen [y]\n                        forever\n                            Position (x position) (y position) (level)\n                        end\n                    else\n                        if <(id) = [9]> then\n                            repeat until <(OvercomeObstacle) = [6]>\n                                Position (x) (y) (level)\n                            end\n                            Fall [25]\n                            forever\n                                Position (x position) (y position) (level)\n                            end\n                        else\n                            if <(id) = [10]> then\n                                repeat until <(OvercomeObstacle) = [7]>\n                                    Position (x) (y) (level)\n                                end\n                                repeat (18)\n                                    turn left (5) degrees\n                                end\n                                forever\n                                    Position (x position) (y position) (level)\n                                end\n                            else\n                                if <(id) = [15]> then\n                                    repeat until <(OvercomeObstacle) = [9]>\n                                        Position (x) (y) (level)\n                                    end\n                                    Change x [40] times. Speed: [5]\n                                    forever\n                                        Position (x position) (y position) (level)\n                                    end\n                                else\n                                    if <(id) = [17]> then\n                                        repeat until <touching (player v)?>\n                                            Position (x) (y) (level)\n                                        end\n                                        forever\n                                            turn right (-1) degrees\n                                            Position (x position) (y position) (level)\n                                        end\n                                    else\n                                        if <(id) = [18]> then\n                                            repeat until <touching (player v)?>\n                                                Position (x) (y) (level)\n                                            end\n                                            forever\n                                                turn right (-1) degrees\n                                                Position (x position) (y position) (level)\n                                            end\n                                        else\n                                            if <(id) = [19]> then\n                                                repeat until <(OvercomeObstacle) = [10]>\n                                                    Position (x) (y) (level)\n                                                end\n                                                Change y at the speed of: [3] Repeat [35] Off Screen []\n                                                forever\n                                                    Position (x position) (y position) (level)\n                                                end\n                                            else\n                                                if <(id) = [23]> then\n                                                    repeat until <(OvercomeObstacle) = [11]>\n                                                        Position (x) (y) (level)\n                                                    end\n                                                    Change y at the speed of: [3] Repeat [20] Off Screen []\n                                                    forever\n                                                        Position (x position) (y position) (level)\n                                                    end\n                                                else\n                                                    if <(id) = [24]> then\n                                                        repeat until <(OvercomeObstacle) = [11]>\n                                                            Position (x) (y) (level)\n                                                        end\n                                                        Change y at the speed of: [-3] Repeat [20] Off Screen []\n                                                        forever\n                                                            Position (x position) (y position) (level)\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\n    end\nend\n\ndefine Position (x) (y) (lvl)\ngo to x: (x) y: (y)\nif <(Level) = (lvl)> then\n    show\nelse\n    hide\nend\n\ndefine Change y at the speed of: (s) Repeat (z) Off Screen (y/n)\nrepeat (z)\n    if <(y/n) = [y]> then\n        set size to (999) %\n    end\n    change y by (s)\n    if <(y/n) = [y]> then\n        set size to (100) %\n    end\nend\n\ndefine Glide X/Y (x/y) Show at level: (lvl) Position: x: (x) y: (y) Gliding power: (p) Speed: (sp) ID (id)\nif <(Level) = (lvl)> then\n    show\n    if <(x/y) = [y]> then\n        if <(id) = [12]> then\n            if <(OvercomeObstacle) = [8]> then\n                Set x to: (x) Power: (p)\n            else\n                go to x: (50) y: (23)\n                set [sinus v] to [90]\n            end\n        else\n            if <(id) = [26]> then\n                if <(OvercomeObstacle) = [12]> then\n                    Set x to: (x) Power: (p)\n                else\n                    go to x: (0) y: (164)\n                    set [sinus v] to [90]\n                end\n            else\n                Set x to: (x) Power: (p)\n            end\n        end\n    else\n        if <(x/y) = [x]> then\n            Set y to: (y) Power: (p)\n        else\n            Turn (x) (y) (p)\n        end\n    end\n    change [sinus v] by (sp)\n    if <<(id) = [8]> or <<(id) = [11]> or <<(id) = [16]> or <<(id) = [25]> or <<(id) = [26]> or <(id) = [30]>>>>>> then\n        add (y position) to [obstacle y v]\n    end\nelse\n    hide\n    set [sinus v] to [0]\nend\n\ndefine Fall (times)\nset [yv v] to [0]\nrepeat (times)\n    change [yv v] by (-1)\n    change y by (Yv)\nend\n\nset [level x v] to [16]\n\nwhen I receive [next level v]\ndelete all of [obstacle x v]\ndelete all of [obstacle y v]\n\ndefine Set x to: (x) Power: (p)\nset x to (x)\nset y to (([sin v] of (Sinus) ) * (p))\n\ndefine Set y to: (y) Power: (p)\nset y to (y)\nset x to (([sin v] of (Sinus) ) * (p))\n\ndefine Change x (x) times. Speed: (s)\nrepeat (x)\n    change x by (s)\nend\n\nif <<(id) = [13]> or <(id) = [14]>> then\n    add (x position) to [obstacle x v]\nend\n\ndefine Turn (x) (y) (p)\ngo to x: (x) y: (y)\npoint in direction ((([sin v] of (Sinus) ) * (p)) - (-90))\n\nset [overcomeobstacle v] to [12]\n\nset volume to (100) %\nstart sound (pick random (1) to (2))\nset volume to (0) %\n\nset volume to (0) %\nset volume to (100) %\nstart sound (pick random (1) to (2))\n\nadd (y position) to [obstacle y v]\n\n@Toxic\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\n    go [backward v] (99) layers\nend\n\n@Transition\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo to x: (-435) y: (455)\nGlide to x: [-205] y: [240] Speed: (TransitionSpeed)\nGlide to x: [-435] y: [455] Speed: (TransitionSpeed)\nset [trsn v] to [n]\ndelete this clone\n\nwhen I receive [next level v]\nshow\nset [trsn v] to [y]\ngo to [front v] layer\ngo to x: (435) y: (-455)\ncreate clone of (_myself_ v)\nGlide to x: [205] y: [-240] Speed: (TransitionSpeed)\nGlide to x: [435] y: [-455] Speed: (TransitionSpeed)\nhide\n\nwhen flag clicked\nset [done? v] to [y]\nhide\nset [transitionspeed v] to [0.2]\nset [trsn v] to [n]\npoint in direction (53)\n\ndefine Glide to x: (x) y: (y) Speed: (s)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) * (s))\n    change y by (((y) - (y position)) * (s))\nend\nwait (0.2) seconds\nset [done? v] to [y]\n\n@PPar\n\nwhen flag clicked\nhide\n\nwhen I receive [par v]\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to x: (([x position v] of [player v]) + (pick random (-10) to (10))) y: (([y position v] of [player v]) + (pick random (-5) to (5)))\nshow\nset [y vel v] to (pick random (10.) to (12))\nset [par x v] to (pick random (-3.) to (3))\nset [size v] to (pick random (90.) to (110))\nrepeat (50)\n    set size to (999) %\n    change y by (y vel)\n    change x by (par x)\n    set size to (size) %\n    change [y vel v] by (-0.8)\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\nrepeat until <<touching (platforms v)?> or <(y position) < [-200]>>\nend\n\n@TPar\n\nwhen flag clicked\nhide\nset [delete clones v] to [0]\nwait (0.05) seconds\nforever\n    if <(Level) = [2]> then\n        set [up/down v] to [up]\n        Clone at: (pick random (30) to (90)) (pick random (-117) to (-105))\n    end\n    if <(Level) = [4]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-115) to (-40)) (pick random (-117) to (-105))\n        else\n            Clone at: (pick random (25) to (105)) (pick random (-117) to (-105))\n        end\n    end\n    if <(Level) = [5]> then\n        set [up/down v] to [up]\n        Clone at: (pick random (-20) to (105)) (pick random (-120) to (-115))\n    end\n    if <(Level) = [6]> then\n        set [up/down v] to [down]\n        Clone at: (pick random (-105) to (115)) (pick random (114) to (118))\n    end\n    if <(Level) = [7]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-222) to (-147)) (pick random (-117) to (-105))\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (-120) to (17)) (pick random (-117) to (-105))\n            else\n                set [up/down v] to [down]\n                Clone at: (pick random (114) to (176)) (pick random (118) to (114))\n            end\n        end\n    end\n    if <(Level) = [8]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-38) to (0)) (item (join [last] []) of [obstacle y v])\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (70) to (175)) (pick random (-118) to (-115))\n            else\n                if <(pick random (1) to (2)) = [1]> then\n                    Clone at: (pick random (-170) to (-135)) [-104]\n                else\n                    Clone at: (pick random (-132) to (-92)) [-89]\n                end\n            end\n        end\n    end\n    if <(Level) = [9]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (165) to (212)) (pick random (-118) to (-115))\n        else\n            set [up/down v] to [down]\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (-135) to (-85)) ((item (join [last] []) of [obstacle y v]) - (38))\n            else\n                Clone at: (pick random (147) to (186)) (pick random (115) to (118))\n            end\n        end\n    end\n    if <(Level) = [10]> then\n        set [up/down v] to [down]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-118) to (-49)) (pick random (117) to (118))\n        else\n            Clone at: (pick random (147) to (178)) ((item (join [last] []) of [obstacle y v]) - (9))\n        end\n    end\n    if <(Level) = [12]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (5) to (112)) (pick random (-117) to (-113))\n            else\n                Clone at: (pick random (-225) to (-154)) (pick random (-118) to (-114))\n            end\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                set [up/down v] to [down]\n                Clone at: (pick random (-143) to (-95)) [117]\n            else\n                Clone at: (pick random (-85) to (-50)) (pick random (-118) to (-114))\n            end\n        end\n    end\n    if <(Level) = [13]> then\n        set [up/down v] to [up]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (137) to (178)) ((item (join [last] []) of [obstacle y v]) - (32))\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                set [up/down v] to [down]\n                Clone at: (pick random (-52) to (53)) (pick random (118) to (117))\n            else\n                if <(pick random (1) to (2)) = [1]> then\n                    Clone at: (pick random (-112) to (-13)) (pick random (-118) to (-117))\n                else\n                    Clone at: (pick random (14) to (114)) (pick random (-118) to (-117))\n                end\n            end\n        end\n    end\n    if <(Level) = [14]> then\n        set [up/down v] to [down]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-110) to (110)) ((item (join [last] []) of [obstacle y v]) - (38))\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (-175) to (-135)) [117]\n            else\n                Clone at: (pick random (135) to (175)) [117]\n            end\n        end\n    end\n    if <(Level) = [15]> then\n        set [up/down v] to [down]\n        if <(pick random (1) to (2)) = [1]> then\n            Clone at: (pick random (-155) to (-125)) ((item (join [last] []) of [obstacle y v]) - (30))\n        else\n            if <(pick random (1) to (2)) = [1]> then\n                Clone at: (pick random (-15) to (18)) ((item (join [last] []) of [obstacle y v]) - (30))\n            else\n                Clone at: (pick random (127) to (158)) ((item (join [last] []) of [obstacle y v]) - (30))\n            end\n        end\n    end\n    if <<(Level) = [10]> or <<(Level) = [14]> or <(Level) = [15]>>> then\n        wait (0.4) seconds\n    else\n        if <<(Level) = [6]> or <<(Level) = [7]> or <<(Level) = [9]> or <(Level) = [10]>>>> then\n            wait (0.3) seconds\n        else\n            wait (0.2) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nset size to (pick random (80) to (100)) %\nset [-angle v] to [0]\nif <(Up/down) = [up]> then\n    set [y v] to (pick random (0.5) to (0.8))\n    repeat (30)\n        change x by (([cos v] of (-angle) ) * (0.3))\n        change [ghost v] effect by (3)\n        change [-angle v] by (6)\n        Up and Down\n        if <touching color (#000000)?> then\n            delete this clone\n        end\n    end\nelse\n    set [ghost v] effect to (100)\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (0.05) seconds\n    set [y v] to [0]\n    repeat until <touching color (#000000)?>\n        change [y v] by (-0.3)\n        Up and Down\n        if <(y position) < [-190]> then\n            delete this clone\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\ndelete this clone\n\nwhen I receive [next level v]\nwait (0.5) seconds\nset [delete clones v] to [1]\nwait (1) seconds\nset [delete clones v] to [0]\n\ndefine Clone at: (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\ndefine Up and Down\nset size to (999) %\nchange y by (y)\nset size to (100) %\nif <(delete clones) = [1]> then\n    delete this clone\nend\n\nset [up/down v] to [up]\n\ngo to (obstacles v)\n\nchange y by (-30)\n\nset [delete clones v] to [0]\n\n@APar\n\nwhen flag clicked\nhide\nforever\n    if <(Lag) = [on]> then\n        set size to (999) %\n        go to x: (-250) y: (pick random (-115) to (115))\n        set size to (100) %\n        wait (pick random (0.5) to (1)) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (75)\nset [xvel v] to [0]\nif <(pick random (1) to (10)) = [1]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\nshow\nrepeat until <<(x position) > [250]> or <(Lag) = [off]>>\n    set size to (999) %\n    change x by (xVel)\n    turn right (xVel) degrees\n    set size to (100) %\n    change [xvel v] by (0.5)\nend\ndelete this clone\n\nwhen flag clicked\nset [lag v] to [on]\nforever\n    if <key (l v) pressed?> then\n        if <(Lag) = [on]> then\n            set [lag v] to [off]\n        else\n            set [lag v] to [on]\n        end\n        wait until <not <key (l v) pressed?>>\n    end\nend\n\n@Target\n\nwhen flag clicked\nhide\nset [id v] to [0]\nrepeat (12)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [destroyed v] to [n]\nforever\n    if <(ID) = [1]> then\n        point in direction (90)\n        Go to x: [-16] y: [50] Show at level: [3]\n    else\n        if <(ID) = [2]> then\n            point in direction (90)\n            Go to x: [-35] y: [0] Show at level: [4]\n        else\n            if <(ID) = [3]> then\n                point in direction (0)\n                Go to x: [175] y: [120] Show at level: [5]\n            else\n                if <(ID) = [4]> then\n                    point in direction (90)\n                    Go to x: [-128] y: [0] Show at level: [6]\n                else\n                    if <(ID) = [5]> then\n                        point in direction (90)\n                        Go to x: [-145] y: [0] Show at level: [7]\n                    else\n                        if <(ID) = [6]> then\n                            point in direction (0)\n                            Go to x: [38] y: [120] Show at level: [8]\n                        else\n                            if <(ID) = [7]> then\n                                point in direction (90)\n                                Go to x: [115] y: [-20] Show at level: [8]\n                            else\n                                if <(ID) = [8]> then\n                                    point in direction (0)\n                                    Go to x: [63] y: [10] Show at level: [9]\n                                else\n                                    if <(ID) = [9]> then\n                                        point in direction (-90)\n                                        Go to x: [-179] y: [-150] Show at level: [10]\n                                    else\n                                        if <(ID) = [10]> then\n                                            point in direction (0)\n                                            Go to x: [-203] y: [-7] Show at level: [12]\n                                        else\n                                            if <(ID) = [11]> then\n                                                point in direction (0)\n                                                Go to x: [-210] y: [120] Show at level: [13]\n                                            else\n                                                if <(ID) = [12]> then\n                                                    point in direction (90)\n                                                    Go to x: [220] y: [80] Show at level: [14]\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\ndefine Go to x: (x) y: (y) Show at level: (level)\nif <(Destroyed) = [n]> then\n    switch costume to (1 v)\n    go to x: (x) y: (y)\n    if <(Level) = (level)> then\n        show\n    else\n        hide\n    end\nelse\n    set [pan left/right v] effect to ((x position) / (4))\n    start sound [target v]\n    set [overcomeobstacle v] to (ID)\n    repeat (6)\n        next costume\n        change [ghost v] effect by (15)\n    end\n    delete this clone\nend\nif <touching (laser v)?> then\n    set [destroyed v] to [y]\nend\n\n@Sound Test\n\n@THumbNail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Sprite2\n\nwhen flag clicked\nset size to (130) %\nforever\n    broadcast (tick v)\n    if <(dying) = [y]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\ngo to (mouse-pointer v)\n\n