Platformer Race
@Stage\n\nwhen flag clicked\nbroadcast (Initialise v) and wait\nbroadcast (Menu v)\n\nwhen I receive [menu v]\nforever\n    if <(Change Color?) = [True]> then\n        change [color v] effect by (0.1)\n    else\n        set [color v] effect to (0)\n    end\nend\n\nwhen I receive [initialise v]\nset [change color? v] to [True]\n\n@Person\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<key (up arrow v) pressed?> and <([abs v] of (speed) ) > [3]>> then\n        if <(wall jump) = [0]> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [11]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-8))\nelse\n    change [frame v] by ((speed) / (8))\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen I receive [initialise v]\ndelete all of [level 1 data v]\nshow list [level save data v]\nset [level v] to [1]\ngo to x: (-197) y: (96)\nhide\n\nwhen I receive [play v]\nwait until <(Go!) = [True]>\nset rotation style [left-right v]\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [username v] to (username)\nset [on? v] to [1]\nforever\n    if <<(speed y) < [4]> or <key (up arrow v) pressed?>> then\n        change [speed y v] by (-1)\n    else\n        change [speed y v] by (-2)\n    end\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        set [speed x v] to ((speed x) * (0.7))\n        if <key (left arrow v) pressed?> then\n            change [speed x v] by (-3)\n        end\n        if <key (right arrow v) pressed?> then\n            change [speed x v] by (3)\n        end\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x)\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x)\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <key (up arrow v) pressed?> then\n        if <<(jump key) = [0]> and <(falling?) < [3]>> then\n            set [speed y v] to [14]\n            set [falling? v] to [6]\n            set [jump key v] to [1]\n        end\n    else\n        set [jump key v] to [0]\n    end\n    if <(y position) = [-183]> then\n        go to x: (-219) y: (-66)\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <(x position) > [240]> then\n        go to x: (-219) y: (-66)\n        change [level v] by (1)\n        broadcast (Next Level v) and wait\n    end\nend\n\ngo to x: (-197) y: (96)\n\nwhen I receive [play v]\ndelete all of [level save data v]\nwait until <(Go!) = [True]>\nforever\n    Add Data\nend\n\ndefine Add Data\nadd (Level) to [level save data v]\nadd (join (x position) (join [ ] (y position))) to [level save data v]\nadd (direction) to [level save data v]\n\nwhen I receive [play v]\nforever\n    if <(Level) = [10]> then\n        stop [other scripts in sprite v]\n        Encode Data\n        broadcast (Level Data Button v)\n        stop [this script v]\n    end\nend\n\ndefine Encode Data\nset [save data v] to []\nset [i v] to [1]\nrepeat (length of (Level Save Data))\n    set [save data v] to (join (Save Data) (join [ ] (item (I) of [level save data v])))\n    change [i v] by (1)\nend\ndelete all of [level save data v]\nadd (Save Data) to [level save data v]\n\nwhen I receive [show data v]\nhide list [level save data v]\n\ngo to x: (-197) y: (96)\n\n@Ground\n\nwhen I receive [initialise v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (level1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Copying Person\n\nwhen I receive [initialise v]\ngo to x: (-197) y: (96)\nhide\n\nwhen I receive [play v]\nif <not <(Level 1 Data) = []>> then\n    hide\n    set [showing v] to [1]\n    set [x v] to [2]\n    set [y v] to [3]\n    set [costume# v] to [4]\n    wait until <(Go!) = [True]>\n    repeat ((ISNT) / (3))\n        if <([costume # v] of [ground v]) = (item (Showing) of [level 1 data v])> then\n            show\n        else\n            hide\n        end\n        go to x: (item (X) of [level 1 data v]) y: (item (Y) of [level 1 data v])\n        point in direction (item (Costume#) of [level 1 data v])\n        change [x v] by (4)\n        change [y v] by (4)\n        change [showing v] by (4)\n        change [costume# v] by (4)\n    end\n    if <(Win?) = [False]> then\n        set [win? v] to [Win Copying]\n    end\nend\n\n@Buttons\n\nwhen I receive [initialise v]\nset [go! v] to [False]\nclear graphic effects\nset [clone id v] to [0]\nset size to (150) %\ngo to x: (0) y: (0)\nhide\nset [win? v] to [False]\n\nwhen I receive [menu v]\nrepeat (2)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nif <(Clone ID) = [1]> then\n    forever\n        switch costume to (play v)\n        go to x: (0) y: (50)\n        Sensing [2]\n    end\nelse\n    if <(Clone ID) = [2]> then\n        forever\n            switch costume to (load v)\n            go to x: (0) y: (-10)\n            if <touching (mouse-pointer v)?> then\n                set [ghost v] effect to (20)\n                if <mouse down?> then\n                    delete all of [raw data v]\n                    ask [Paste save code here:] and wait\n                    set [data feed v] to (answer)\n                    Decode Data\n                    wait (0.1) seconds\n                end\n            else\n                set [ghost v] effect to (-10)\n            end\n        end\n    end\nend\nif <(Clone ID) = [3]> then\n    show\n    set size to (0) %\n    switch costume to (3 v)\n    repeat (10)\n        change size by (((100) - (size)) / (3))\n    end\n    repeat (10)\n        change size by (((-100) - (size)) / (3))\n    end\n    hide\n    wait (0.5) seconds\n    show\n    set size to (0) %\n    switch costume to (2 v)\n    repeat (10)\n        change size by (((100) - (size)) / (3))\n    end\n    repeat (10)\n        change size by (((-100) - (size)) / (3))\n    end\n    hide\n    wait (0.5) seconds\n    show\n    set size to (0) %\n    switch costume to (1 v)\n    repeat (10)\n        change size by (((100) - (size)) / (3))\n    end\n    repeat (10)\n        change size by (((-100) - (size)) / (3))\n    end\n    hide\n    wait (0.5) seconds\n    show\n    set size to (0) %\n    switch costume to (go! v)\n    set [go! v] to [True]\n    repeat (10)\n        change size by (((100) - (size)) / (3))\n    end\n    repeat (10)\n        change size by (((-100) - (size)) / (3))\n    end\n    hide\n    delete this clone\nend\nif <(Clone ID) = [4]> then\n    forever\n        go to [front v] layer\n        switch costume to (save v)\n        go to x: (0) y: (0)\n        Button\n    end\nelse\n    forever\n        if <(Clone ID) = [5]> then\n            set size to (100) %\n            go to x: (0) y: (0)\n            go to [front v] layer\n            go [backward v] (1) layers\n            if <not <(Win?) = [Win Copying]>> then\n                set [win? v] to [You Win!]\n                switch costume to (you win! v)\n            else\n                switch costume to (lost! v)\n            end\n        end\n    end\nend\n\ndefine Sensing (which?)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (20)\n        if <<mouse down?> and <(which?) = [2]>> then\n            broadcast (Play v) and wait\n            hide\n        end\n    else\n        set [ghost v] effect to (-10)\n    end\nend\n\ndefine Decode Data\ndelete all of [level length v]\ndelete all of [level 1 data v]\ndelete (all) of [level 1 data v]\nset [i v] to [1]\nset [isnt v] to [1]\nset [data v] to []\nadd [] to [level 1 data v]\nrepeat (length of (Data feed))\n    set [data v] to (join (DATA) (letter (I) of (Data feed)))\n    replace item (ISNT) of [level 1 data v] with (DATA)\n    change [i v] by (1)\n    if <(length of (round (DATA))) = [7]> then\n        say [Invalid Data] for (4) seconds\n        stop [this script v]\n    end\n    if <(letter (I) of (Data feed)) = [ ]> then\n        add [] to [level 1 data v]\n        set [data v] to []\n        change [isnt v] by (1)\n    end\nend\n\nwhen I receive [play v]\nstop all sounds\nset [change color? v] to [False]\ndelete this clone\n\nwhen I receive [play v]\nwait (0.1) seconds\nset [clone id v] to [3]\ncreate clone of (_myself_ v)\n\nwhen I receive [level data button v]\nset [clone id v] to [4]\ncreate clone of (buttons v)\nset [clone id v] to [5]\ncreate clone of (buttons v)\n\ndefine Button\nif <touching (mouse-pointer v)?> then\n    set [ghost v] effect to (20)\n    if <mouse down?> then\n        broadcast (Show Data v) and wait\n        hide\n    end\nelse\n    set [ghost v] effect to (-10)\nend\n\nwhen I receive [menu v]\nrepeat until <(Change Color?) = [False]>\n    play sound [March to Deliverance \(from Fire Emblem Echoes Shadows of Valentia\) v] until done\nend\n\nwhen I receive [play v]\nrepeat until <(Clone ID) = [4]>\n    play sound [Energy Drink \(Chiptune Inflated Remix\) v] until done\nend\n\n@Thumbnail\n\nwhen I receive [initialise v]\ngo to x: (0) y: (0)\nshow\nhide\n\n
Will someone be able to suggest this to be featured?\n\nArrows keys to move | Press the save button at the end to save your code | Copy (By Triple Clicking) and paste your code into the box that appears | Race yourself or someone else!\nRemember: Paste a save code to race with someone else.\n\nPaste Save Codes Here: https://scratch.mit.edu/discuss/topic/345280/?page=1#post-3482538