Red (For SDS) Story Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (red v)\nforever\n    play sound [Faded v] until done\nend\n\n@Ground\n\nwhen flag clicked\nrepeat until <(Level) = [9]>\n    switch costume to (Level)\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-224) y: (0)\nset [level v] to [1]\nset [sy v] to [0]\nset [falling v] to [10]\nforever\n    change [sy v] by (-1)\n    change y by (SY)\n    Touch Ground <(SY) > [0]>\n    if <key (up arrow v) pressed?> then\n        if <<(Jump Key) = [0]> and <(Falling) < [3]>> then\n            set [sy v] to [14]\n            set [falling v] to [5]\n            set [jump key v] to [1]\n        end\n    else\n        set [jump key v] to [0]\n    end\n    if <key (left arrow v) pressed?> then\n        Walk [-4]\n    end\n    if <key (right arrow v) pressed?> then\n        Walk [4]\n    end\n    if <<(y position) < [-180]> or <touching color (#d2cccc)?>> then\n        go to x: (-269) y: (0)\n        set [sy v] to [0]\n    end\n    if <[219] < (x position)> then\n        go to x: (-269) y: (0)\n        change [level v] by (1)\n    end\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 [sy v] to [0]\nend\n\ndefine Walk (speed)\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))\nend\n\n@Thumb\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\n\n@Special Ground\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\n    if <(costume [number v]) = [9]> then\n        broadcast (message1 v)\n    end\nend\n\n@Special Ground2\n\nwhen I receive [message1 v]\nshow\n\nwhen flag clicked\nhide\n\n
in game Yay got in SDS \nI fixed the end glitch