Platformer engine v1.0 #games #all
@Stage\n\nwhen flag clicked\nswitch backdrop to (1 v)\nset [ghost v] effect to (30)\nwait (10) seconds\nforever\n    play sound [NSMBU- Snow Overworld v] until done\nend\n\ndefine check\nif <not <(length of (answer)) = [12]>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <<not <(letter (3) of (answer)) = [ ]>> or <not <(letter (8) of (answer)) = [ ]>>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <not <<(letter (4) of (answer)) = [0]> or <(letter (4) of (answer)) = [1]>>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <not <<(letter (9) of (answer)) = [0]> or <(letter (9) of (answer)) = [1]>>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <(join (letter (1) of (answer)) (letter (2) of (answer))) > [9]> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nset [load level v] to (join (letter (1) of (answer)) (letter (2) of (answer)))\nif <not <(join (letter (5) of (answer)) (join (letter (6) of (answer)) (letter (7) of (answer)))) < [240]>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <not <(join (letter (10) of (answer)) (join (letter (11) of (answer)) (letter (12) of (answer)))) < [180]>> then\n    if <not <(answer) = []>> then\n        ask [Sorry, code not secured. Please enter code again. \(blank to cancel\)] and wait\n        check\n    end\nend\nif <(letter (4) of (answer)) = [0]> then\n    set [load x v] to (join (letter (5) of (answer)) (join (letter (6) of (answer)) (letter (7) of (answer))))\nelse\n    set [load x v] to (join [-] (join (letter (5) of (answer)) (join (letter (6) of (answer)) (letter (7) of (answer)))))\nend\nif <(letter (9) of (answer)) = [0]> then\n    set [load y v] to (join (letter (10) of (answer)) (join (letter (11) of (answer)) (letter (12) of (answer))))\nelse\n    set [load y v] to (join [-] (join (letter (12) of (answer)) (join (letter (11) of (answer)) (letter (12) of (answer)))))\nend\nset [time v] to [1]\nbroadcast (collect load data v)\n\nwhen I receive [load v]\nset [time? v] to [0]\nask [Please enter code. \(blank to cancel\)] and wait\ncheck\n\nwhen flag clicked\nswitch backdrop to (1 v)\n\nwhen flag clicked\nset [uc? v] to [0]\nforever\n    switch backdrop to (level)\nend\n\nwhen I receive [zone-1 end v]\nswitch backdrop to (11 v)\n\nwhen flag clicked\nforever\n    if <<(level) = [4]> and <([x position v] of [zone-1 player v]) > [220]>> then\n        if <<(item (enemy cln 1) of [enemy 1 v]) = [alive]> and <<(item (enemy cln 2) of [enemy 2 v]) = [alive]> and <(item (enemy cln 3) of [enemy 3 v]) = [alive]>>> then\n            broadcast (ultimate challenge success! v)\n            set [uc? v] to [1]\n        end\n        wait until <not <<(level) = [4]> and <([x position v] of [zone-1 player v]) > [220]>>>\n    end\nend\n\nwhen I receive [leaderboard v]\nswitch backdrop to (12 v)\nwait until <not <key (space v) pressed?>>\nwait until <key (space v) pressed?>\nstart sound [Magic Spell v]\nwait (0.8) seconds\nbroadcast (zone-1 end v)\n\nwhen I receive [zone-1 end v]\nstop all sounds\nstop [other scripts in sprite v]\nwait (1) seconds\nforever\n    play sound [Hightail Falls Galaxy v] until done\nend\n\nwhen I receive [zone-1 end v]\nset [level v] to [11]\n\n@blank\n\n@zone-1 player\n\nwhen flag clicked\nset volume to (100) %\npoint in direction (90)\nset size to (60) %\nshow\ngo to x: (-220) y: (0)\nswitch costume to (1 v)\nset [mobile friendly? v] to [1]\nset [can move? v] to [1]\nset [can be dead? v] to [1]\nset [deaths v] to [0]\nset [skipped? v] to [0]\nset [loaded? v] to [0]\nforever\n    if <not <(level) = [11]>> then\n        if <(x position) > [220]> then\n            start sound [Teleport2 v]\n            change [level v] by (1)\n            if <(level) = [11]> then\n                broadcast (zone-1 end v)\n            end\n            broadcast (next level v)\n            reset\n            wait until <not <(x position) > [220]>>\n        end\n    end\n    if <touching (spikes v)?> then\n        start sound [Disconnect v]\n        broadcast (next level v)\n        reset\n        wait until <not <touching (spikes v)?>>\n    end\n    if <(y position) < [-178]> then\n        start sound [Disconnect v]\n        broadcast (next level v)\n        reset\n        wait until <not <(y position) < [-178]>>\n    end\n    if <<(enemy cln 1) = [1]> and <<touching (enemies 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 1) = [1]> and <<touching (enemies 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 1) of [enemy 1 v] with [dead]\n        wait until <not <<(enemy cln 1) = [1]> and <<touching (enemies 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 1) = [2]> and <<touching (enemies 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 1) = [2]> and <<touching (enemies 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 1) of [enemy 1 v] with [dead]\n        wait until <not <<(enemy cln 1) = [1]> and <<touching (enemies 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 2) = [1]> and <<touching (enemies 2 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 2 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 2) = [1]> and <<touching (enemies 2 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 2) of [enemy 2 v] with [dead]\n        wait until <not <<(enemy cln 2) = [1]> and <<touching (enemies 2 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 3) = [1]> and <<touching (enemies 3 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 3 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy cln 3) = [1]> and <<touching (enemies 3 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 3) of [enemy 3 v] with [dead]\n        wait until <not <<(enemy cln 3) = [1]> and <<touching (enemies 3 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 1) = [3]> and <<touching (enemies 1 v)?> and <not <<(y position) < [65]> and <(y position) > [59]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 1 v)?> and <not <<(y position) < [65]> and <(y position) > [59]>>>>>\n    end\n    if <<(enemy cln 1) = [3]> and <<touching (enemies 1 v)?> and <<(y position) < [65]> and <(y position) > [59]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 1) of [enemy 1 v] with [dead]\n        wait until <not <<(enemy cln 1) = [3]> and <<touching (enemies 1 v)?> and <<(y position) < [65]> and <(y position) > [59]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 2) = [2]> and <<touching (enemies 2 v)?> and <not <<(y position) < [65]> and <(y position) > [59]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 2 v)?> and <not <<(y position) < [65]> and <(y position) > [59]>>>>>\n    end\n    if <<(enemy cln 2) = [2]> and <<touching (enemies 2 v)?> and <<(y position) < [65]> and <(y position) > [59]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 2) of [enemy 2 v] with [dead]\n        wait until <not <<(enemy cln 2) = [2]> and <<touching (enemies 2 v)?> and <<(y position) < [65]> and <(y position) > [59]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 1) = [4]> and <<touching (enemies 1 v)?> and <not <<(y position) < [53]> and <(y position) > [44]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 1 v)?> and <not <<(y position) < [53]> and <(y position) > [44]>>>>>\n    end\n    if <<(enemy cln 1) = [4]> and <<touching (enemies 1 v)?> and <<(y position) < [53]> and <(y position) > [44]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 1) of [enemy 1 v] with [dead]\n        wait until <not <<(enemy cln 1) = [4]> and <<touching (enemies 1 v)?> and <<(y position) < [53]> and <(y position) > [44]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy AI cln) = [1]> and <<touching (enemies ai 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies ai 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy AI cln) = [1]> and <<touching (enemies ai 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy AI cln) of [enemy ai 1 v] with [dead]\n        wait until <not <<(enemy AI cln) = [1]> and <<touching (enemies ai 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 1) = [5]> and <<touching (enemies 1 v)?> and <not <<(y position) < [97]> and <(y position) > [91]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 1 v)?> and <not <<(y position) < [97]> and <(y position) > [91]>>>>>\n    end\n    if <<(enemy cln 1) = [5]> and <<touching (enemies 1 v)?> and <<(y position) < [97]> and <(y position) > [91]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 1) of [enemy 1 v] with [dead]\n        wait until <not <<(enemy cln 1) = [5]> and <<touching (enemies 1 v)?> and <<(y position) < [97]> and <(y position) > [91]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy cln 2) = [3]> and <<touching (enemies 2 v)?> and <not <<(y position) < [26]> and <(y position) > [19]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies 2 v)?> and <not <<(y position) < [26]> and <(y position) > [19]>>>>>\n    end\n    if <<(enemy cln 2) = [3]> and <<touching (enemies 2 v)?> and <<(y position) < [26]> and <(y position) > [19]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy cln 2) of [enemy 2 v] with [dead]\n        wait until <not <<(enemy cln 2) = [3]> and <<touching (enemies 2 v)?> and <<(y position) < [26]> and <(y position) > [19]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(enemy AI cln) = [2]> and <<touching (enemies ai 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>> then\n        if <(can be dead?) = [1]> then\n            start sound [Disconnect v]\n            broadcast (next level v)\n            reset\n        end\n        wait until <not <<touching (enemies ai 1 v)?> and <not <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n    end\n    if <<(enemy AI cln) = [2]> and <<touching (enemies ai 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>> then\n        set [can be dead? v] to [0]\n        replace item (enemy AI cln) of [enemy ai 1 v] with [dead]\n        wait until <not <<(enemy AI cln) = [2]> and <<touching (enemies ai 1 v)?> and <<(y position) < [-67.5]> and <(y position) > [-75]>>>>>\n        wait (0.3) seconds\n        set [can be dead? v] to [1]\n    end\n    if <<(level) = [6]> and <touching (trampolines 1 v)?>> then\n        start sound [Whiz v]\n        set [yv v] to [15]\n    end\n    if <<(level) = [7]> and <touching (trampolines 1 v)?>> then\n        start sound [Whiz v]\n        set [yv v] to [20]\n    end\n    if <<(level) = [8]> and <touching (trampolines 1 v)?>> then\n        start sound [Whiz v]\n        set [yv v] to [20]\n    end\n    if <<(level) = [10]> and <touching (trampolines 1 v)?>> then\n        start sound [Whiz v]\n        set [yv v] to [13]\n    end\n    if <(can move?) = [1]> then\n        if <not <touching (water v)?>> then\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I receive [reset v]\nset [can move? v] to [0]\nset [pixelate v] effect to (0)\nset [ghost v] effect to (0)\nset size to (100) %\nrepeat (20)\n    change [pixelate v] effect by (5)\n    change [ghost v] effect by (5)\n    change size by (5)\n    change y by (2)\nend\ngo to x: (-232) y: (0)\nrepeat (20)\n    change [pixelate v] effect by (-5)\n    change [ghost v] effect by (-5)\n    change size by (-7)\nend\nset size to (60) %\nset [can move? v] to [1]\n\ndefine reset\nif <not <(x position) > [220]>> then\n    change [deaths v] by (1)\nend\nset [can move? v] to [0]\nset [pixelate v] effect to (0)\nset [ghost v] effect to (0)\nset size to (100) %\nrepeat (20)\n    change [pixelate v] effect by (5)\n    change [ghost v] effect by (5)\n    change size by (5)\n    change y by (2)\nend\ngo to x: (-232) y: (0)\nrepeat (20)\n    change [pixelate v] effect by (-5)\n    change [ghost v] effect by (-5)\n    change size by (-7)\nend\nset size to (60) %\nset [can move? v] to [1]\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-3)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I receive [back v]\nset [can move? v] to [1]\nset [mobile friendly? v] to [1]\n\nwhen I receive [next level v]\nset [can be dead? v] to [1]\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        start sound [Splash v]\n        wait until <not <touching (water v)?>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(can move?) = [1]> then\n        if <(mobile friendly?) = [1]> then\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n                switch costume to (1 v)\n                change [xv v] by (0.9)\n            end\n            if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n                switch costume to (2 v)\n                change [xv v] by (-0.9)\n            end\n            set [xv v] to ((Xv) * (0.9))\n            change x by (Xv)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (1)\n                        if <touching (platforms v)?> then\n                            change y by (1)\n                            if <touching (platforms v)?> then\n                                change y by (1)\n                                if <touching (platforms v)?> then\n                                    change x by ((Xv) * (-1))\n                                    change y by (-5)\n                                    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                                        if <(Xv) > [0]> then\n                                            set [xv v] to [-10]\n                                        else\n                                            set [xv v] to [5]\n                                        end\n                                        set [yv v] to [15]\n                                    else\n                                        set [xv v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change y by (Yv)\n            if <touching (platforms v)?> then\n                change y by ((Yv) * (-1))\n                set [yv v] to [0]\n            end\n            change y by (-1)\n            if <touching (platforms v)?> then\n                if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                    set [yv v] to [12]\n                end\n            end\n            change y by (1)\n            if <<touching (water v)?> and <(level) = [8]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    if <(y position) < [60]> then\n                        set [yv v] to [1.5]\n                    end\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n            if <<touching (water v)?> and <(level) = [9]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    set [yv v] to [1.5]\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n            if <<touching (water v)?> and <(level) = [10]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    set [yv v] to [1.5]\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n        else\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                change [xv v] by (0.9)\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [xv v] by (-0.9)\n            end\n            set [xv v] to ((Xv) * (0.9))\n            change x by (Xv)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (1)\n                        if <touching (platforms v)?> then\n                            change y by (1)\n                            if <touching (platforms v)?> then\n                                change y by (1)\n                                if <touching (platforms v)?> then\n                                    change x by ((Xv) * (-1))\n                                    change y by (-5)\n                                    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                        if <(Xv) > [0]> then\n                                            set [xv v] to [-10]\n                                        else\n                                            set [xv v] to [5]\n                                        end\n                                        set [yv v] to [15]\n                                    else\n                                        set [xv v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n            change [yv v] by (-1)\n            change y by (Yv)\n            if <touching (platforms v)?> then\n                change y by ((Yv) * (-1))\n                set [yv v] to [0]\n            end\n            change y by (-1)\n            if <touching (platforms v)?> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    set [yv v] to [12]\n                end\n            end\n            change y by (1)\n            if <<touching (water v)?> and <(level) = [8]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    if <(y position) < [60]> then\n                        set [yv v] to [1.5]\n                    end\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n            if <<touching (water v)?> and <(level) = [9]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    set [yv v] to [1.5]\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n            if <<touching (water v)?> and <(level) = [10]>> then\n                if <key (down arrow v) pressed?> then\n                    set [yv v] to [-3]\n                else\n                    set [yv v] to [1.5]\n                end\n                if <key (up arrow v) pressed?> then\n                    set [yv v] to [5]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [next level v]\nset [mobile friendly? v] to [1]\n\nwhen I receive [skip v]\nset [skipped? v] to [1]\nreset\n\nwhen I receive [zone-1 end v]\nhide\nset [can be dead? v] to [0]\nset volume to (0) %\n\nwhen I receive [collect load data v]\nset [level v] to (load level)\ngo to x: (load x) y: (load y)\nbroadcast (next level v)\nset [can move? v] to [1]\nset [loaded? v] to [1]\n\n@platforms\n\nwhen flag clicked\nshow\ngo to x: (-16) y: (5)\nforever\n    switch costume to (level)\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@level\n\nwhen flag clicked\nshow\nset [level v] to [1]\ngo to x: (-210) y: (145)\npoint in direction (90)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (10)\n            turn left (1) degrees\n        end\n        repeat (20)\n            turn right (1) degrees\n        end\n        repeat (10)\n            turn left (1) degrees\n        end\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(countdown finished?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            repeat (5)\n                change size by (3)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-3)\n            end\n        end\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@reset button\n\nwhen flag clicked\nset [resets v] to [0]\nshow\nset size to (100) %\ngo to x: (-133) y: (148)\nforever\n    if <(countdown finished?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            repeat (5)\n                change size by (2)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (6)\n            change y by (0.5)\n        end\n        repeat (12)\n            change y by (-0.5)\n        end\n        repeat (6)\n            change y by (0.5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(countdown finished?) = [1]> then\n            start sound [Magic Spell v]\n            change [resets v] by (1)\n            set [mobile friendly? v] to [0]\n            set [can be dead? v] to [0]\n            broadcast (reset v)\n            broadcast (next level v)\n        end\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@save button\n\nwhen flag clicked\nshow\nset size to (100) %\ngo to x: (63) y: (148)\nforever\n    if <(countdown finished?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            repeat (5)\n                change size by (2)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (6)\n            change y by (0.5)\n        end\n        repeat (12)\n            change y by (-0.5)\n        end\n        repeat (6)\n            change y by (0.5)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(countdown finished?) = [1]> then\n    start sound [Magic Spell v]\n    set [mobile friendly? v] to [0]\n    set [can move? v] to [0]\n    broadcast (save v)\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@load button\n\nwhen flag clicked\nshow\nset size to (100) %\ngo to x: (161) y: (148)\nforever\n    if <(countdown finished?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            repeat (5)\n                change size by (2)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (6)\n            change y by (0.5)\n        end\n        repeat (12)\n            change y by (-0.5)\n        end\n        repeat (6)\n            change y by (0.5)\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(countdown finished?) = [1]> then\n    start sound [Magic Spell v]\n    set [mobile friendly? v] to [0]\n    set [can move? v] to [0]\n    broadcast (load v)\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@save\n\nwhen flag clicked\nhide\nshow list [save v]\nset [code v] to []\n\nwhen I receive [save v]\nset [time? v] to [0]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\ndelete all of [save v]\nif <not <(level) = [10]>> then\n    add (join [0] (level)) to [save v]\nelse\n    add [10] to [save v]\nend\nreplace item (1) of [save v] with (join (save) [ ])\nif < (round ([x position v] of [zone-1 player v])) contains [-]?> then\n    replace item (1) of [save v] with (join (save) [1])\n    if <(length of (round ([x position v] of [zone-1 player v]))) = [2]> then\n        replace item (1) of [save v] with (join (save) (join [00] (letter (2) of (round ([x position v] of [zone-1 player v])))))\n    else\n        if <(length of (round ([x position v] of [zone-1 player v]))) = [3]> then\n            replace item (1) of [save v] with (join (save) (join [0] (join (letter (2) of (round ([x position v] of [zone-1 player v]))) (letter (3) of (round ([x position v] of [zone-1 player v]))))))\n        else\n            replace item (1) of [save v] with (join (save) (join (letter (2) of (round ([x position v] of [zone-1 player v]))) (join (letter (3) of (round ([x position v] of [zone-1 player v]))) (letter (4) of (round ([x position v] of [zone-1 player v]))))))\n        end\n    end\nelse\n    replace item (1) of [save v] with (join (save) [0])\n    if <(length of ([x position v] of [zone-1 player v])) = [1]> then\n        replace item (1) of [save v] with (join (save) (join [00] (letter (1) of ([x position v] of [zone-1 player v]))))\n    else\n        if <(length of (round ([x position v] of [zone-1 player v]))) = [2]> then\n            replace item (1) of [save v] with (join (save) (join [0] (join (letter (1) of (round ([x position v] of [zone-1 player v]))) (letter (2) of (round ([x position v] of [zone-1 player v]))))))\n        else\n            replace item (1) of [save v] with (join (save) (join (letter (1) of (round ([x position v] of [zone-1 player v]))) (join (letter (2) of (round ([x position v] of [zone-1 player v]))) (letter (3) of (round ([x position v] of [zone-1 player v]))))))\n        end\n    end\nend\nreplace item (1) of [save v] with (join (save) [ ])\nif < ([y position v] of [zone-1 player v]) contains [-]?> then\n    replace item (1) of [save v] with (join (save) [1])\n    if <(length of ([y position v] of [zone-1 player v])) = [2]> then\n        replace item (1) of [save v] with (join (save) (join [00] (letter (2) of ([y position v] of [zone-1 player v]))))\n    else\n        if <(length of ([y position v] of [zone-1 player v])) = [3]> then\n            replace item (1) of [save v] with (join (save) (join [0] (join (letter (2) of ([y position v] of [zone-1 player v])) (letter (3) of ([y position v] of [zone-1 player v])))))\n        else\n            replace item (1) of [save v] with (join (save) (join (letter (2) of ([y position v] of [zone-1 player v])) (join (letter (3) of ([y position v] of [zone-1 player v])) (letter (4) of ([y position v] of [zone-1 player v])))))\n        end\n    end\nelse\n    replace item (1) of [save v] with (join (save) [0])\n    if <(length of ([y position v] of [zone-1 player v])) = [1]> then\n        replace item (1) of [save v] with (join (save) (join [00] (letter (1) of ([y position v] of [zone-1 player v]))))\n    else\n        if <(length of ([y position v] of [zone-1 player v])) = [2]> then\n            replace item (1) of [save v] with (join (save) (join [0] (join (letter (1) of ([y position v] of [zone-1 player v])) (letter (2) of ([y position v] of [zone-1 player v])))))\n        else\n            replace item (1) of [save v] with (join (save) (join (letter (1) of ([y position v] of [zone-1 player v])) (join (letter (2) of ([y position v] of [zone-1 player v])) (letter (3) of ([y position v] of [zone-1 player v])))))\n        end\n    end\nend\nadd [Triple click the code to copy it.] to [save v]\nadd [Then paste it in a word doc / excel doc / notepad etc.] to [save v]\nadd [Click back to go back.] to [save v]\nhide list [save v]\nset [code v] to (item (1) of [save v])\n\nwhen I receive [back v]\nhide\nshow list [save v]\n\n@back button\n\nwhen flag clicked\nhide\n\nwhen I receive [save v]\nshow\nrepeat (2)\n    go to [front v] layer\nend\ngo to x: (183) y: (-149)\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (5)\n            change size by (2)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n        repeat (5)\n            change size by (-2)\n        end\n    end\nend\n\nwhen this sprite clicked\nset [time? v] to [1]\nset [mobile friendly? v] to [0]\nstart sound [Magic Spell v]\nbroadcast (back v)\nhide\n\n@background decorations\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset size to (75) %\nset [ghost v] effect to (40)\nswitch costume to (pick random (1) to (24))\ngo to x: (214) y: (pick random (-85) to (85))\nrepeat until <touching (_edge_ v)?>\n    move (-5) steps\n    if <(y position) < [21]> then\n        turn left (0.2) degrees\n    else\n        turn right (0.2) degrees\n    end\nend\ndelete this clone\n\nwhen I receive [zone-1 end v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@spikes\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [next level v]\nset [color v] effect to (80)\nif <(level) = [2]> then\n    show\n    switch costume to (2 v)\n    go to x: (0) y: (-95)\nelse\n    if <(level) = [3]> then\n        show\n        switch costume to (3 v)\n        go to x: (0) y: (-95)\n    else\n        if <(level) = [4]> then\n            show\n            switch costume to (4 v)\n            go to x: (0) y: (-95)\n        else\n            if <(level) = [5]> then\n                show\n                switch costume to (5 v)\n                go to x: (0) y: (-95)\n            else\n                if <(level) = [6]> then\n                    show\n                    switch costume to (6 v)\n                    go to x: (0) y: (-95)\n                else\n                    if <(level) = [7]> then\n                        show\n                        switch costume to (7 v)\n                        go to x: (0) y: (-95)\n                    else\n                        if <(level) = [8]> then\n                            show\n                            switch costume to (8 v)\n                            go to x: (0) y: (-95)\n                        else\n                            if <(level) = [9]> then\n                                show\n                                switch costume to (9 v)\n                                go to x: (0) y: (-95)\n                            else\n                                if <(level) = [10]> then\n                                    show\n                                    switch costume to (10 v)\n                                    go to x: (0) y: (-95)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@enemies 1\n\nwhen flag clicked\nhide\nset size to (60) %\ndelete all of [enemy 1 v]\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(level) = [3]> then\n    set [enemy cln 1 v] to [1]\n    create clone of (_myself_ v)\nelse\n    if <(level) = [4]> then\n        set [enemy cln 1 v] to [2]\n        create clone of (_myself_ v)\n    else\n        if <(level) = [5]> then\n            set [enemy cln 1 v] to [3]\n            create clone of (_myself_ v)\n        else\n            if <(level) = [7]> then\n                set [enemy cln 1 v] to [4]\n                create clone of (_myself_ v)\n            else\n                if <(level) = [10]> then\n                    set [enemy cln 1 v] to [5]\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nshow\ninsert [alive] at (enemy cln 1) of [enemy 1 v] \nif <(enemy cln 1) = [1]> then\n    go to x: (106) y: (-95)\n    forever\n        switch costume to (1 v)\n        repeat (40)\n            move (2) steps\n        end\n        switch costume to (2 v)\n        repeat (40)\n            move (-2) steps\n        end\n    end\nelse\n    if <(enemy cln 1) = [2]> then\n        go to x: (-201) y: (-95)\n        forever\n            switch costume to (1 v)\n            repeat (82)\n                move (5) steps\n            end\n            switch costume to (2 v)\n            repeat (82)\n                move (-5) steps\n            end\n        end\n    else\n        if <(enemy cln 1) = [3]> then\n            go to x: (-156) y: (39)\n            forever\n                switch costume to (1 v)\n                repeat (20)\n                    move (6) steps\n                end\n                switch costume to (2 v)\n                repeat (20)\n                    move (-6) steps\n                end\n            end\n        else\n            if <(enemy cln 1) = [4]> then\n                go to x: (134) y: (27)\n                forever\n                    switch costume to (1 v)\n                    repeat (9)\n                        move ((70) / (9)) steps\n                    end\n                    switch costume to (2 v)\n                    repeat (9)\n                        move ((0) - ((70) / (9))) steps\n                    end\n                end\n            else\n                if <(enemy cln 1) = [5]> then\n                    set size to (50) %\n                    go to x: (52) y: (73)\n                    forever\n                        switch costume to (1 v)\n                        repeat (16)\n                            move ((120) / (16)) steps\n                        end\n                        switch costume to (2 v)\n                        repeat (16)\n                            move ((0) - ((120) / (16))) steps\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(item (enemy cln 1) of [enemy 1 v]) = [dead]> then\n        switch costume to (3 v)\n        start sound [Zoop v]\n        wait (0.2) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@enemies 2\n\nwhen flag clicked\nhide\nset size to (60) %\ndelete all of [enemy 2 v]\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(level) = [4]> then\n    set [enemy cln 2 v] to [1]\n    create clone of (_myself_ v)\nelse\n    if <(level) = [5]> then\n        set [enemy cln 2 v] to [2]\n        create clone of (_myself_ v)\n    else\n        if <(level) = [10]> then\n            set [enemy cln 2 v] to [3]\n            create clone of (_myself_ v)\n        end\n    end\nend\n\nwhen I start as a clone\nshow\ninsert [alive] at (enemy cln 2) of [enemy 2 v] \nif <(enemy cln 2) = [1]> then\n    go to x: (0) y: (-95)\n    forever\n        switch costume to (1 v)\n        repeat (41)\n            move (5) steps\n        end\n        switch costume to (2 v)\n        repeat (82)\n            move (-5) steps\n        end\n        switch costume to (1 v)\n        repeat (41)\n            move (5) steps\n        end\n    end\nelse\n    if <(enemy cln 2) = [2]> then\n        go to x: (190) y: (39)\n        forever\n            switch costume to (2 v)\n            repeat (20)\n                move (-6) steps\n            end\n            switch costume to (1 v)\n            repeat (20)\n                move (6) steps\n            end\n        end\n    else\n        if <(enemy cln 2) = [3]> then\n            set size to (50) %\n            go to x: (117) y: (2)\n            forever\n                switch costume to (1 v)\n                repeat (10)\n                    move (9) steps\n                end\n                switch costume to (1 v)\n                repeat (10)\n                    move (-9) steps\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(item (enemy cln 2) of [enemy 2 v]) = [dead]> then\n        switch costume to (3 v)\n        start sound [Zoop v]\n        wait (0.2) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@enemies 3\n\nwhen flag clicked\nhide\nset size to (60) %\ndelete all of [enemy 3 v]\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(level) = [4]> then\n    set [enemy cln 3 v] to [1]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ninsert [alive] at (enemy cln 3) of [enemy 3 v] \nif <(enemy cln 3) = [1]> then\n    go to x: (209) y: (-95)\n    forever\n        switch costume to (2 v)\n        repeat (82)\n            move (-5) steps\n        end\n        switch costume to (1 v)\n        repeat (82)\n            move (5) steps\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(item (enemy cln 3) of [enemy 3 v]) = [dead]> then\n        switch costume to (3 v)\n        start sound [Zoop v]\n        wait (0.2) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@trampolines 1\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(level) = [6]> then\n    show\n    go to x: (-181) y: (-96)\n    forever\n        if <touching (zone-1 player v)?> then\n            switch costume to (1 v)\n            repeat (7)\n                next costume\n            end\n            repeat (7)\n                switch costume to ((costume [number v]) - (1))\n            end\n            wait until <not <touching (zone-1 player v)?>>\n        end\n    end\nelse\n    if <(level) = [7]> then\n        show\n        go to x: (-170) y: (-96)\n        forever\n            if <touching (zone-1 player v)?> then\n                switch costume to (1 v)\n                repeat (7)\n                    next costume\n                end\n                repeat (7)\n                    switch costume to ((costume [number v]) - (1))\n                end\n                wait until <not <touching (zone-1 player v)?>>\n            end\n        end\n    else\n        if <(level) = [8]> then\n            show\n            go to x: (-145) y: (-96)\n            forever\n                if <touching (zone-1 player v)?> then\n                    switch costume to (1 v)\n                    repeat (7)\n                        next costume\n                    end\n                    repeat (7)\n                        switch costume to ((costume [number v]) - (1))\n                    end\n                    wait until <not <touching (zone-1 player v)?>>\n                end\n            end\n        else\n            if <(level) = [9]> then\n                hide\n            else\n                if <(level) = [10]> then\n                    show\n                    go to x: (-197) y: (-96)\n                    forever\n                        if <touching (zone-1 player v)?> then\n                            switch costume to (1 v)\n                            repeat (7)\n                                next costume\n                            end\n                            repeat (7)\n                                switch costume to ((costume [number v]) - (1))\n                            end\n                            wait until <not <touching (zone-1 player v)?>>\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@enemies AI 1\n\ndefine jump (height)\nset [jump v] to (height)\nrepeat (((jump) * (2)) + (1))\n    change y by (jump)\n    change [jump v] by (-1)\nend\n\nwhen flag clicked\nhide\nset size to (60) %\ndelete all of [enemy ai 1 v]\n\nwhen I receive [next level v]\nwait (0.1) seconds\nif <(level) = [9]> then\n    set [enemy ai cln v] to [1]\n    create clone of (_myself_ v)\nelse\n    if <(level) = [10]> then\n        set [enemy ai cln v] to [2]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\ninsert [alive] at (enemy AI cln) of [enemy ai 1 v] \nif <(enemy AI cln) = [1]> then\n    go to x: (209) y: (-93)\n    forever\n        if <([x position v] of [zone-1 player v]) < [-28]> then\n            if <not <(x position) = [9]>> then\n                switch costume to (2 v)\n                move (-2.5) steps\n            end\n        else\n            if <(x position) < ([x position v] of [zone-1 player v])> then\n                if <not <(x position) = [209]>> then\n                    switch costume to (1 v)\n                    move (2.5) steps\n                end\n            else\n                if <<(x position) > ([x position v] of [zone-1 player v])> or <(x position) = ([x position v] of [zone-1 player v])>> then\n                    if <not <(x position) = [9]>> then\n                        switch costume to (2 v)\n                        move (-2.5) steps\n                    end\n                end\n            end\n        end\n        if <<([y position v] of [zone-1 player v]) > [-75]> and <(distance to [zone-1 player v]) < [80]>> then\n            set [jump? v] to (pick random (1) to (4))\n            if <<(jump?) = [1]> or <<(jump?) = [2]> or <(jump?) = [3]>>> then\n                jump [10.5]\n            end\n            wait until <not <<([y position v] of [zone-1 player v]) > [-75]> and <(distance to [zone-1 player v]) < [80]>>>\n        end\n    end\nelse\n    if <(enemy AI cln) = [2]> then\n        go to x: (215) y: (-95)\n        forever\n            if <(x position) < ([x position v] of [zone-1 player v])> then\n                if <not <(x position) = [215]>> then\n                    switch costume to (1 v)\n                    move (2.5) steps\n                end\n            else\n                if <<(x position) > ([x position v] of [zone-1 player v])> or <(x position) = ([x position v] of [zone-1 player v])>> then\n                    if <not <(x position) = [65]>> then\n                        switch costume to (2 v)\n                        move (-2.5) steps\n                    end\n                end\n            end\n            if <<([y position v] of [zone-1 player v]) > [-75]> and <(distance to [zone-1 player v]) < [60]>> then\n                set [jump? v] to (pick random (1) to (4))\n                if <<(jump?) = [1]> or <<(jump?) = [3]> or <(jump?) = [4]>>> then\n                    jump [10.5]\n                end\n                wait until <not <<([y position v] of [zone-1 player v]) > [-75]> and <(distance to [zone-1 player v]) < [60]>>>\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(item (enemy AI cln) of [enemy ai 1 v]) = [dead]> then\n        switch costume to (3 v)\n        start sound [Zoop v]\n        wait (0.2) seconds\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@water\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\ngo to [back v] layer\ngo [backward v] (1) layers\nif <(level) = [8]> then\n    show\n    switch costume to (8 v)\n    go to x: (58.5) y: (20)\nelse\n    if <(level) = [9]> then\n        show\n        switch costume to (9 v)\n        go to x: (58.5) y: (20)\n    else\n        if <(level) = [10]> then\n            show\n            switch costume to (10 v)\n            go to x: (58.5) y: (20)\n        end\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@time\n\nwhen flag clicked\nhide\nset [time v] to [0]\nset [time? v] to [1]\nwait (0.1) seconds\nrepeat until <(countdown finished?) = [1]>\n    reset timer\nend\nset [time cln v] to [0]\nrepeat (5)\n    change [time cln v] by (1)\n    create clone of (_myself_ v)\nend\nforever\n    if <<<<(time) < [800]> or <(time) = [9..]>> and <<(skipped?) = [0]> and <(loaded?) = [0]>>> and <(time?) = [1]>> then\n        if <(length of (timer)) = [5]> then\n            set [time v] to (join (letter (1) of (timer)) (join [.] (letter (3) of (timer))))\n        else\n            if <(length of (timer)) = [6]> then\n                set [time v] to (join (letter (1) of (timer)) (join (letter (2) of (timer)) (join [.] (letter (4) of (timer)))))\n            else\n                if <(length of (timer)) = [7]> then\n                    set [time v] to (join (letter (1) of (timer)) (join (letter (2) of (timer)) (join (letter (3) of (timer)) (join [.] (letter (5) of (timer))))))\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nshow\ngo to [front v] layer\nif <(time cln) = [1]> then\n    go to x: (-218) y: (-148)\n    forever\n        if <(length of (time)) = [3]> then\n            switch costume to (0 v)\n        else\n            if <(length of (time)) = [4]> then\n                switch costume to (0 v)\n            else\n                if <(length of (time)) = [5]> then\n                    switch costume to (letter (1) of (time))\n                end\n            end\n        end\n    end\nelse\n    if <(time cln) = [2]> then\n        go to x: (-193) y: (-148)\n        forever\n            if <(length of (time)) = [3]> then\n                switch costume to (0 v)\n            else\n                if <(length of (time)) = [4]> then\n                    switch costume to (letter (1) of (time))\n                else\n                    if <(length of (time)) = [5]> then\n                        switch costume to (letter (2) of (time))\n                    end\n                end\n            end\n        end\n    else\n        if <(time cln) = [3]> then\n            go to x: (-168) y: (-148)\n            forever\n                if <(length of (time)) = [3]> then\n                    switch costume to (letter (1) of (time))\n                else\n                    if <(length of (time)) = [4]> then\n                        switch costume to (letter (2) of (time))\n                    else\n                        if <(length of (time)) = [5]> then\n                            switch costume to (letter (3) of (time))\n                        end\n                    end\n                end\n            end\n        else\n            if <(time cln) = [4]> then\n                go to x: (-153) y: (-148)\n                switch costume to (. v)\n            else\n                if <(time cln) = [5]> then\n                    go to x: (-138) y: (-148)\n                    forever\n                        if <(length of (time)) = [3]> then\n                            switch costume to (letter (3) of (time))\n                        else\n                            if <(length of (time)) = [4]> then\n                                switch costume to (letter (4) of (time))\n                            else\n                                if <(length of (time)) = [5]> then\n                                    switch costume to (letter (5) of (time))\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<(time) = [800]> or <(skipped?) = [1]>> or <(loaded?) = [1]>> then\n        set [color v] effect to (110)\n    end\nend\n\nwhen I receive [zone-1 end v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@love & fav please\n\nwhen flag clicked\nhide\nwait (10) seconds\nforever\n    wait (pick random (14) to (17)) seconds\n    show\nend\n\ndefine show\nshow\ngo to x: (253) y: (93)\nrepeat (6)\n    move (-10) steps\nend\nwait (3) seconds\nrepeat (6)\n    move (10) steps\nend\nhide\n\nwhen I receive [zone-1 end v]\nforever\n    hide\nend\n\n@score\n\nwhen flag clicked\nhide\n\nwhen I receive [zone-1 end v]\nshow\nswitch costume to (your score v)\ngo to x: (0) y: (0)\nset [score cln v] to [0]\nrepeat (4)\n    change [score cln v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(score cln) = [1]> then\n    go to x: (-115) y: (0)\n    forever\n        if <(length of (score)) = [4]> then\n            switch costume to (letter (1) of (score))\n        else\n            switch costume to (0 v)\n        end\n    end\nelse\n    if <(score cln) = [2]> then\n        go to x: (-45) y: (0)\n        forever\n            if <(length of (score)) = [4]> then\n                switch costume to (letter (2) of (score))\n            else\n                if <(length of (score)) = [3]> then\n                    switch costume to (letter (1) of (score))\n                else\n                    switch costume to (0 v)\n                end\n            end\n        end\n    else\n        if <(score cln) = [3]> then\n            go to x: (25) y: (0)\n            forever\n                if <(length of (score)) = [4]> then\n                    switch costume to (letter (3) of (score))\n                else\n                    if <(length of (score)) = [3]> then\n                        switch costume to (letter (2) of (score))\n                    else\n                        if <(length of (score)) = [2]> then\n                            switch costume to (letter (1) of (score))\n                        else\n                            switch costume to (0 v)\n                        end\n                    end\n                end\n            end\n        else\n            if <(score cln) = [4]> then\n                go to x: (95) y: (0)\n                forever\n                    if <(length of (score)) = [4]> then\n                        switch costume to (letter (4) of (score))\n                    else\n                        if <(length of (score)) = [3]> then\n                            switch costume to (letter (3) of (score))\n                        else\n                            if <(length of (score)) = [2]> then\n                                switch costume to (letter (2) of (score))\n                            else\n                                switch costume to (letter (1) of (score))\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<(score cln) = [1]> or <(score cln) = [3]>> then\n        repeat (5)\n            change y by (1)\n        end\n        repeat (10)\n            change y by (-1)\n        end\n        repeat (5)\n            change y by (1)\n        end\n    end\n    if <<(score cln) = [2]> or <(score cln) = [4]>> then\n        repeat (5)\n            change y by (-1)\n        end\n        repeat (10)\n            change y by (1)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n    end\nend\n\nwhen I receive [leaderboard v]\ndelete this clone\n\nwhen I receive [leaderboard v]\nhide\n\n@countdown\n\nwhen flag clicked\nset [countdown finished? v] to [0]\nset volume to (100) %\nset size to (100) %\nrepeat (5)\n    set [can move? v] to [0]\nend\nshow\ngo to [front v] layer\nswitch costume to (zone 1 v)\ngo to x: (0) y: (0)\nrepeat ((40) / (0.7))\n    change [ghost v] effect by (0.7)\nend\nrepeat (30)\n    change [ghost v] effect by (2)\nend\nclear graphic effects\ncount [3]\ncount [2]\ncount [1]\nstart sound [ding v]\ncount [0]\nset [can move? v] to [1]\nset [countdown finished? v] to [1]\n\ndefine count (number)\ngo to x: (0) y: (-15)\nshow\nset size to (10) %\nswitch costume to (number)\nset [vel v] to [0]\nrepeat (15)\n    change [vel v] by (1)\n    change size by (vel)\nend\nif <not <(number) = [0]>> then\n    start sound [sfx_menu_move2 v]\nend\nrepeat (7)\n    change [vel v] by (-1)\n    change size by (vel)\nend\nwait (0.5) seconds\nrepeat (13)\n    change [vel v] by (-1)\n    change size by (vel)\nend\nhide\n\n@skip button\n\nwhen flag clicked\nshow\nset size to (100) %\ngo to x: (-35) y: (148)\nforever\n    if <(countdown finished?) = [1]> then\n        if <not <(level) = [10]>> then\n            if <touching (mouse-pointer v)?> then\n                repeat (5)\n                    change size by (2)\n                end\n                wait until <not <touching (mouse-pointer v)?>>\n                repeat (5)\n                    change size by (-2)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (6)\n            change y by (0.5)\n        end\n        repeat (12)\n            change y by (-0.5)\n        end\n        repeat (6)\n            change y by (0.5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <not <(level) = [10]>> then\n            if <(countdown finished?) = [1]> then\n                start sound [Magic Spell v]\n                set [mobile friendly? v] to [0]\n                set [can be dead? v] to [0]\n                change [level v] by (1)\n                broadcast (skip v)\n                broadcast (next level v)\n            end\n            wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n        end\n    end\nend\n\nwhen I receive [zone-1 end v]\nhide\n\n@uc\n\nwhen I receive [ultimate challenge success! v]\nshow\ngo to [front v] layer\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (20) %\nswitch costume to (1 v)\nrepeat (10)\n    change size by (8)\n    turn right (36) degrees\nend\nwait (0.5) seconds\nnext costume\nwait (1) seconds\nnext costume\nwait (1.2) seconds\nnext costume\nwait (2) seconds\nrepeat (10)\n    change size by (-8)\n    turn left (36) degrees\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\n\n@leaderboard\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(countdown finished?) = [1]> then\n        repeat (6)\n            change y by (0.5)\n        end\n        repeat (12)\n            change y by (-0.5)\n        end\n        repeat (6)\n            change y by (0.5)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        start sound [Magic Spell v]\n        broadcast (leaderboard v)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nwhen I receive [zone-1 end v]\nshow\nset size to (100) %\nswitch costume to (leaderboard v)\ngo to x: (0) y: (-125)\nforever\n    if <(countdown finished?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            repeat (5)\n                change size by (2)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-2)\n            end\n        end\n    end\nend\n\nwhen I receive [leaderboard v]\nhide\n\nwhen I receive [zone-1 end v]\nif <(deaths) > [20]> then\n    set [deaths v] to [20]\nend\nset [final-deaths v] to (deaths)\nif <(resets) > [10]> then\n    set [resets v] to [10]\nend\nset [time v] to (round (time))\nif <<(skipped?) = [1]> or <(loaded?) = [1]>> then\n    set [score v] to ((((80) - ((deaths) * (4))) + (((20) - ((resets) * (2))) + ((800) - (time)))) + ((uc?) * (600)))\nelse\n    set [score v] to [0]\nend\nif <(score) > (☁ best score)> then\n    set [☁ best score v] to (score)\nend\nforever\n    set [deaths v] to (final-deaths)\n    if <<(skipped?) = [1]> or <(loaded?) = [1]>> then\n        set [score v] to ((((80) - ((deaths) * (4))) + (((20) - ((resets) * (2))) + ((800) - (time)))) + ((uc?) * (600)))\n    else\n        set [score v] to [0]\n    end\nend\n\nwhen I receive [leaderboard v]\n\nset [1-1 encoded v] to []\nwrite (☁ 1-1) to encoded 1\n\ndefine write (val) to encoded 1\nset [letter # v] to [0]\nrepeat (length of (val))\n    set [1-1 encoded v] to (join (1-1 encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [1-1 encoded v] to (join (1-1 encoded) [00])\n\ndefine write (val) to encoded 2\n\ndefine write (val) to encoded 3\n\ndefine write (val) to encoded 4\n\ndefine write (val) to encoded 5\n\nset [2-1 encoded v] to []\nwrite (☁ 2-1) to encoded 1\n\nset [3-1 encoded v] to []\nwrite (☁ 3-1) to encoded 1\n\nset [4-1 encoded v] to []\nwrite (☁ 4-1) to encoded 1\n\nset [5-1 encoded v] to []\nwrite (☁ 5-1) to encoded 1\n\ndefine begin decode of (encoded) 1\nset [1-1 encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value=read from encoded 1\nset [1-1 value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (1-1 encoded)) (letter ((letter #) + (1)) of (1-1 encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [1-1 value v] to (join (1-1 value) (item (idx) of [code v]))\nend\n\nbegin decode of (1-1 encoded) 1\nvalue=read from encoded 1\n\n@love, favourite, follow decorations\n\nwhen flag clicked\nhide\n\nwhen I receive [zone-1 end v]\nforever\n    create clone of (_myself_ v)\n    wait (0.001) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo to [back v] layer\nset size to (110) %\ngo to x: (pick random (-210) to (210)) y: (160)\nrepeat until <touching (_edge_ v)?>\n    change y by (pick random (-5) to (-8))\nend\ndelete this clone\n\nwhen I receive [leaderboard v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@thumbnail\n\nwhen flag clicked\nshow\ngo to x: (36) y: (28)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n
Please click the green flag a few times to reduce lag.\n(I think this is because the player has 1000+ blocks :3)\nFull screen recommended.\n100% mobile-friendly.\nThis is just a platformer engine (new style) I want to try and put in my Pokemon Deluxe game. This has only 10 levels, but there are spikes, trampolines, fixed-moving enemies (stomp on them to destroy them), enemy ai (they chase after you, you can also stomp on them to defeat them), water, reset, skip, save, load buttons etc. (A bit too hard :P)\nUltimate challenge: Try to pass level 4 but not destroying them. (You can replay levels at the ending page.) (Difficulty: 97% nearly impossible)\nScore: 800-time+20-resets x2+80-deaths x 4 (+600 if you completed the ultimate challenge) (If your score is <0, then your score is 0.) (And the maximum score is 1500)\nIf you cannot pass a level, you can consider skipping it, but your score will be 0, too.\nLoading will also make the score 0.\nAlso, this project is for you to remix or backpack the scripts, but please give credit. Thanks! (more information in the project, so click "see inside")\nI spent much time on this, so I hope you like it :)\n***Please do not copy this engine without credit***\n#games #all #platformer #engine #level #save #load #play #pause #wall-jump #trampoline #enemy #water\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n                                Trending log\n28/08/2020: #42 on trending games!\n29/08/2020: #42 on trending games!\n                    #44 on trending games!\n30/08/2020: #42 on trending games!\n                    #43 on trending games!\n05/09/2020: #74 on trending games!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n                                    Credits\n@MJM3 for the countdown.\n@Mae-the-kawii-pug for the water script.\n@Griffpatch for part of the leaderboard script.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n  Scratchers with 500+ followers who loved/ favorited\nLoved: @Chr_Avila_07663 (1K+)\nFavorited: @Chr_Avila_07663 (1K+)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nThings I'll finish in Platformer engine v2.0-v3.0\n-play/ pause buttons\n-music on/ off buttons\n-menu\n-randomly falling spikes\n-fixed falling spikes\n-collect coins\n-grow bigger + grow smaller potions\n-shoot rays\n-enemies (must be shot to die)\n-orbs\n-randomly moving platforms\n-jumping enemies\n-volume slider (finished in Pokemon Deluxe already)\n(Maybe I'll also add those in Pokemon Deluxe)