World ll A scrolling platformer #games #all

Instructions: GENERIC\n\n-------World || Mobile friendly scrolling platformer-------\n\nA b o u t\nHello and welcome to my newest game! I'ts called world and i'ts a mobile friendly scrolling platformer. Your goal is to find the end, and it will be a journey you never forget. Hope you like it!\n\nI n s t r u c t i o n s\nUse WASD, arrow keys or tap to move, get trough the whole world to find the goal. Don't touch spikes! And don't forget, spam the green flag!

@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\n@Blanc\n\n@player\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            set [☁ p4 v] to (value)\n        end\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (X) to encoded\nwrite (y) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine setup players\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\nend\n\ndefine setup players\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset size to (pick random (150) to (250)) %\ngo to x: (pick random (-231) to (231)) y: (173)\nrepeat until <<<touching (art v)?> or <<touching (player v)?> or <touching (platforms v)?>>> or <touching (_edge_ v)?>>\n    change y by (-3)\nend\ndelete this clone\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [400]\nset [scroll x v] to [0]\nset [scroll y v] to [400]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>>> then\n    change [sx v] by (-2)\n    switch costume to (player_center2 v)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>> then\n    change [sx v] by (2)\n    switch costume to (player_center3 v)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [10]\n        if <key (up arrow v) pressed?> then\n            set [sy v] to [15]\n        end\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (X)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-200]> then\n    set [exit v] to [die]\nend\n\ndefine Change Player y by (sy)\nif <not <touching (water v)?>> then\n    change [y v] by (sy)\n    change [in air v] by (1)\nelse\n    change [y v] by ((sy) / (5))\n    set [in air v] to [0]\nend\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((X) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [tick v]\n\nwhen flag clicked\nset [timer v] to [0.1]\nforever\n    set [timer v] to (timer)\nend\n\nwhen I receive [tick v]\nif <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (d v) pressed?> or <key (a v) pressed?>>>>> then\n    switch costume to (player_center v)\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen flag clicked\nchange [☁ demo v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (exit v)?> then\n        switch costume to (costume2 v)\n    end\nend\n\n@platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 2 v)\n    Clone at x: [360] y: [400]\n    switch costume to (level 1 3 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 4 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 5 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 7 v)\n    Clone at x: [360] y: [470]\n    switch costume to (level 1 8 v)\n    Clone at x: [200] y: [500]\n    switch costume to (level 1 9 v)\n    Clone at x: [200] y: [570]\n    switch costume to (level 1 10 v)\n    Clone at x: [300] y: [600]\n    switch costume to (level 1 11 v)\n    Clone at x: [300] y: [0]\n    switch costume to (level 1 12 v)\n    Clone at x: [300] y: [0]\n    switch costume to (level 1 13 v)\n    Clone at x: [300] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 1 4 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nClone at x: [300] y: [0]\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 2 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 3 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 4 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 5 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 6 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 7 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 8 v)\n    Clone at x: [560] y: [5]\n    switch costume to (level 1 9 v)\n    Clone at x: [560] y: [5]\n    switch costume to (level 1 10 v)\n    Clone at x: [560] y: [5]\n    switch costume to (level 1 11 v)\n    Clone at x: [560] y: [5]\n    switch costume to (level 1 12 v)\n    Clone at x: [560] y: [5]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [458] y: [-100]\n        switch costume to (level 2 3 v)\n        Clone at x: [456] y: [-103]\n        switch costume to (level 2 3 v)\n        Clone at x: [575] y: [-104]\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nwhen flag clicked\nswitch costume to (level 1 1 v)\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Exit\n\nwhen flag clicked\nswitch costume to (open v)\nforever\n    if <touching (player v)?> then\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nforever\n    broadcast (Flip v)\n    wait (0.1) seconds\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [Open]> and <touching (player v)?>> then\n    set [exit v] to [Win]\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (open v)\n    Clone at x: [4333] y: [170]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [677] y: [299]\n    else\n        set [x v] to [-99999]\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (open v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Blank\n\n@backround things\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [500]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 5 v)\n    Clone at x: [360] y: [590]\n    switch costume to (level 1 6 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 7 v)\n    Clone at x: [700] y: [670]\n    switch costume to (level 1 8 v)\n    Clone at x: [500] y: [0]\n    switch costume to (level 1 9 v)\n    Clone at x: [1000] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 1 5 v)\n        Clone at x: [0] y: [350]\n        Clone at x: [450] y: [100]\n    else\n        switch costume to (level 1 7 v)\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nwhen flag clicked\nif <(position) = [897,308]> then\n    switch costume to (level 1 5 v)\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\ngo to [front v] layer\nshow variable [coins v]\n\nwhen [timer v] > (Timer)\nset [ghost v] effect to (0)\nshow\ngo to [front v] layer\nhide variable [coins v]\nstop [all v]\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@platforms2\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nset size to (100) %\nforever\n    repeat (10)\n        change size by (5)\n    end\n    repeat (10)\n        change size by (-5)\n    end\nend\n\n@Water\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((X) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    switch costume to (level 1 2 v)\n    Clone at x: [248] y: [-28]\n    switch costume to (level 1 3 v)\n    Clone at x: [248] y: [-28]\n    switch costume to (level 1 4 v)\n    Clone at x: [248] y: [-28]\n    switch costume to (level 1 5 v)\n    Clone at x: [248] y: [-28]\n    switch costume to (level 1 6 v)\n    Clone at x: [460] y: [0]\n    switch costume to (level 1 7 v)\n    Clone at x: [460] y: [0]\n    switch costume to (level 1 8 v)\n    Clone at x: [460] y: [0]\n    switch costume to (level 1 9 v)\n    Clone at x: [460] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 1 4 v)\n        Clone at x: [360] y: [0]\n        Clone at x: [360] y: [0]\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nset [y v] to (y)\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@wind\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [bensound-summer v] until done\nend\n\n