Scratch Platformer
@Stage\n\nwhen flag clicked\nset [mosaic v] effect to (10)\nset [brightness v] effect to (-5)\nset [color v] effect to (110)\nforever\n    play sound [10 Arpanauts v] until done\nend\n\n@player\n\ndefine Platform Physics jump height: (y) move speed: (speed) fricton: (friction)\ngo to [front v] layer\nif < or <key (d v) pressed?>> then\n    change [x vel. v] by (speed)\n    point in direction (90)\nend\nif < or <key (a v) pressed?>> then\n    change [x vel. v] by ((speed) * (-1))\n    point in direction (-90)\nend\nset [x vel. v] to ((x vel.) * (friction))\nchange x by (x vel.)\nif  then\n    set [slope v] to [0]\n    repeat until <<not > or <(slope) = [8]>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if  then\n        change y by ((slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (x vel.) ) )\n            if  then\n                change x by ((([abs v] of (x vel.) ) / (x vel.)) * (-1))\n            end\n        end\n    end\nend\nchange y by (y vel.)\nif  then\n    repeat ([ceiling v] of ([abs v] of (y vel.) ) )\n        if  then\n            change y by ((([abs v] of (y vel.) ) / (y vel.)) * (-1))\n        end\n    end\n    if <<(([abs v] of (y vel.) ) / (y vel.)) = [-1]> and > then\n        set [y vel. v] to (y)\n    else\n        set [y vel. v] to [0]\n    end\nelse\n    change [y vel. v] by (-1)\nend\n\nwhen flag clicked\nset [walk v] to [6]\nforever\n    change [walk v] by (1)\n    if <(walk) > [10]> then\n        set [walk v] to [6]\n    end\n    wait (0.035) seconds\nend\n\nwhen flag clicked\nset [idle v] to [2]\nforever\n    change [idle v] by (1)\n    if <(idle) > [5]> then\n        set [idle v] to [2]\n    end\n    wait (0.06) seconds\nend\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (SETUP v) and wait\nforever\n    switch costume to (hitbox v)\n    Platform Physics jump height: [10] move speed: [2.75] fricton: [0.7]\n    if <<touching (door v)?> and <([costume name v] of [door v]) = [opena]>> then\n        repeat (25)\n            switch costume to (idle)\n            point towards (door v)\n            move ((distance to [door v]) / (10)) steps\n            change [ghost v] effect by (4)\n        end\n        change [level v] by (1)\n        broadcast (SETUP v)\n    end\n    if <<<<<touching (traps v)?> or <(y position) < [-180]>> or <key (r v) pressed?>> or <touching (spikes v)?>> or <touching (dark wizards v)?>> then\n        start sound [Crunch v]\n        switch costume to (idle)\n        broadcast (SETUP v)\n    end\n    if <(level requirements) = [0]> then\n        set [door status v] to [0]\n    else\n        set [door status v] to [1]\n    end\n    switch costume to (idle)\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>> then\n        switch costume to (walk)\n    end\n    if <(y vel.) > [0]> then\n        switch costume to (jump v)\n    end\n    if <(y vel.) < [-1]> then\n        switch costume to (idle 3 v)\n    end\nend\n\nwhen I receive [setup v]\nclear graphic effects\nshow\nset size to (175) %\ngo to x: (-200) y: (-110)\npoint in direction (90)\nset [x vel. v] to [0]\nset [y vel. v] to [0]\nif <(LEVEL) = [1]> then\n    set [level requirements v] to [3]\nelse\n    if <(LEVEL) = [2]> then\n        set [level requirements v] to [3]\n    else\n        if <(LEVEL) = [3]> then\n            set [level requirements v] to [2]\n        else\n            if <(LEVEL) = [4]> then\n                set [level requirements v] to [4]\n            else\n                if <(LEVEL) = [5]> then\n                    set [level requirements v] to [5]\n                else\n                    if <(LEVEL) = [6]> then\n                        set [level requirements v] to [4]\n                    else\n                        if <(LEVEL) = [7]> then\n                            set [level requirements v] to [1]\n                        else\n                            if <(LEVEL) = [8]> then\n                                set [level requirements v] to [3]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    set [level requirements v] to [3]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        set [level requirements v] to [5]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            stop [all v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@LEVEL\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset drag mode [not draggable v]\nset [color v] effect to (105)\nshow\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\n    switch costume to (LEVEL)\nend\n\n@collectibles\n\nwhen flag clicked\nset size to (175) %\nhide\n\ndefine SPAWN at (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\ngo to x: ((round ((x position) / (15))) * (15)) y: ((round ((y position) / (15))) * (15))\n\nwhen I start as a clone\nshow\nset size to (150) %\nforever\n    next costume\n    wait (.1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [level requirements v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [setup v]\nwait (0.05) seconds\nif <(LEVEL) = [1]> then\n    SPAWN at [-30] [-140]\n    SPAWN at [0] [-140]\n    SPAWN at [30] [-140]\nelse\n    if <(LEVEL) = [2]> then\n        SPAWN at [-82] [-122]\n        SPAWN at [15] [-87]\n        SPAWN at [110] [-52]\n    else\n        if <(LEVEL) = [3]> then\n            SPAWN at [-45] [-120]\n            SPAWN at [45] [-120]\n        else\n            if <(LEVEL) = [4]> then\n                SPAWN at [-47] [-100]\n                SPAWN at [63] [-60]\n                SPAWN at [178] [-23]\n                SPAWN at [40] [40]\n            else\n                if <(LEVEL) = [5]> then\n                    SPAWN at [0] [-130]\n                    SPAWN at [196] [-80]\n                    SPAWN at [-194] [15]\n                    SPAWN at [0] [100]\n                    SPAWN at [135] [75]\n                else\n                    if <(LEVEL) = [6]> then\n                        SPAWN at [158] [-65]\n                        SPAWN at [51] [-28]\n                        SPAWN at [-60] [15]\n                        SPAWN at [-157] [55]\n                    else\n                        if <(LEVEL) = [7]> then\n                            SPAWN at [0] [-110]\n                        else\n                            if <(LEVEL) = [8]> then\n                                SPAWN at [0] [-75]\n                                SPAWN at [-85] [-75]\n                                SPAWN at [85] [-75]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    SPAWN at [56] [-35]\n                                    SPAWN at [-45] [-65]\n                                    SPAWN at [0] [15]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        SPAWN at [-84] [-115]\n                                        SPAWN at [37] [-115]\n                                        SPAWN at [-45] [-15]\n                                        SPAWN at [150] [60]\n                                        SPAWN at [-24] [120]\n                                    else\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\ndelete this clone\n\n@TB\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nshow\ngo to [front v] layer\n\ngo to x: (0) y: (0)\n\n@Door\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\n    set size to (150) %\n    switch costume to (door status)\n    set [color v] effect to (110)\n    set [brightness v] effect to (0)\n    if <(LEVEL) = [1]> then\n        go to x: (185) y: (-133)\n    else\n        if <(LEVEL) = [2]> then\n            go to x: (185) y: (-42)\n        else\n            if <(LEVEL) = [3]> then\n                go to x: (185) y: (-133)\n            else\n                if <(LEVEL) = [4]> then\n                    go to x: (-110) y: (88)\n                else\n                    if <(LEVEL) = [5]> then\n                        go to x: (0) y: (-32)\n                    else\n                        if <(LEVEL) = [6]> then\n                            go to x: (140) y: (130)\n                        else\n                            if <(LEVEL) = [7]> then\n                                go to x: (185) y: (-133)\n                            else\n                                if <(LEVEL) = [8]> then\n                                    go to x: (185) y: (-80)\n                                else\n                                    if <(LEVEL) = [9]> then\n                                        go to x: (199) y: (67)\n                                    else\n                                        if <(LEVEL) = [10]> then\n                                            go to x: (-197) y: (98)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@spikes\n\nwhen flag clicked\nset [color v] effect to (105)\nshow\nforever\n    go to x: (0) y: (0)\n    go to [back v] layer\n    switch costume to (LEVEL)\n    set size to (150) %\nend\n\n@dark wizards\n\nwhen I start as a clone\nshow\nset size to (175) %\nforever\n    next costume\n    wait (0.06) seconds\nend\n\nwhen I receive [setup v]\ndelete this clone\n\ndefine SPAWN at (x) (y) (direction) range: (range) (1)\ngo to x: (x) y: (y)\npoint in direction (direction)\nset [attack dir v] to (1)\nset [range v] to (range)\ncreate clone of (_myself_ v)\n\nwhen I receive [setup v]\nwait (0.05) seconds\nif <(LEVEL) = [7]> then\n    SPAWN at [45] [-146] [90] range: [90] [1]\nelse\n    if <(LEVEL) = [9]> then\n        SPAWN at [100] [-101] [90] range: [135] [1]\n    else\n        if <(LEVEL) = [10]> then\n            SPAWN at [100] [-39] [90] range: [275] [1]\n            SPAWN at [-200] [-39] [-90] range: [275] [1]\n        end\n    end\nend\n\nwhen I start as a clone\nset rotation style [left-right v]\nclear graphic effects\nforever\n    point in direction ((direction) * (-1))\n    repeat ((range) / (1.2))\n        move (1.2) steps\n    end\n    point in direction ((direction) * (-1))\n    repeat ((range) / (1.2))\n        move (1.2) steps\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset size to (175) %\nhide\n\n
Trending?!?!?!?!?!?!?!?!?!?!? I can't believe it!!!! 16 March 2022\nTop Loved!! 17 March 2022 (900+ Loves)\n◉◉◉◉◉◉◉◉◉◉INSTRUCTIONS◉◉◉◉◉◉◉◉◉◉\n⫸Arrow keys, WASD or mobile controls to move\n⫸Don't touch spilt food\n⫸You slip if you touch the marbles\n⫸Walk on the ground XD\n⫸Press the skip button to skip\n⫸Smash the ♥ and ⭐ and even the follow button for more! :D\n⫸All the parts- https://scratch.mit.edu/studios/31261892/\n⫸ Ads and hate will be reported!\n◉◉◉◉◉◉◉◉◉◉◉◉FACTS◉◉◉◉◉◉◉◉◉◉◉◉\n⫸ Story inside -\n                         -\n⨞ -    -    -     -   -\n⫸ Based on school life\n⫸ A sequel\n\nPropose this to be featured here- https://scratch.mit.edu/studios/28715018/