Friends- a platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        switch backdrop to (backdrop3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        switch costume to (backdrop2 v)\n    end\nend\n\n@Sprite6\n\n@Player\n\ndefine reset\nclear graphic effects\ngo to x: (-200) y: (-50)\npoint in direction (90)\nset [dead? v] to [0]\nset [x v v] to [0]\nset [button down. v] to [0]\nset [y v v] to [0]\nset [dead v] to [0]\nset size to (100) %\nplay sound [Zoop v] until done\nshow\n\nwhen I receive [next level v]\nset [change? v] to [1]\nreset\nset [change? v] to [0]\n\nwhen I receive [alright bros let's go v]\nset [level v] to [1]\nset [dead? v] to [0]\nset size to (100) %\nreset\nforever\n    go to [front v] layer\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (.9)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change x by ((X v) * (-2))\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 <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [13]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-0.8)\n    change y by (Y v)\n    if <touching (ground v)?> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground 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 [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <<<<<touching (killer wheel v)?> or <touching (spikes v)?>> or <touching (killer wheel2 v)?>> or <touching (lightning v)?>> and <(dead?) = [0]>> then\n        Spin off screen\n    end\n    if <touching (jump pad v)?> then\n        set [y v v] to [20]\n    end\nend\n\nwhen I receive [alright bros let's go v]\nforever\n    set [direction v] to (direction)\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [240]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [alright bros let's go v]\nforever\n    if <(y position) = [-179]> then\n        Spin off screen\n    end\nend\n\nwhen [r v] key pressed\nif <(dead?) = [0]> then\n    reset\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [alright bros let's go v]\nshow\n\ndefine Spin off screen\nset [dead? v] to [1]\nchange [player death v] by (1)\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nreset\n\nwhen I receive [alright bros let's go v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (center2 v)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nbroadcast (alright bros let's go v)\n\nwhen flag clicked\nforever\n    if <(dead) = [1]> then\n        reset\n    end\nend\n\nwhen flag clicked\nforever\nend\n\nwhen flag clicked\nforever\n    if <(reset) = [1]> then\n        reset\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        if <key (1 v) pressed?> then\n            set [level v] to [11]\n            reset\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Restart the plattformer) = [1]> then\n        reset\n    end\nend\n\n@Ground\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch costume to (costume5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch costume to (costume6 v)\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        switch costume to (costume7 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        switch costume to (costume8 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        switch costume to (costume9 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        switch costume to (costume10 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        switch costume to (costume11 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        switch costume to (costume11 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [12]> then\n        switch costume to (costume12 v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (1) y: (-31)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        switch costume to (costume13 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        switch costume to (costume14 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [15]> then\n        switch costume to (costume15 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [16]> then\n        switch costume to (costume16 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        if <(Button down.) = [0]> then\n            switch costume to (costume17 v)\n        else\n            switch costume to (costume18 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        show\n        switch costume to (costume19 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        show\n        switch costume to (costume20 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        switch costume to (costume22 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [20]> then\n        switch costume to (costume21 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        if <key (1 v) pressed?> then\n            set [level v] to [11]\n        end\n    end\nend\n\nset [level v] to [12]\n\n@Deco\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        show\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        show\n        switch costume to (costume3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch costume to (costume4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch backdrop to (backdrop2 v)\n    end\nend\n\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        switch costume to (costume1 v)\n    end\nend\n\n@spike.\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        show\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set [dead v] to [1]\n    end\nend\n\nwhen flag clicked\nset [dead v] to [0]\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch costume to (costume3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        show\n        switch costume to (costume4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [7]> then\n        switch costume to (costume5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        switch costume to (costume6 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [13]> then\n        show\n        switch costume to (costume7 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [14]> then\n        switch costume to (costume8 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [15]> then\n        switch costume to (costume9 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [16]> then\n        switch costume to (costume9 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [16]> then\n        switch costume to (costume10 v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        show\n        switch costume to (costume12 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [19]> then\n        show\n        switch costume to (costume12 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [18]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [20]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nshow\nforever\n    if <touching (player v)?> then\n        wait (1) seconds\n        if <touching (player v)?> then\n            say [You found the hidden easter egg! \(the sun XD\)] for (4) seconds\n            if <touching (player v)?> then\n                ask [Do you want to go to a certain level? y/n] and wait\n                if <(answer) = [y]> then\n                    ask [Which level do you want to go to? ] and wait\n                    set [level v] to (answer)\n                    set [reset v] to [1]\n                    wait (0.1) seconds\n                    set [reset v] to [0]\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [reset v] to [0]\n\n@Sprite3\n\nwhen flag clicked\nshow\nsay [Hello! if you want to hide me press h, s to show me again. XD] for (5) seconds\n\nwhen [h v] key pressed\nset [condition v] to [0]\nhide\n\nwhen [s v] key pressed\nset [condition v] to [1]\nshow\n\nwhen flag clicked\nforever\n    go to (mouse-pointer v)\nend\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <(condition) = [1]> then\n        if <mouse down?> then\n            set size to (50) %\n            play sound [A Elec Bass v] until done\n            wait (0.1) seconds\n        else\n            set size to (100) %\n        end\n    end\nend\n\nif  then\n\nwhen flag clicked\nset [condition v] to [1]\n\n@Sprite4\n\nwhen flag clicked\nforever\n    if <(Button down.) = [0]> then\n        switch costume to (costume1 v)\n    else\n        if <(Button down.) = [1]> then\n            switch costume to (costume3 v)\n            show\n            wait (1) seconds\n            switch costume to (costume4 v)\n            wait (1) seconds\n            switch costume to (costume5 v)\n            wait (1) seconds\n            switch costume to (costume6 v)\n            wait (1) seconds\n            switch costume to (costume7 v)\n            wait (1) seconds\n            forever\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Button down.) = [0]> then\n        if <(Level) = [17]> then\n            show\n        end\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen flag clicked\nset [button down. v] to [0]\n\nwhen flag clicked\nforever\n    if <(Level) = [17]> then\n        if <touching (player v)?> then\n            set [button down. v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nswitch costume to (costume1 v)\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        go to x: (114) y: (-69)\n        show\n        wait (1) seconds\n        glide (3) secs to (player v)\n        forever\n            glide (0.1) secs to (player v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        say [Hi, my friend.] for (4) seconds\n        stop [this script v]\n    end\nend\n\nsay [Hi, my friend.]\n\nwhen flag clicked\n\nturn right (15) degrees\n\nturn left (10) degrees\n\nwhen flag clicked\nforever\n    if <(Show him) = [0]> then\n        if <(Level) = [20]> then\n            hide\n        end\n    else\n        show\n    end\nend\n\nif  then\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                hide\n                set [level v] to [1]\n                set [restart the plattformer v] to [1]\n                set [show him v] to [1]\n                wait (0.1) seconds\n                set [restart the plattformer v] to [0]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [21]> then\n        show\n    end\nend\n\nwhen flag clicked\nset [restart the plattformer v] to [0]\n\nwhen flag clicked\nforever\n    if <(Restart the plattformer) = [1]> then\nend\n\nwhen flag clicked\nset [show him v] to [0]\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n
Go here too: https://scratch.mit.edu/projects/435670854/   Arrow keys or wasd to move r to restart. Advertising allowed. Try to rescue your friend at the end of the platformer. Pls love and fave I spent a lot of time in this platformer. It took me like a week! Mobile friendly!!! Spam green flag! Try to find the easter egg! Read notes and credits.