☁【100%PEN】Multiplayer platformer
@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\nwhen I receive [end intro v]\nforever\n    repeat until <(EXIT GAME FINISH) = [1]>\n        play sound [c418-sweden-minecraft-volume-alpha v] until done\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (pick random (1) to (pick random (1) to (pick random (1) to (2))))\n\nwhen I receive [end game! v]\nwait (0.5) seconds\nforever\n    play sound [minecraft song v] until done\nend\n\nwhen I receive [end game! v]\nif <(EXIT GAME FINISH) = [1]> then\n    stop all sounds\n    clear sound effects\nend\n\n@Borders\n\nwhen flag clicked\nhide\ngo to [front v] layer\nwait (1) seconds\n\nwhen I receive [end intro v]\nshow\n\nwhen I receive [clock v]\nshow\ngo to [front v] layer\n\nwhen I receive [end game! v]\nstop [other scripts in sprite v]\n\n@CheckPoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [0]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [0]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [917] y: [150]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\n@Player\n\nwhen flag clicked\nswitch costume to (steve 1 v)\npoint in direction (90)\nhide\nset size to (50) %\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [game on v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    set [tick v] to [0]\n    broadcast (Setup v) and wait\n    GameOn\n    repeat until <(EXIT) > []>\n        change [tick v] by (1)\n        Clock\n        broadcast (Clock v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        Game-die\n    end\nend\n\ndefine GameOn\nset [in air v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [exit v] to []\nset size to (50) %\nset [ghost v] effect to (0)\nshow\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [917]\n        set [y v] to [150]\n    else\n        if <(Checkpoint) = [2]> then\n            set [x v] to [1955]\n            set [y v] to [-1]\n        else\n            if <(Checkpoint) = [3]> then\n                set [x v] to [2789]\n                set [y v] to [-79]\n            else\n                if <(Checkpoint) = [4]> then\n                    set [x v] to [4513]\n                    set [y v] to [29]\n                end\n            end\n        end\n    end\nend\n\ndefine Clock\nif <not <key (any v) pressed?>> then\n    switch costume to (regular2 v)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    switch costume to (steve 2 v)\n    change [sx v] by (-1.5)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    switch costume to (steve 1 v)\n    change [sx v] by (1.5)\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 down?> and <(mouse y) > [0]>>> then\n    if <(in air) < [5]> then\n        switch costume to (up v)\n        set [sy v] to [12]\n    end\nend\nchange [sy v] by (-2)\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)) / (5)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    switch costume to (up right v)\nend\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    switch costume to (up left v)\nend\nif <touching (platforms v)?> then\n    point in direction (90)\nend\nif <touching (water v)?> then\n    set [sy v] to [-1.5]\n    change [sy v] by (1)\n    set [brightness v] effect to (10)\nend\nif <<touching (water v)?> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>>> then\n    change [sy v] by (5)\nend\nif <touching (checkpoint4 v)?> then\n    change [exit game finish v] by (1)\n    broadcast (End Game! v) and wait\nend\n\ndefine Change Player Y by: (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\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    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 (10)\n    change size by (0.5)\n    change [ghost v] effect by (10)\nend\nswitch costume to (steve 1 v)\nhide\nwait (.01) seconds\n\ngo to x: (0) y: (78)\n\ndefine Test-die\nif <touching (lava v)?> then\n    start sound [oof v]\n    switch costume to (hurt steve v)\n    set [exit v] to [die]\nend\n\ndefine Game-Win\npoint in direction (90)\nhide\n\nwhen flag clicked\nset [exit game finish v] to [0]\n\nbroadcast (end intro v) and wait\n\nwhen I receive [end intro v]\nbroadcast (Green Flag v) and wait\nshow\nbroadcast (Game On v) and wait\n\nChange Player X By: (sx)\n\ngo to x: (0) y: (33)\n\nwait (1) seconds\n\nif <(Checkpoint) = [0]> then\n    set [x v] to [0]\n    set [y v] to [0]\nelse\n    if <(Checkpoint) = [1]> then\n        set [x v] to [1022]\n        set [y v] to [85]\n    end\nend\n\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> 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]\nelse\n    set [sx v] to [0]\nend\nhide\nwait (0.1) seconds\nshow\nwait (0.1) seconds\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (100) %\nswitch costume to (costume2 v)\nhide\nforever\n    set [timer2 v] to (timer)\nend\n\nwhen [timer v] > (Timer2)\ngo to [front v] layer\nshow\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock 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    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\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)\nchange [y v] by (y)\nnext costume\n\n@Lava\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock 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 (1.1 v)\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\n    Clone At x: [360] y: [0]\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)\nchange [y v] by (y)\nnext costume\n\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n@BG\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nPosition (((x) - (SCROLL X)) / (3)) (((y) - (SCROLL Y)) / (3))\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 (pick random (1) to (2))\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\nend\n\ndefine Position (x) (y)\nset [brightness v] effect to (5)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ngo to [back v] layer\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)\nchange [y v] by (y)\nnext costume\n\n@BG2\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nset [ghost v] effect to (20)\nPosition (((x) - (SCROLL X)) / (5)) (((y) - (SCROLL Y)) / (5))\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 (costume6 v)\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\n    Clone At x: [1000] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\nset [ghost v] effect to (25)\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)\nchange [y v] by (y)\nnext costume\n\n@BG cool\n\nwhen I receive [green flag v]\nset [brightness v] effect to (5)\nshow\n\nwhen I receive [clock 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 (costume1 v)\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\n    Clone At x: [400] y: [0]\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)\nchange [y v] by (y)\nnext costume\n\n@BG cool2\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [clock v]\nPosition (((x) - (SCROLL X)) / (50)) (((y) - (SCROLL Y)) / (50))\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 (costume2 v)\n    Clone At x: [217] y: [147]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\nif <(backdrop [number v]) = [1]> then\n    switch costume to (costume2 v)\nend\nif <(backdrop [number v]) = [2]> then\n    switch costume to (costume3 v)\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)\nchange [y v] by (y)\nnext costume\n\n@tum tum yum yums \n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nPosition (((x) + ((5) * ([sin v] of (((y) + (TICK)) * (5)) ))) - (SCROLL X)) (((y) + ((5) * ([sin v] of (((x) + (TICK)) * (15)) ))) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [burp-random v]\n    change [collected v] by (1)\n    if <(Collected) = (Collected Max)> then\n        broadcast (open portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [collected v] to [0]\nset [collected max v] to [0]\nif <(Level) = [1]> then\n    if <(lol) = [0]> then\n        Clone At x: [42] y: [-12]\n        Clone At x: [242] y: [5]\n        Clone At x: [657] y: [18]\n        Clone At x: [705] y: [69]\n        Clone At x: [810] y: [169]\n    end\n    if <(lol) = [0]> then\n        Clone At x: [1013] y: [120]\n        Clone At x: [1278] y: [30]\n        Clone At x: [1424] y: [68]\n        Clone At x: [1839] y: [20]\n    end\n    if <(lol) = [0]> then\n        Clone At x: [2133] y: [24]\n        Clone At x: [2267] y: [24]\n        Clone At x: [2412] y: [24]\n        Clone At x: [2703] y: [-81]\n    end\n    if <(lol) = [0]> then\n        Clone At x: [2806] y: [18]\n        Clone At x: [3070] y: [33]\n        Clone At x: [3213] y: [33]\n        Clone At x: [3347] y: [33]\n        Clone At x: [4161] y: [9]\n        Clone At x: [4290] y: [3]\n    end\nelse\nend\nset [x v] to [-99999]\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)\nswitch costume to (pick random (1) to (4))\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\n\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nchange [collect c. v] by (1)\n\n@intro\n\nwhen flag clicked\nshow\nif <(intro played?) = [0]> then\n    set [id v] to [5]\n    create clone of (_myself_ v)\n    set [id v] to [6]\n    create clone of (_myself_ v)\n    set [intro end animation? v] to [0]\n    set volume to (100) %\n    set [brightness v] effect to (-100)\n    go to x: (0) y: (0)\n    set size to (87) %\n    switch costume to (bg v)\n    point in direction (90)\n    show\n    go to [front v] layer\n    repeat (75)\n        change size by (((125) - (size)) / (50))\n        change [brightness v] effect by (1)\n        float\n    end\n    forever\n        float\n        change size by (((100) - (size)) / (25))\n    end\nelse\n    set [brightness v] effect to (-100)\n    wait (0.15) seconds\n    hide\n    broadcast (end intro v)\n    set [intro played? v] to [0]\nend\n\nwhen flag clicked\nset [intro: x v] to (mouse x)\nset [intro: y v] to (mouse y)\nwait until <not <mouse down?>>\nif <(mouse y) > [179]> then\n    wait until <not <(mouse x) = (Intro: x)>>\n    wait until <not <(mouse y) = (Intro: y)>>\nend\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        wait until <<not <mouse down?>> or <touching (mouse-pointer v)?>>\n        if <<touching (mouse-pointer v)?> and <(intro end animation?) = [0]>> then\n            set [intro end animation? v] to [1]\n            set [id v] to [3]\n            start sound [Hit_Hurt4 v]\n            broadcast (z intro fade v)\n            create clone of (_myself_ v)\n            wait (0.15) seconds\n            set [id v] to [4]\n            create clone of (_myself_ v)\n            repeat (15)\n                change volume by (-7.5)\n            end\n            wait (0.5) seconds\n            broadcast (end intro v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nwait (2.5) seconds\nif <(intro end animation?) = [0]> then\n    set [id v] to [1]\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.6) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\nwait (0.45) seconds\nrepeat (4)\n    set size to (150) %\n    set [brightness v] effect to (20)\n    repeat (5)\n        change [brightness v] effect by (-1)\n    end\nend\nrepeat (15)\n    change [brightness v] effect by (-1.5)\nend\nwait (0.675) seconds\nset size to (150) %\nset [brightness v] effect to (20)\nrepeat (20)\n    change [brightness v] effect by (-1)\nend\n\nwhen I start as a clone\nset [brightness v] effect to (0)\nif <(id) = [1]> then\n    point in direction (80)\n    switch costume to (logo bg v)\n    show\n    set size to (50) %\n    go to [front v] layer\n    repeat (25)\n        change size by (((100) - (size)) / (3))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\n    wait (44) seconds\n    repeat (4)\n        change size by (((-15) - (size)) / (3))\n    end\n    hide\n    delete this clone\nelse\n    if <(id) = [2]> then\n        change y by (-5)\n        point in direction (65)\n        switch costume to (logo v)\n        show\n        set size to (0) %\n        go to [front v] layer\n        repeat (25)\n            change size by (((100) - (size)) / (3))\n            turn right (((90) - (direction)) / (3)) degrees\n        end\n        wait (44) seconds\n        repeat (6)\n            change size by (((-8) - (size)) / (3))\n        end\n        hide\n        delete this clone\n    else\n        if <<(id) = [3]> or <(id) = [4]>> then\n            go to [front v] layer\n            set size to (100) %\n            go to x: (0) y: (0)\n            repeat (40)\n                switch costume to (costume2 v)\n                change size by (((2750) - (size)) / (8))\n                if <(id) = [3]> then\n                    switch costume to (costume3 v)\n                else\n                    change [brightness v] effect by (-4)\n                    switch costume to (costume1 v)\n                end\n            end\n        else\n            hide\n            set volume to (75) %\n            if <(id) = [5]> then\n                set [pan left/right v] effect to (-100)\n                play sound [monodyL v] until done\n                delete this clone\n            else\n                set [pan left/right v] effect to (100)\n                play sound [monodyR v] until done\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait (7.2) seconds\nif <(intro end animation?) = [0]> then\n    set [intro end animation? v] to [1]\n    set [id v] to [3]\n    start sound [Hit_Hurt4 v]\n    create clone of (_myself_ v)\n    wait (0.15) seconds\n    set [id v] to [4]\n    create clone of (_myself_ v)\n    wait (1) seconds\n    broadcast (end intro v)\nend\n\nwhen I start as a clone\nset [float v] to [0]\nwait (0.25) seconds\nif <(id) = [1]> then\n    repeat (27)\n        float\n    end\n    repeat (5)\n        change x by (50)\n        float\n    end\n    set x to ((x position) * (-1))\n    repeat (32)\n        change x by (((0) - (x position)) / (2))\n        float\n    end\n    set x to (0)\n    repeat (2)\n        repeat (5)\n            change y by (((25) - (y position)) / (2))\n            float\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n    end\n    repeat (5)\n        change y by (((25) - (y position)) / (2))\n        float\n    end\n    set [spin! v] to [90]\n    repeat (15)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((135) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    repeat (20)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((45) - (spin!)) / (8))\n        point in direction (spin!)\n    end\n    set [zoom v] to [0]\n    repeat (100)\n        change y by (((0) - (y position)) / (2))\n        change [spin! v] by (((90) - (spin!)) / (8))\n        point in direction (spin!)\n        change [zoom v] by (-2)\n        change size by (zoom)\n    end\nelse\n    if <(id) = [2]> then\n        repeat (27)\n            float\n        end\n        repeat (5)\n            change x by (-50)\n            float\n        end\n        set x to ((x position) * (-1))\n        repeat (32)\n            change x by (((0) - (x position)) / (2))\n            float\n        end\n        set x to (0)\n        repeat (2)\n            repeat (5)\n                change y by (((-25) - (y position)) / (2))\n                float\n            end\n            repeat (5)\n                change y by (((25) - (y position)) / (2))\n                float\n            end\n        end\n        repeat (5)\n            change y by (((-25) - (y position)) / (2))\n            float\n        end\n        set [spin! v] to [90]\n        repeat (15)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((45) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        repeat (20)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((135) - (spin!)) / (8))\n            point in direction (spin!)\n        end\n        set [zoom v] to [0]\n        repeat (100)\n            change y by (((0) - (y position)) / (2))\n            change [spin! v] by (((90) - (spin!)) / (8))\n            point in direction (spin!)\n            change [zoom v] by (-2)\n            change size by (zoom)\n        end\n    end\nend\n\ndefine float\nif <(costume [number v]) = [1]> then\n    change [float v] by (3)\n    change y by (([sin v] of (float) ) / (4))\nelse\n    if <(costume [number v]) = [3]> then\n        change [float v] by (6)\n    else\n        change [float v] by (-6)\n    end\n    change y by (([sin v] of (float) ) / (3))\n    change size by (([sin v] of (float) ) / (4))\n    turn right (([sin v] of (float) ) / (5)) degrees\nend\n\nwhen I receive [end intro v]\nstop [other scripts in sprite v]\nif <(costume [number v]) = [1]> then\n    set [intro played? v] to [0]\n    go to x: (0) y: (0)\n    switch costume to (bg2 v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [ghost v] effect to (0)\n    hide\nelse\n    delete this clone\nend\n\nwhen I receive [z intro fade v]\nif <(id) > [4]> then\n    repeat (15)\n        change volume by (-7.5)\n    end\nend\n\nwhen flag clicked\nwait (7.2) seconds\nif <(intro end animation?) = [0]> then\n    set [intro end animation? v] to [1]\n    set [id v] to [3]\n    start sound [Hit_Hurt4 v]\n    create clone of (_myself_ v)\n    wait (0.15) seconds\n    set [id v] to [4]\n    create clone of (_myself_ v)\n    wait (1) seconds\n    broadcast (end intro v)\nend\n\nwhen flag clicked\nset [intro played? v] to [1]\n\n@intro bg\n\nwhen flag clicked\nshow\n\nwhen I receive [end intro v]\nhide\n\n@Sprite1\n\n@CheckPoint2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [1]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [1]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [1955] y: [-1]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\n@Achievements \n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (27) y: (-125)\nset [ghost v] effect to (0)\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [clock v]\ngo to [front v] layer\nif <(Checkpoint) = [1]> then\n    switch costume to (1- check point 1 v)\nend\nif <(Checkpoint) = [2]> then\n    switch costume to (2- check point 2 v)\nend\nif <(Checkpoint) = [3]> then\n    switch costume to (3- check point 3 v)\nend\n\n@CheckPoint3\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [2]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [2]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [2785] y: [-90]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\nset size to (40) %\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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\n@CheckPoint4\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [clock v]\nif <(Checkpoint) = [3]> then\n    switch costume to (flag pole v)\nend\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        start sound [Coin v]\n        change [checkpoint v] by (1)\n        switch costume to (flag  v)\n    end\nend\nif <(Checkpoint) > [3]> then\n    switch costume to (flag  v)\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(Level) = [1]> then\n    Clone At x: [4513] y: [29]\nend\nset [x v] to [-99999]\n\nClone At x: [2132] y: [38]\n\ndefine Position (x) (y)\nset size to (100) %\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)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [checkpoint v] to [0]\nswitch costume to (flag pole v)\n\n@Ending!\n\nwhen flag clicked\npoint in direction (90)\nhide\n\nwhen I receive [end game! v]\ngo to [front v] layer\nshow\nwait (30) seconds\nstop [all v]\n\n
Welcome to Polytopia - A Mobile Friendly Platformer! \nControls:\n ◈ PC:\n◈ WASD or arrow keys\n ◈ Mobile:\n◈ Tap to move!\nInstructions:\n◈ Avoid spikes!\n◈ You can reset a level at any time! \n◈ You can only skip if you die 5 times in one level.\n◈ Good Luck! Don't forget to have fun!\nTry turbo mode (Shift+Green Flag) and hold the right and up arrow keys lol.