Stranded 2 | Scrolling Platformer
@Stage\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch backdrop to (Level)\nend\n\nwhen flag clicked\nforever\n    play sound [Ping Pong v] until done\nend\n\n@Player\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [level v] by (1)\n    end\n    if <touching (spikes/enemies v)?> then\n        broadcast (Reset v)\n        change [deaths v] by (1)\n    else\n        if <touching (lava v)?> then\n            broadcast (Reset v)\n            change [deaths v] by (1)\n        end\n        if <touching (spikes/enemies v)?> then\n            broadcast (Reset v)\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-200) y: (40)\n\nwhen flag clicked\nforever\n    set rotation style [left-right v]\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n    else\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            point in direction (-90)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <<mouse down?> or <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>> then\n        if <<<mouse down?> and <(mouse y) > (y position)>> or <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>>> then\n            switch costume to (player3 v)\n        else\n            switch costume to (player v)\n        end\n    else\n        if <<<mouse down?> and <(mouse y) > (y position)>> or <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>>> then\n            switch costume to (player2 v)\n        else\n            switch costume to (player4 v)\n        end\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\n\nswitch costume to (player4 v)\n\n@Ground\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        turn right (15) degrees\n    else\n        point in direction (90)\n    end\nend\n\n@Spikes/Enemies\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\nforever\n    set y to (Magma)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    set [magma v] to [0]\n    repeat (10)\n        change [magma v] by (1)\n    end\n    repeat (20)\n        change [magma v] by (-1)\n    end\n    repeat (10)\n        change [magma v] by (1)\n    end\nend\n\n@Ground2\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        turn right (15) degrees\n    else\n        point in direction (90)\n    end\nend\n\n@Thumb\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    show\nend\n\n@Counter\n\nwhen flag clicked\nhide\nset size to (65) %\ngo to x: (-220) y: (155)\nset [# v] to [1]\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by ((size) / (2.5))\n    change [# v] by (1)\nend\n\nwhen I start as a clone\nshow\nforever\n    if <not <(Deaths) > [999]>> then\n        Switch Costume to (join [#] (letter (#) of (round (Deaths))))\n    else\n        Switch Costume to (join [#] (letter (#) of (CompressedValue)))\n    end\nend\n\ndefine Switch Costume to (costume)\nif <not <(costume) = (costume [name v])>> then\n    switch costume to (costume)\n    set size to (115) %\nend\n\nwhen I start as a clone\nforever\n    change size by ((0.2) * ((100) - (size)))\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\nforever\n    set [value v] to (round (Deaths))\nend\n\nwhen flag clicked\nset [compressedvalue v] to [0]\nforever\n    If Greater Than [999] Sign [K] Length [4]\n    If Greater Than [999999] Sign [M] Length [7]\n    If Greater Than [999999999] Sign [B] Length [10]\n    If Greater Than [999999999999] Sign [T] Length [13]\n    If Greater Than [999999999999999] Sign [q] Length [16]\n    If Greater Than [999999999999999999] Sign [Q] Length [19]\n    If Greater Than [999999999999999999999] Sign [s] Length [22]\nend\n\ndefine If Greater Than (value) Sign (sign) Length (length)\nif <(Value) > (value)> then\n    if <(length of (Value)) = (length)> then\n        set [compressedvalue v] to (join (letter (1) of (Value)) (sign))\n    else\n        if <(length of (Value)) = ((length) + (1))> then\n            set [compressedvalue v] to (join (letter (1) of (Value)) (join (letter (2) of (Value)) (sign)))\n        else\n            if <(length of (Value)) = ((length) + (2))> then\n                set [compressedvalue v] to (join (letter (1) of (Value)) (join (letter (2) of (Value)) (join (letter (3) of (Value)) (sign))))\n            end\n        end\n    end\nend\n\nIf Greater Than [999999999999999999999999] Sign [S] Length [25]\nIf Greater Than [999999999999999999999999999] Sign [O] Length [28]\nIf Greater Than [999999999999999999999999999999] Sign [N] Length [31]\nIf Greater Than [999999999999999999999999999999999] Sign [D] Length [34]\nIf Greater Than [99999999999999999999999999999999999] Sign [U] Length [37]\n\n
Welcome to Toast - Platformer!\n\n▶Advertising is allowed\n▶No spamming or F4F\n▶No mean comments or else you'll be reported\n▶Please LOVE, FAVORITE, and FOLLOW ❤⭐\n▶50 Likes for a part 2! \n▶Hope you enjoy! :D\n\nRULES:\n-Arrow keys or WAD to move\n-Don't touch spikes or fall\n-Get to the Toaster to get to the other level\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n:p\n