The Miner 2 | Platformer #games
@Stage\n\nwhen flag clicked\nswitch backdrop to (level1 v)\nset [level v] to [1]\nset [fails v] to [0]\nbroadcast (initiate v)\nhide variable [fails v]\n\nwhen I receive [nextlevel v]\nswitch backdrop to (join [level] (level))\n\nwhen [r v] key pressed\nbroadcast (startagain v)\n\nwhen [p v] key pressed\nshow variable [fails v]\nshow variable [level v]\nwait until <not <key (p v) pressed?>>\nhide variable [fails v]\nhide variable [level v]\n\nset [level v] to [29]\nswitch backdrop to (level28 v)\nbroadcast (nextlevel v)\n\nwhen I receive [initiate v]\nforever\n    if <([costume # v] of [switch 1 v]) = [3]> then\n        if <key (n v) pressed?> then\n            change [level v] by (1)\n            broadcast (nextlevel v)\n            wait until <not <key (n v) pressed?>>\n        end\n    end\nend\n\nwhen [k v] key pressed\nchange [effects v] by (1)\n\n@Player 1\n\nwhen I receive [nextlevel v]\ngo to x: (-220) y: (-110)\n\nwhen I receive [startagain v]\ngo to x: (-220) y: (-110)\n\nwhen I receive [initiate v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-220) y: (-110)\ngo to [front v] layer\nforever\n    if <key (d v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (a v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n        change y by (1)\n        if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n            change y by (1)\n            if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n                change y by (1)\n                if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n                    change y by (1)\n                    if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n                        change y by (1)\n                        if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (w v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\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 color (#666666)?> or <touching color (#ffa466)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#666666)?> or <touching color (#ffa466)?>> then\n        if <key (w v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#ffff33)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#ff4c4c)?> then\n        broadcast (startagain v)\n        set [switch on v] to [0]\n        set [2switch on v] to [0]\n        change [fails v] by (1)\n    end\nend\n\n@Player 2\n\nwhen I receive [nextlevel v]\ngo to x: (-220) y: (-70)\n\nwhen I receive [initiate v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-220) y: (-70)\ngo to [front v] layer\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n        change y by (1)\n        if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n            change y by (1)\n            if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n                change y by (1)\n                if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n                    change y by (1)\n                    if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n                        change y by (1)\n                        if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\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 color (#666666)?> or <touching color (#66e8ff)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#666666)?> or <touching color (#66ecff)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#ffff33)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#ff4c4c)?> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (startagain v)\n        set [switch on v] to [0]\n        set [2switch on v] to [0]\n        change [fails v] by (1)\n    end\nend\n\nwhen I receive [startagain v]\ngo to x: (-220) y: (-70)\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Goal\n\nwhen I receive [initiate v]\nshow\nforever\n    if <(level) = [1]> then\n        go to x: (210) y: (-112)\n    end\n    if <(level) = [2]> then\n        go to x: (210) y: (68)\n    end\n    if <(level) = [3]> then\n        go to x: (210) y: (-112)\n    end\n    if <(level) = [4]> then\n        go to x: (210) y: (-119)\n    end\n    if <(level) = [5]> then\n        go to x: (210) y: (-129)\n    end\n    if <(level) = [6]> then\n        go to x: (210) y: (76)\n    end\n    if <(level) = [7]> then\n        go to x: (210) y: (129)\n    end\n    if <(level) = [8]> then\n        go to x: (210) y: (158)\n    end\n    if <(level) = [9]> then\n        go to x: (210) y: (31)\n    end\n    if <(level) = [10]> then\n        go to x: (210) y: (79)\n    end\n    if <(level) = [11]> then\n        go to x: (210) y: (139)\n    end\n    if <(level) = [12]> then\n        go to x: (210) y: (-1)\n    end\n    if <(level) = [13]> then\n        go to x: (0) y: (146)\n    end\n    if <(level) = [14]> then\n        go to x: (0) y: (133)\n    end\n    if <(level) = [15]> then\n        go to x: (0) y: (133)\n    end\n    if <(level) = [16]> then\n        go to x: (0) y: (130)\n    end\n    if <(level) = [17]> then\n        go to x: (15) y: (111)\n    end\n    if <(level) = [18]> then\n        go to x: (-210) y: (164)\n    end\n    if <(level) = [19]> then\n        go to x: (126) y: (-54)\n    end\n    if <(level) = [20]> then\n        go to x: (210) y: (-134)\n    end\n    if <(level) = [21]> then\n        go to x: (152) y: (52)\n    end\n    if <(level) = [22]> then\n        go to x: (0) y: (147)\n    end\n    if <(level) = [23]> then\n        go to x: (210) y: (144)\n    end\n    if <(level) = [24]> then\n        go to x: (-40) y: (-129)\n    end\n    if <(level) = [25]> then\n        go to x: (0) y: (175)\n    end\n    if <(level) = [26]> then\n        go to x: (210) y: (-132)\n    end\n    if <(level) = [27]> then\n        go to x: (44) y: (28)\n    end\n    if <(level) = [28]> then\n        go to x: (-210) y: (88)\n    end\n    if <(level) = [29]> then\n        go to x: (210) y: (-116)\n    end\n    if <(level) = [30]> then\n        hide\n    end\n    if <(level) = [27]> then\n        point in direction (0)\n    else\n        point in direction (90)\n    end\nend\n\nwhen I receive [initiate v]\nforever\n    if <touching (player 1 v)?> then\n        switch costume to (touching 1-2 v)\n    else\n        if <touching (player 2 v)?> then\n            switch costume to (touching 2-2 v)\n        else\n            switch costume to (regular 2 v)\n        end\n    end\nend\n\nwhen I receive [initiate v]\nforever\n    if <<touching (player 1 v)?> and <touching (player 2 v)?>> then\n        change [level v] by (1)\n        broadcast (nextlevel v)\n    end\nend\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Switch 1\n\nwhen I receive [nextlevel v]\nset [brightness v] effect to (0)\nset size to (100) %\nset [2switch on v] to [0]\nset [30button v] to [0]\n\nwhen I receive [initiate v]\nhide\nset size to (100) %\nforever\n    if <(level) < [5]> then\n        hide\n    end\n    if <(level) = [5]> then\n        go to x: (-132) y: (93)\n        switch costume to (regular v)\n        show\n    end\n    if <(level) = [6]> then\n        go to x: (-177) y: (37)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [7]> then\n        go to x: (-195) y: (162)\n        switch costume to (stay v)\n        set size to (100) %\n        show\n    end\n    if <(level) = [8]> then\n        hide\n        set size to (100) %\n    end\n    if <(level) = [9]> then\n        go to x: (-205) y: (9)\n        switch costume to (timer v)\n        set [count v] to [3]\n        show\n    end\n    if <(level) = [10]> then\n        go to x: (-108) y: (-153)\n        switch costume to (timer v)\n        set [count v] to [2]\n        show\n    end\n    if <(level) = [11]> then\n        hide\n        switch costume to (regular v)\n    end\n    if <(level) = [12]> then\n        hide\n        switch costume to (timer v)\n    end\n    if <(level) = [13]> then\n        go to x: (218) y: (-68)\n        switch costume to (stay v)\n        set size to (100) %\n        show\n    end\n    if <(level) = [14]> then\n        go to x: (192) y: (-154)\n        switch costume to (timer v)\n        set [count v] to [2.5]\n        set size to (100) %\n        show\n    end\n    if <(level) = [15]> then\n        go to x: (192) y: (-154)\n        switch costume to (timer v)\n        set [count v] to [2.5]\n        show\n    end\n    if <<(level) > [15]> and <(level) < [21]>> then\n        hide\n        switch costume to (regular v)\n    end\n    if <(level) = [21]> then\n        go to x: (-74) y: (-139)\n        switch costume to (regular v)\n        show\n    end\n    if <(level) = [22]> then\n        hide\n    end\n    if <(level) = [23]> then\n        go to x: (218) y: (-106)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [24]> then\n        go to x: (-45) y: (47)\n        switch costume to (timer v)\n        set [count v] to [1]\n        show\n    end\n    if <(level) = [25]> then\n        go to x: (72) y: (-149)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [26]> then\n        hide\n    end\n    if <(level) = [27]> then\n        hide\n    end\n    if <(level) = [28]> then\n        go to x: (-116) y: (64)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [29]> then\n        hide\n    end\n    if <(level) = [30]> then\n        go to x: (-208) y: (152)\n        switch costume to (boss v)\n        show\n    end\nend\n\nwhen I receive [initiate v]\nforever\n    if <(costume [number v]) = [1]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            set [switch on v] to [1]\n        else\n            set [switch on v] to [0]\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            set [switch on v] to [1]\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            set [switch on v] to [1]\n            reset timer\n            set [ghost v] effect to (100)\n        else\n            if <not <<touching (player 1 v)?> or <touching (player 2 v)?>>> then\n                if <(switch on) = [1]> then\n                    repeat until <(timer) > (count)>\n                        set [ghost v] effect to ((100) - ((timer) * ((count) * (10))))\n                    end\n                    set [ghost v] effect to (0)\n                end\n                set [switch on v] to [0]\n            end\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            if <(30button) = [0]> then\n                set [30button v] to [1]\n                wait until <<not <touching (player 1 v)?>> and <not <touching (player 2 v)?>>>\n                set [30button v] to [0]\n            end\n            if <(30button) = [1]> then\n                start sound [gong fx v]\n                broadcast (ending v)\n                stop [other scripts in sprite v]\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [startagain v]\nset [switch on v] to [0]\nset [2switch on v] to [0]\nset [30button v] to [0]\n\nif <(level) = [19]> then\n    hide\n    switch costume to (timer v)\nend\nif <<(level) > [19]> and <(level) < [22]>> then\n    hide\n    switch costume to (regular v)\nend\n\n@Switch 2\n\nwhen I receive [nextlevel v]\nset [switch on v] to [0]\nset [brightness v] effect to (0)\nset size to (100) %\n\nwhen I receive [initiate v]\nhide\nset size to (100) %\nforever\n    if <(level) < [5]> then\n        hide\n    end\n    if <(level) = [5]> then\n        go to x: (136) y: (94)\n        switch costume to (regular v)\n        show\n    end\n    if <(level) = [6]> then\n        go to x: (143) y: (-53)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [7]> then\n        hide\n        set size to (100) %\n    end\n    if <(level) = [8]> then\n        hide\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [10]> then\n        go to x: (-24) y: (57)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [11]> then\n        set size to (100) %\n        hide\n    end\n    if <(level) = [12]> then\n        go to x: (-90) y: (145)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [13]> then\n        go to x: (-70) y: (74)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [14]> then\n        hide\n        set size to (100) %\n    end\n    if <<(level) > [14]> and <(level) < [21]>> then\n        hide\n        switch costume to (regular v)\n    end\n    if <(level) = [21]> then\n        go to x: (69) y: (29)\n        switch costume to (regular v)\n        show\n    end\n    if <(level) = [22]> then\n        hide\n    end\n    if <(level) = [23]> then\n        go to x: (-218) y: (47)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [24]> then\n        go to x: (209) y: (-152)\n        switch costume to (timer v)\n        set [count v] to [1.5]\n        show\n    end\n    if <(level) = [25]> then\n        go to x: (-94) y: (152)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [26]> then\n        hide\n    end\n    if <(level) = [27]> then\n        hide\n    end\n    if <(level) = [28]> then\n        go to x: (206) y: (64)\n        switch costume to (stay v)\n        show\n    end\n    if <(level) = [29]> then\n        hide\n    end\n    if <(level) = [30]> then\n        go to x: (208) y: (152)\n        switch costume to (boss v)\n        show\n    end\nend\n\nwhen I receive [initiate v]\nforever\n    if <(costume [number v]) = [1]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            set [2switch on v] to [1]\n        else\n            set [2switch on v] to [0]\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            if <(level) = [25]> then\n                set [switch on v] to [0]\n            else\n                set [2switch on v] to [1]\n            end\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            set [switch on v] to [1]\n            reset timer\n            set [ghost v] effect to (100)\n        else\n            if <not <<touching (player 1 v)?> or <touching (player 2 v)?>>> then\n                if <(switch on) = [1]> then\n                    repeat until <(timer) > (count)>\n                        set [ghost v] effect to ((100) - ((timer) * ((count) * (10))))\n                    end\n                    set [ghost v] effect to (0)\n                end\n                set [switch on v] to [0]\n            end\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        if <<touching (player 1 v)?> or <touching (player 2 v)?>> then\n            if <(30button) = [0]> then\n                set [30button v] to [1]\n                wait until <<not <touching (player 1 v)?>> and <not <touching (player 2 v)?>>>\n                set [30button v] to [0]\n            end\n            if <(30button) = [1]> then\n                start sound [gong fx v]\n                broadcast (ending v)\n                stop [other scripts in sprite v]\n                stop [this script v]\n            end\n        end\n    end\nend\n\n@Block 1\n\nwhen I receive [initiate v]\nforever\n    if <(level) < [5]> then\n        hide\n    end\n    if <(level) = [5]> then\n        switch costume to (long platform v)\n        go to x: (0) y: (82)\n        if <<(switch on) = [1]> or <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [6]> then\n        switch costume to (blocker v)\n        go to x: (-20) y: (-28)\n        if <not <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [7]> then\n        switch costume to (double square v)\n        go to x: (44) y: (21)\n        if <(switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [8]> then\n        hide\n    end\n    if <(level) = [9]> then\n        switch costume to (red block v)\n        go to x: (-3) y: (-77)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [10]> then\n        switch costume to (10 blue v)\n        go to x: (17) y: (-106)\n        if <(switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [11]> then\n        hide\n    end\n    if <(level) = [12]> then\n        hide\n    end\n    if <(level) = [13]> then\n        switch costume to (13 orange v)\n        go to x: (-181) y: (26)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [14]> then\n        switch costume to (red block v)\n        go to x: (69) y: (58)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [15]> then\n        switch costume to (red block v)\n        go to x: (69) y: (58)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <<(level) > [15]> and <(level) < [21]>> then\n        hide\n    end\n    if <(level) = [21]> then\n        go to x: (56) y: (-65)\n        switch costume to (22 mass v)\n        if <not <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [22]> then\n        hide\n    end\n    if <(level) = [23]> then\n        go to x: (0) y: (0)\n        switch costume to (23 slope v)\n        if <(switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [24]> then\n        switch costume to (24 wall v)\n        go to x: (0) y: (0)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [25]> then\n        go to x: (0) y: (0)\n        switch costume to (25 thing v)\n        if <(switch on) = [1]> then\n            hide\n        else\n            show\n        end\n    end\n    if <(level) = [26]> then\n        hide\n    end\n    if <(level) = [27]> then\n        hide\n    end\n    if <(level) = [28]> then\n        go to x: (0) y: (0)\n        switch costume to (28b v)\n        if <(switch on) = [1]> then\n            hide\n        else\n            show\n        end\n    end\n    if <(level) = [29]> then\n        hide\n    end\nend\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Block 2\n\nwhen I receive [initiate v]\nforever\n    if <(level) < [6]> then\n        hide\n    end\n    if <(level) = [6]> then\n        switch costume to (blocker v)\n        go to x: (-87) y: (-100)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [7]> then\n        switch costume to (wall v)\n        go to x: (42) y: (111)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [8]> then\n        hide\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [10]> then\n        switch costume to (wall v)\n        go to x: (27) y: (123)\n        if <not <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [11]> then\n        hide\n    end\n    if <(level) = [12]> then\n        switch costume to (12 block v)\n        go to x: (137) y: (105)\n        if <not <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [13]> then\n        switch costume to (13 blue v)\n        go to x: (171) y: (22)\n        if <not <(2switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <<(level) > [13]> and <(level) < [21]>> then\n        hide\n    end\n    if <(level) = [21]> then\n        go to x: (-83) y: (103)\n        switch costume to (22 mass v)\n        if <not <(switch on) = [1]>> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [22]> then\n        hide\n    end\n    if <(level) = [23]> then\n        go to x: (0) y: (0)\n        switch costume to (23 slope v)\n        if <(2switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [24]> then\n        hide\n    end\n    if <(level) = [25]> then\n        go to x: (0) y: (0)\n        switch costume to (25 thing v)\n        if <(switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [26]> then\n        hide\n    end\n    if <(level) = [27]> then\n        hide\n    end\n    if <(level) = [28]> then\n        go to x: (0) y: (0)\n        switch costume to (28y v)\n        if <(2switch on) = [1]> then\n            show\n        else\n            hide\n        end\n    end\n    if <(level) = [29]> then\n        hide\n    end\nend\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Pulse Block\n\nwhen I receive [initiate v]\nforever\n    if <(level) = [12]> then\n        switch costume to (12 wall v)\n        go to x: (113) y: (79)\n        show\n        wait (1) seconds\n        hide\n        wait (1) seconds\n    end\n    if <(level) = [17]> then\n        switch costume to (19 platform v)\n        show\n        go to x: (36) y: (-86)\n        wait (1) seconds\n        go to x: (177) y: (-1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [initiate v]\nforever\n    if <(level) = [1]> then\n        hide\n    end\n    if <(level) = [13]> then\n        repeat (60)\n            hide\n        end\n    end\n    if <(level) = [18]> then\n        repeat (60)\n            hide\n        end\n    end\nend\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Clone Block\n\nwhen I receive [nextlevel v]\nif <(level) = [30]> then\n    BLOCK INVASION\nelse\n    hide\nend\n\nwhen I start as a clone\nif <((cloneID) mod (3)) = [1]> then\n    set y to (95)\nend\nif <((cloneID) mod (3)) = [2]> then\n    set y to (35)\nend\nif <((cloneID) mod (3)) = [0]> then\n    set y to (-25)\nend\nif <((cloneID) mod (8)) = [1]> then\n    set x to (-210)\n    set [clonex v] to [-210]\n    switch costume to (blue v)\nend\nif <((cloneID) mod (8)) = [2]> then\n    set x to (-150)\n    set [clonex v] to [-150]\n    switch costume to (orange v)\nend\nif <((cloneID) mod (8)) = [3]> then\n    set x to (-90)\n    set [clonex v] to [-90]\n    switch costume to (blue v)\nend\nif <((cloneID) mod (8)) = [4]> then\n    set x to (-30)\n    set [clonex v] to [-30]\n    switch costume to (orange v)\nend\nif <((cloneID) mod (8)) = [5]> then\n    set x to (30)\n    set [clonex v] to [30]\n    switch costume to (blue v)\nend\nif <((cloneID) mod (8)) = [6]> then\n    set x to (90)\n    set [clonex v] to [90]\n    switch costume to (orange v)\nend\nif <((cloneID) mod (8)) = [7]> then\n    set x to (150)\n    set [clonex v] to [150]\n    switch costume to (blue v)\nend\nif <((cloneID) mod (8)) = [0]> then\n    set x to (210)\n    set [clonex v] to [210]\n    switch costume to (orange v)\nend\nshow\nforever\n    if <((cloneID) mod (3)) = [2]> then\n        change x by (-3)\n        change [clonex v] by (-3)\n        if <(cloneX) = [-240]> then\n            set x to (240)\n            set [clonex v] to [240]\n        end\n    else\n        change x by (3)\n        change [clonex v] by (3)\n        if <(cloneX) = [240]> then\n            set x to (-240)\n            set [clonex v] to [-240]\n        end\n    end\nend\n\ndefine BLOCK INVASION\nset [cloneid v] to [0]\nrepeat (24)\n    change [cloneid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [initiate v]\nhide\n\n@Boss\n\nwhen I receive [initiate v]\nhide\n\nwhen I receive [nextlevel v]\nif <(level) = [30]> then\n    forever\n        wait (2.5) seconds\n        set [target v] to [1]\n        create clone of (_myself_ v)\n        wait (2.5) seconds\n        set [target v] to [2]\n        create clone of (_myself_ v)\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (0) y: (150)\npoint towards (join [Player ] (target))\nshow\nrepeat until <touching (_edge_ v)?>\n    move (5) steps\nend\ndelete this clone\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Ending\n\nwhen I receive [initiate v]\nhide\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen I receive [ending v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nswitch costume to (white v)\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nset [brightness v] effect to (100)\nset [ghost v] effect to (0)\nwait (0.5) seconds\nswitch costume to (end screen v)\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\nclear graphic effects\n\n@Particles\n\nwhen I receive [initiate v]\nforever\n    if <<((Effects) mod (2)) = [1]> and <(level) < [30]>> then\n        go to [front v] layer\n        wait (0.3) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nif <(level) = [27]> then\n    set x to (([x position v] of [goal v]) + (23))\n    set y to (pick random (([y position v] of [goal v]) - (15)) to (([y position v] of [goal v]) + (15)))\nelse\n    set x to (pick random (([x position v] of [goal v]) - (15)) to (([x position v] of [goal v]) + (15)))\n    set y to (([y position v] of [goal v]) - (23))\nend\nset [ghost v] effect to (0)\nshow\nrepeat (25)\n    if <(level) = [27]> then\n        change x by (-2)\n    else\n        change y by (2)\n    end\n    change [ghost v] effect by (4)\n    if <([costume # v] of [goal v]) = [2]> then\n        switch costume to (green v)\n    end\n    if <([costume # v] of [goal v]) = [4]> then\n        switch costume to (orange v)\n    end\n    if <([costume # v] of [goal v]) = [6]> then\n        switch costume to (blue v)\n    end\nend\ndelete this clone\n\nwhen I receive [ending v]\nstop [other scripts in sprite v]\n\n@Thumbnail\n\nwhen I receive [initiate v]\nrepeat (4)\n    change [ghost v] effect by (25)\nend\nhide\nset volume to (50) %\nforever\n    play sound [Jolly Jump part 1 v] until done\n    play sound [Jolly Jump part 2 v] until done\nend\n\nset [ghost v] effect to (0)\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide variable [level v]\nhide variable [fails v]\nset [effects v] to [1]\nshow\n\nwhen [m v] key pressed\nif <not <(volume) = [0]>> then\n    set volume to (0) %\nelse\n    set volume to (50) %\nend\nwait until <not <key (m v) pressed?>>\n\nwhen I receive [nextlevel v]\nif <(level) = [30]> then\n    stop [other scripts in sprite v]\n    forever\n        play sound [2PP \(final level\) v] until done\n    end\nend\n\n
Please check out Chromatic Platformer! Its better\nhttps://scratch.mit.edu/projects/1006017578\n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nAll your jelly friends have been captured and you need to save them! Use your W-A-S-D keys or the mobile controls to traverse and complete the levels!\n - - - - - - \nPart 1: https://scratch.mit.edu/projects/735114130/\nPart 2: https://scratch.mit.edu/projects/891169919/\nPart 3: https://scratch.mit.edu/projects/891248905/\nPart 4: https://scratch.mit.edu/projects/767402096/\nPart 5: https://scratch.mit.edu/projects/891918441\nBEFORE YOU SAY THERE ISNT SPIKES, PART 3 AND ABOVE HAVE SPIKES!\n\nOTHER GAMES:\nTangerine Triumph: https://scratch.mit.edu/projects/893629582/