A Mobile Platformer 4?

Instructions: There is a fourth one. I know I said there would only be three.\nUse the arrow keys to move in "PC Mode" or tap the joystick to move in "Mobile Mode" Reach the right side of the screen to advance. There are "15" levels?

@Stage\n\nwhen flag clicked\n\nbroadcast (turn page v)\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        switch backdrop to (backdrop2 v)\n    else\n        if <(Level) > [13]> then\n            switch backdrop to (backdrop3 v)\n        else\n            switch backdrop to (backdrop1 v)\n        end\n    end\nend\n\nwhen I receive [turn page v]\nforever\n    play sound [Fortress Boss \(Super Mario Bros v] until done\nend\n\nswitch backdrop to (backdrop1 v)\n\n@Improved2\n\nwhen I receive [turn page v]\nif <(Title) > [0]> then\n    hide\n    stop [this script v]\nend\nReset Level\nforever\n    switch costume to (hitbox v)\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(y position) < [-180]> then\n        Reset Level\n    end\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        Controls - Left and Right\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    Set Costume\n    broadcast (tick v)\nend\n\ndefine Controls - Left and Right\nset [speed x v] to ((speed x) * (0.7))\nif <<key (left arrow v) pressed?> or <(left key pressed) = [1]>> then\n    change [speed x v] by (-2)\nend\nif <<key (right arrow v) pressed?> or <(right key pressed) = [1]>> then\n    change [speed x v] by (2)\nend\n\ndefine Walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (8))\nset [slope v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    else\n        if <<<<key (up arrow v) pressed?> or <(up key pressed) = [1]>> and <([abs v] of (speed) ) > [3.5]>> and <(touch) > [1]>> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        else\n            set [speed x v] to [0]\n        end\n    end\nend\n\ndefine Controls - Jump, Crouch\nif <<key (up arrow v) pressed?> or <<(up key pressed) = [1]> or <touching (bounce v)?>>> then\n    if <<(jump key) = [0]> and <(falling?) < [3]>> then\n        set [speed y v] to [14]\n        set [falling? v] to [6]\n        set [jump key v] to [1]\n    end\nelse\n    set [jump key v] to [0]\nend\nif <<key (down arrow v) pressed?> or <(down key pressed) = [1]>> then\n    set [in platforrm v] to [2]\nend\n\ndefine Gravity\nif <<(speed y) < [4]> or <<key (up arrow v) pressed?> or <(up key pressed) = [1]>>> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Get Touching <check platform?>\nif <touching (ground v)?> then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <touching (platforms v)?>> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\nif <touching (hurt v)?> then\n    Reset Level\nend\nif <touching (sprite8 v)?> then\n    change [level v] by (1)\n    Reset Level\nend\n\ndefine Reset Level\nset size to (25) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (146) y: (200)\ngo to x: (-202) y: (-100)\nreset timer\nshow\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [wall jump v] to [0]\nbroadcast (spawn enemies v)\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (costume13 v)\n    else\n        switch costume to ([floor v] of ((1) + ((frame) mod (12))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (costume13 v)\n    else\n        switch costume to (costume13 v)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nset [jump key v] to [1]\n\nset [falling? v] to [6]\n\nwhen I receive [reset level v]\nReset Level\n\nwhen I receive [bounce v]\nset [speed y v] to [10]\nset [falling? v] to [6]\nset [jump key v] to [1]\n\nbroadcast (tick v) and wait\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@hurt\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\n    point in direction (90)\nend\n\nif <(Level) = [5]> then\n\npoint in direction (90)\n\nturn right (1.5) degrees\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [2]> then\n        repeat (30)\n            change x by (3)\n        end\n        repeat (30)\n            change x by (-3)\n        end\n    else\n        if <(Level) = [5]> then\n            repeat (30)\n                change x by (3)\n            end\n            repeat (30)\n                change x by (-3)\n            end\n        else\n            if <(Level) = [6]> then\n                repeat (30)\n                    change y by (3)\n                end\n                repeat (30)\n                    change y by (-3)\n                end\n            else\n                if <(Level) = [8]> then\n                    repeat (30)\n                        change x by (3)\n                    end\n                    repeat (30)\n                        change x by (-3)\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [turn page v]\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (50)\ngo to [front v] layer\nif <(Mobile?) = [0]> then\n    hide\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\nset [left key pressed v] to [0]\nset [right key pressed v] to [0]\nset [down key pressed v] to [0]\nset [down key pressed v] to [0]\n\nif <<(direction) > [44]> and <(direction) < [91]>> then\n\nwhen I receive [turn page v]\ngo to x: (0) y: (0)\nset [left key pressed v] to [0]\nset [right key pressed v] to [0]\nset [down key pressed v] to [0]\nset [down key pressed v] to [0]\nshow\nset [ghost v] effect to (50)\ngo to [front v] layer\nforever\n    go to x: (0) y: (0)\n    set [left key pressed v] to [0]\n    set [right key pressed v] to [0]\n    set [up key pressed v] to [0]\n    set [down key pressed v] to [0]\n    if <(Mobile?) = [0]> then\n        hide\n        stop [this script v]\n    end\n    if <mouse down?> then\n        go to x: (0) y: (0)\n        point towards (mouse-pointer v)\n        move (28) steps\n        if <<(direction) > [-60]> and <(direction) < [60]>> then\n            set [up key pressed v] to [1]\n        else\n            if <<(direction) < [-120]> or <(direction) > [120]>> then\n                set [down key pressed v] to [1]\n            end\n        end\n        if <<(direction) > [30]> and <(direction) < [150]>> then\n            set [right key pressed v] to [1]\n        else\n            if <<(direction) > [-150]> and <(direction) < [-30]>> then\n                set [left key pressed v] to [1]\n            end\n        end\n    end\nend\n\n@Platforms\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [1]> then\n        glide (3) secs to x: (0) y: (100)\n        glide (3) secs to x: (0) y: (0)\n    end\n    if <(Level) = [3]> then\n        glide (3) secs to x: (200) y: (0)\n        glide (3) secs to x: (0) y: (0)\n    end\n    if <(Level) = [4]> then\n        glide (3) secs to x: (0) y: (100)\n        glide (3) secs to x: (0) y: (0)\n    end\n    if <(Level) = [7]> then\n        glide (3) secs to x: (-300) y: (0)\n        glide (3) secs to x: (0) y: (0)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nshow\npoint in direction (90)\nhide variable [level v]\nhide variable [mobile? v]\ngo to [front v] layer\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nset [id v] to [0]\nrepeat (3)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nforever\n    set [id v] to [0]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(id) = [0]> then\n    go to [front v] layer\n    go [forward v] (1) layers\n    go to x: (pick random (-240) to (240)) y: (-480)\n    point in direction (90)\n    set rotation style [all around v]\n    switch costume to (costume4 v)\n    show\n    set [ghost v] effect to (50)\n    repeat (40)\n        turn right (3) degrees\n        change y by (10)\n    end\n    repeat until <touching (_edge_ v)?>\n        turn right (3) degrees\n        change y by (10)\n    end\n    change y by (10)\n    delete this clone\nelse\n    if <(id) = [1]> then\n        go to [front v] layer\n        go to x: (0) y: (0)\n        switch costume to (costume5 v)\n        show\n    else\n        if <(id) = [2]> then\n            go to [front v] layer\n            go to x: (-100) y: (0)\n            switch costume to (costume2 v)\n            show\n            forever\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (50)\n                    if <mouse down?> then\n                        set [mobile? v] to [1]\n                        start sound [Collect v]\n                        broadcast (turn page v)\n                    end\n                else\n                    clear graphic effects\n                end\n            end\n        else\n            if <(id) = [3]> then\n                go to [front v] layer\n                go to x: (100) y: (0)\n                switch costume to (costume3 v)\n                show\n                forever\n                    if <touching (mouse-pointer v)?> then\n                        set [brightness v] effect to (50)\n                        if <mouse down?> then\n                            set [mobile? v] to [0]\n                            start sound [Collect v]\n                            broadcast (turn page v)\n                        end\n                    else\n                        clear graphic effects\n                    end\n                end\n            end\n        end\n    end\nend\n\nchange y by (10)\n\nrepeat until <not <touching (_edge_ v)?>>\n\nrepeat (40)\n    change y by (10)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\nchange y by (10)\ndelete this clone\n\nset [ghost v] effect to (50)\n\nforever\n    go to [front v] layer\nend\n\nset [mobile? v] to [0]\n\nwhen I receive [turn page v]\nshow variable [level v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@Logo\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\ndefine Create enemy (x) (y) (level)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    set [dizzy v] to [0]\n    set [level in v] to (Level)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nshow\nset [speed x v] to [0]\nset size to (30) %\nset rotation style [left-right v]\nset [level in v] to (Level)\nset [speed y v] to [0]\nset [start x v] to (x position)\nset [start y v] to (y position)\nforever\n    switch costume to (costume15 v)\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (15)) < (y position)>> then\n        broadcast (reset level v)\n    end\n    if <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (15)) > (y position)>> then\n        broadcast (bounce v)\n        switch costume to (costume14 v)\n        switch costume to (costume2 v)\n        start sound [pop2 v]\n        wait (0.1) seconds\n        delete this clone\n    end\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Gravity\nif <(speed y) < [4]> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\n\ndefine Walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (4))\nset [slope2 v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope2) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope2 v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope2) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope2))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <([x position v] of [improved2 v]) < (x position)> then\n        change [speed x v] by (-0.5)\n    end\n    if <([x position v] of [improved2 v]) > (x position)> then\n        change [speed x v] by (0.5)\n    end\n    if <(speed x) > [1.5]> then\n        set [speed x v] to [1.5]\n    end\n    if <(speed x) < [-1.5]> then\n        set [speed x v] to [-1.5]\n    end\nend\n\n\n\nset [speed x v] to [0]\n\nrepeat (10)\n\nwhen I receive [tick v]\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to ([floor v] of ((1) + ((frame) mod (13))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nswitch costume to (costume16 v)\n\n\n\nset [ghost v] effect to (100)\n\nhide\ndelete this clone\n\n\n\nstop [other scripts in sprite v]\n\nhide\n\nif <(level) > (Level)> then\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nswitch costume to (costume15 v)\n\nrepeat (10)\n\nif <<([abs v] of (speed x) ) > [4]> and <(falling?) = [0]>> then\n    set [speed y v] to [25]\n    set [falling? v] to [6]\n    set [jump key v] to [1]\nend\n\n\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nhide\nwait (0.1) seconds\nif <(Level) = [4]> then\n    Create enemy (0) (-150) (4)\n    Create enemy (100) (-150) (4)\nend\nif <(Level) = [6]> then\n    Create enemy (0) (0) (6)\n    Create enemy (100) (80) (6)\nend\nif <(Level) = [7]> then\n    Create enemy (0) (40) (7)\n    Create enemy (50) (40) (7)\n    Create enemy (100) (40) (7)\nend\n\nCreate enemy (50) (-120) (3)\n\ndefine Get Touching <check platform?>\nif <touching (ground v)?> then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <touching (platforms v)?>> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\nCreate enemy (196) (124) (19)\n\nwhen I receive [reset level v]\ndelete this clone\n\nSet Costume\n\nCreate enemy (0) (100) (19)\nCreate enemy (190) (100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\n\n\n\nwhen I receive [tick v]\n\nwhen I receive [tick v]\n\nforever\n\nwhen I receive [tick v]\n\nwhen I start as a clone\nforever\n    if <not <(Level) = (level in)>> then\n        delete this clone\n    end\nend\n\nCreate enemy (0) (-25) (5)\n\n@Sprite5\n\nwhen flag clicked\nhide\n\ndefine Create enemy (x) (y) (level)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    set [dizzy v] to [0]\n    set [level in v] to (Level)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nshow\nset [speed x v] to [0]\nset size to (50) %\nset rotation style [left-right v]\nset [level in v] to (Level)\nset [speed y v] to [0]\nset [start x v] to (x position)\nset [start y v] to (y position)\nforever\n    switch costume to (costume15 v)\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (15)) < (y position)>> then\n        broadcast (reset level v)\n    end\n    if <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (15)) > (y position)>> then\n        broadcast (bounce v)\n        switch costume to (costume14 v)\n        switch costume to (costume2 v)\n        start sound [pop2 v]\n        wait (0.1) seconds\n        delete this clone\n    end\n    if <(y position) < [-180]> then\n        delete this clone\n    end\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Gravity\nif <(speed y) < [4]> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\n\ndefine Walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (4))\nset [slope2 v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope2) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope2 v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope2) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope2))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <([x position v] of [improved2 v]) < (x position)> then\n        change [speed x v] by (-0.5)\n    end\n    if <([x position v] of [improved2 v]) > (x position)> then\n        change [speed x v] by (0.5)\n    end\n    if <(speed x) > [1]> then\n        set [speed x v] to [1]\n    end\n    if <(speed x) < [-1]> then\n        set [speed x v] to [-1]\n    end\nend\n\n\n\nset [speed x v] to [0]\n\nrepeat (10)\n\nwhen I receive [tick v]\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to ([floor v] of ((1) + ((frame) mod (13))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nswitch costume to (costume16 v)\n\n\n\nset [ghost v] effect to (100)\n\nhide\ndelete this clone\n\n\n\nstop [other scripts in sprite v]\n\nhide\n\nif <(level) > (Level)> then\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nswitch costume to (costume15 v)\n\nrepeat (10)\n\nif <<([abs v] of (speed x) ) > [4]> and <(falling?) = [0]>> then\n    set [speed y v] to [25]\n    set [falling? v] to [6]\n    set [jump key v] to [1]\nend\n\n\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nhide\nwait (0.1) seconds\nif <(Level) = [8]> then\n    Create enemy (0) (-100) (8)\n    Create enemy (100) (-100) (8)\nend\nif <(Level) = [9]> then\n    Create enemy (0) (-100) (9)\n    Create enemy (100) (-100) (9)\nend\n\ndefine Get Touching <check platform?>\nif  then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and > then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\nCreate enemy (196) (124) (19)\n\nwhen I receive [reset level v]\ndelete this clone\n\nSet Costume\n\nCreate enemy (0) (100) (19)\nCreate enemy (190) (100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\n\n\n\nwhen I receive [tick v]\n\nwhen I receive [tick v]\n\nforever\n\nwhen I receive [tick v]\n\nwhen I start as a clone\nforever\n    if <(falling?) = [0]> then\n        set [speed y v] to [20]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Level) = (level in)>> then\n        delete this clone\n    end\nend\n\n\n\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(falling?) = [0]> then\n        set [speed y v] to [20]\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(falling?) = [0]> then\n        set [speed y v] to [19]\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\n\ndefine Create enemy (x) (y) (level)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    set [dizzy v] to [0]\n    set [level in v] to (Level)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nshow\nset [speed x v] to [0]\nset size to (50) %\nset rotation style [left-right v]\nset [level in v] to (Level)\nset [speed y v] to [0]\nset [start x v] to (x position)\nset [start y v] to (y position)\nforever\n    switch costume to (costume15 v)\n    Controls - Jump, Crouch\n    Gravity\n    Check Hit Ceiling / Floor <(speed y) > [0]>\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <touching (improved2 v)?> then\n        broadcast (reset level v)\n    end\n    if <(y position) < [-180]> then\n        delete this clone\n    end\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Gravity\nif <(speed y) < [4]> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\n\ndefine Walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (4))\nset [slope2 v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope2) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope2 v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope2) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope2))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <([x position v] of [improved2 v]) < (x position)> then\n        change [speed x v] by (-0.5)\n    end\n    if <([x position v] of [improved2 v]) > (x position)> then\n        change [speed x v] by (0.5)\n    end\n    if <(speed x) > [1.5]> then\n        set [speed x v] to [1.5]\n    end\n    if <(speed x) < [-1.5]> then\n        set [speed x v] to [-1.5]\n    end\nend\n\n\n\nset [speed x v] to [0]\n\nrepeat (10)\n\nwhen I receive [tick v]\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to ([floor v] of ((1) + ((frame) mod (13))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nswitch costume to (costume16 v)\n\n\n\nset [ghost v] effect to (100)\n\nhide\ndelete this clone\n\n\n\nstop [other scripts in sprite v]\n\nhide\n\nif <(level) > (Level)> then\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nswitch costume to (costume15 v)\n\nrepeat (10)\n\nif <<([abs v] of (speed x) ) > [4]> and <(falling?) = [0]>> then\n    set [speed y v] to [25]\n    set [falling? v] to [6]\n    set [jump key v] to [1]\nend\n\n\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nhide\nwait (0.1) seconds\n\nif <(Level) = [6]> then\n    Create enemy (-100) (-120) (6)\n    Create enemy (100) (-120) (6)\nend\nif <(Level) = [7]> then\n    Create enemy (-70) (-120) (7)\nend\nif <(Level) = [10]> then\n    Create enemy (200) (100) (10)\nend\nif <(Level) = [11]> then\n    Create enemy (-100) (-100) (11)\n    Create enemy (-50) (-100) (11)\n    Create enemy (100) (-100) (11)\n    Create enemy (50) (-100) (11)\nend\nif <(Level) = [14]> then\n    Create enemy (-100) (-100) (14)\n    Create enemy (-75) (-100) (14)\n    Create enemy (-50) (-100) (14)\n    Create enemy (-25) (-100) (14)\nend\n\ndefine Get Touching <check platform?>\nif  then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <touching (platforms v)?>> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\nCreate enemy (196) (124) (19)\n\nwhen I receive [reset level v]\ndelete this clone\n\n\n\nwhen I receive [tick v]\n\nwhen I receive [tick v]\n\nforever\n\nwhen I receive [tick v]\n\nwhen I start as a clone\nforever\n    if <not <(Level) = (level in)>> then\n        delete this clone\n    end\nend\n\nCreate enemy (0) (-25) (5)\n\nif <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (15)) > (y position)>> then\n    broadcast (bounce v)\n    switch costume to (costume14 v)\n    switch costume to (costume2 v)\n    start sound [pop2 v]\n    wait (0.1) seconds\n    delete this clone\nend\nSet Costume\n\nCreate enemy (200) (100) (10)\n\nCreate enemy (0) (-100) (19)\n\nCreate enemy (190) (100) (19)\n\nCreate enemy (-100) (-100) (11)\n\nCreate enemy (0) (-100) (11)\nCreate enemy (0) (-100) (11)\n\nCreate enemy (50) (-120) (6)\n\n@Sprite7\n\nwhen flag clicked\nhide\n\ndefine Create enemy (x) (y) (level)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    set [dizzy v] to [0]\n    set [level in v] to (Level)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nhide\nshow\nset [speed x v] to [0]\nset size to (100) %\nset rotation style [left-right v]\nset [level in v] to (Level)\nset [speed y v] to [0]\nset [hp v] to [10]\nset [start x v] to (x position)\nset [start y v] to (y position)\nswitch costume to (costume15 v)\nforever\n    Gravity\n    Check Hit Ceiling / Floor <>\nend\n\ndefine Check Hit Ceiling / Floor <up?>\nGet Touching \nif <(touch) = [0]> then\n    set [in platforrm v] to [1]\nelse\n    if <<up?> and <(touch) = [1]>> then\n        set [in platforrm v] to [2]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    Get Touching <not <up?>>\n    set [speed y v] to [0]\nend\n\ndefine Gravity\nif <(speed y) < [4]> then\n    change [speed y v] by (-1)\nelse\n    change [speed y v] by (-2)\nend\nchange y by (speed y)\nchange [falling? v] by (1)\n\ndefine Controls - Jump, Crouch\n\ndefine Walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nchange [frame v] by (([abs v] of (speed) ) / (4))\nset [slope2 v] to [0]\nGet Touching <(in platforrm) = [1]>\nrepeat until <<(slope2) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope2 v] by (1)\n    Get Touching <(in platforrm) = [1]>\nend\nif <(slope2) = (step)> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope2))\n    if <<(touch) = [1]> and <(in platforrm) = [1]>> then\n        set [in platforrm v] to [2]\n        Walk (direction) (speed) max step (step)\n        if <(speed x) = [0]> then\n            set [in platforrm v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nbroadcast (reset script v)\n\n\n\nset [speed x v] to [0]\n\nwhen I receive [tick v]\n\ndefine Set Costume\nif <(falling?) < [6]> then\n    if <(frame) = [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to ([floor v] of ((1) + ((frame) mod (13))) )\n    end\nelse\n    if <(speed y) > [0]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nswitch costume to (costume16 v)\n\n\n\nset [ghost v] effect to (100)\n\nhide\ndelete this clone\n\n\n\nstop [other scripts in sprite v]\n\nhide\n\nif <(level) > (Level)> then\n\nwhen I receive [spawn enemies v]\ndelete this clone\n\nswitch costume to (costume15 v)\n\nif <<([abs v] of (speed x) ) > [4]> and <(falling?) = [0]>> then\n    set [speed y v] to [25]\n    set [falling? v] to [6]\n    set [jump key v] to [1]\nend\n\nif <(Level) = [4]> then\n    Create enemy (0) (0) (4)\nend\n\n\n\nwhen I receive [spawn enemies v]\ngo to x: (0) y: (0)\nhide\nwait (0.1) seconds\nif <(Level) = [10]> then\n    Create enemy (150) (-99) (10)\nend\n\nCreate enemy (50) (-120) (3)\n\ndefine Get Touching <check platform?>\nif <touching (ground v)?> then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <<touching (platforms v)?> or >> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\nCreate enemy (196) (124) (19)\n\nwhen I receive [reset level v]\ndelete this clone\n\nSet Costume\n\nCreate enemy (0) (100) (19)\nCreate enemy (190) (100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\nCreate enemy (0) (-100) (19)\n\n\n\nwhen I receive [tick v]\n\nwhen I receive [tick v]\n\nforever\n\nwhen I receive [tick v]\n\nwhen I start as a clone\nforever\n    if <not <(Level) = (level in)>> then\n        delete this clone\n    end\nend\n\nCreate enemy (0) (-25) (5)\n\nrepeat (10)\n\nwait (1) seconds\n\n\n\nif <(speed x) < [-0.5]> then\n    Walk (-90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\nelse\n    if <(speed x) > [0.5]> then\n        Walk (90) (speed x) max step (([ceiling v] of ([abs v] of ((speed x) * (1.3)) ) ) + (1))\n    else\n        set [frame v] to [0]\n    end\nend\n\nrepeat (10)\n\nwhen I start as a clone\nclear graphic effects\nshow\ngo to x: (150) y: (-99)\nforever\n\ndefine check collisions\nswitch costume to (costume15 v)\nif <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (0)) < (y position)>> then\n    broadcast (reset level v)\nend\nif <<touching (improved2 v)?> and <(([y position v] of [improved2 v]) - (0)) > (y position)>> then\n    broadcast (bounce v)\n    set [speed y v] to [-10]\n    change [hp v] by (-1)\n    switch costume to (costume14 v)\n    wait (0) seconds\n    switch costume to (costume3 v)\n    wait (0) seconds\n    wait (0) seconds\n    switch costume to (costume2 v)\n    wait (0) seconds\n    change [brightness v] effect by (10)\n    start sound [pop2 v]\n    start sound [Fireballhit v]\n    if <(hp) < [1]> then\n        stop [other scripts in sprite v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        wait (1) seconds\n        set [level v] to [11]\n        delete this clone\n    end\n    broadcast (reset script v)\nend\n\n\nhide\n\ngo to x: (-20) y: (-99)\n\nif <(speed x) > [5]> then\n    set [speed x v] to [5]\nend\nif <(speed x) < [-5]> then\n    set [speed x v] to [-5]\nend\n\nrepeat (15)\nif <(falling?) = [0]> then\n    set [speed y v] to [30]\nend\n\npoint in direction (90)\n\nchange x by (5)\n\nchange x by (2)\n\nrepeat (10)\n    check collisions\n    change x by (-40)\nend\ngo to x: (-150) y: (-99)\n\nif <(hp) < [3]> then\n\ncreate clone of (sprite4 v)\n\nrepeat (10)\n\nrepeat (10)\n    check collisions\n    switch costume to (costume15 v)\n    set [speed x v] to [0]\n    if <([x position v] of [improved2 v]) < (x position)> then\n        change [speed x v] by (-2)\n    end\n    if <([x position v] of [improved2 v]) > (x position)> then\n        change [speed x v] by (2)\n    end\n    if <(speed x) > [5]> then\n        set [speed x v] to [5]\n    end\n    if <(speed x) < [-5]> then\n        set [speed x v] to [-5]\n    end\n    change x by (speed x)\nend\n\nwait (1) seconds\n\nwhen I receive [reset script v]\nforever\n    if <(hp) < [3]> then\n        repeat (60)\n            check collisions\n            if <(falling?) = [999]> then\n                stop [this script v]\n            end\n            change x by (speed x)\n            if <([x position v] of [improved2 v]) < (x position)> then\n                change [speed x v] by (-1)\n            end\n            if <([x position v] of [improved2 v]) > (x position)> then\n                change [speed x v] by (1)\n            end\n            if <(speed x) > [15]> then\n                set [speed x v] to [15]\n            end\n            if <(speed x) < [-15]> then\n                set [speed x v] to [-15]\n            end\n        end\n    else\n        repeat (25)\n            check collisions\n            if <(falling?) = [999]> then\n                stop [this script v]\n            end\n            change x by (speed x)\n            if <([x position v] of [improved2 v]) < (x position)> then\n                change [speed x v] by (-0.5)\n            end\n            if <([x position v] of [improved2 v]) > (x position)> then\n                change [speed x v] by (0.5)\n            end\n            if <(speed x) > [8]> then\n                set [speed x v] to [8]\n            end\n            if <(speed x) < [-8]> then\n                set [speed x v] to [-8]\n            end\n        end\n        set [speed y v] to [19]\n    end\nend\n\nwait () seconds\n\nrepeat (10)\n    set [speed y v] to [-10]\nend\n\nstart sound [Fireballhit v]\n\nglide (0.2) secs to x: (x position) y: (-99)\n\nrepeat (10)\n\nsay [Hello!]\n\n\n\nset [falling? v] to [999]\nwait (1) seconds\n\n@Sprite8\n\nwhen flag clicked\nhide\nforever\n    wait (0) seconds\n    next costume\nend\n\nwhen I receive [spawn enemies v]\nshow\nif <(Level) = [10]> then\n    hide\nend\nif <(Level) = [19]> then\n    hide\nend\ngo to x: (item (Level) of [x pos v]) y: (item (Level) of [y pos v])\n\n