The Way Back Home || A Scrolling Platformer                       #games #art 
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [bring the action! v]\nset volume to (100) %\nswitch backdrop to (backdrop1 v)\nforever\n    if <not <(LEVEL) = [6]>> then\n        play sound [amadeus-legendary-goaul5peld-dX237a7C v] until done\n    end\nend\n\nwhen flag clicked\n\nforever\n\nwhen I receive [setup v]\nswitch backdrop to (LEVEL)\n\nwhen I receive [outro v]\nset volume to (0) %\n\nstop all sounds\n\n@lava\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (([sin v] of ((timer) * (300)) ) * (7)))\nif <touching (you v)?> then\n    broadcast (headed v)\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 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    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 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        else\n            if <(LEVEL) = [4]> then\n                switch costume to (costume5 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            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume9 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                else\n                    if <(LEVEL) = [6]> then\n                        broadcast (Outro v)\n                    end\n                end\n            end\n        end\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)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nforever\n\nwhen I receive [bring the action! v]\n\nforever\n\nwhen I receive [bring the action! v]\n\nforever\n\nwhen I receive [headed v]\nstart sound [fatality v]\nwait until <not <touching (you v)?>>\n\nswitch costume to (end v)\n\nwhen I receive [outro v]\nhide\n\n@you\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nset size to (150) %\npoint in direction (90)\n\ncreate clone of (_myself_ v)\n\nwhen I receive [play game v]\nshow\nhide variable [mouse v]\nset [ghost v] effect to (0)\nswitch costume to (costume1 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) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset size to (80) %\npoint in direction (90)\nset [ghost v] effect to (0)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nshow\n\ndefine Tick\nset rotation style [left-right v]\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    point in direction (-90)\n    Change Player x by [-7]\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n    point in direction (90)\n    Change Player x by [7]\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [20]\n    end\nend\nchange [sy v] by (-2)\nChange Player y by (sy)\nPosition\nTest - Die\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (15)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (20)))\nif <(SCROLL Y) < [5]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\nswitch costume to (costume2 v)\n\nswitch costume to (costume1 v)\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <<not <touching (levels v)?>> and <not <touching (moving 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 (levels v)?> or <touching (moving platforms v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (levels v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (levels v)?> and <not <touching (moving 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 []\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nwait (0.5) seconds\n\ndefine Test - Die\nif <<touching (lava v)?> or <<touching (moving enemies v)?> and <(DAI) = [1]>>> then\n    set [exit v] to [die]\nend\n\nchange [ghost v] effect by (10)\nset [scroll y v] to [0]\n\ndefine Game - Win\nhide\nchange [level v] by (1)\n\nwait (0.009) seconds\nshow\n\nwhen I receive [start game v]\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to ([costume # v] of [costume selection v])\n\nswitch costume to (costume2 v)\n\nswitch costume to (([costume # v] of [costume selection v]) - (1))\n\nswitch costume to ([costume # v] of [costume selection v])\n\nwhen I receive [die v]\ngo to x: (0) y: (-62)\n\nwhen flag clicked\n\nbroadcast (Play Game v)\n\nhide\n\nshow\n\nrepeat (2)\n    change size by (-25)\nend\nwait (0.1) seconds\nrepeat (2)\n    change size by (25)\nend\nwait (0.1) seconds\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nif <<touching (moving enemies v)?> and <(DAI) = [1]>> then\n\nwhen I receive [hehe v]\nChange Player y by [6]\n\nwhen I receive [setup v]\nswitch costume to (LEVEL)\n\n@coins\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (you v)?> then\n    start sound [Coin v]\n    change [collected v] by (1)\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nswitch costume to (coin v)\nset [collected v] to [0]\nset [collected max v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [200] y: [0]\n    Clone at x: [400] y: [0]\n    Clone at x: [600] y: [50]\n    Clone at x: [850] y: [50]\n    Clone at x: [1400] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        set [color v] effect to (60)\n        Clone at x: [-210] y: [-50]\n        Clone at x: [400] y: [0]\n        Clone at x: [1300] y: [-50]\n    else\n        if <(LEVEL) = [3]> then\n            set [color v] effect to (-20)\n            Clone at x: [340] y: [150]\n            Clone at x: [806] y: [0]\n            Clone at x: [1370] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                set [color v] effect to (70)\n                Clone at x: [500] y: [0]\n                Clone at x: [1495] y: [28]\n                Clone at x: [1600] y: [6]\n            else\n                if <(LEVEL) = [5]> then\n                    set [color v] effect to (70)\n                    Clone at x: [495] y: [100]\n                    Clone at x: [700] y: [28]\n                    Clone at x: [1200] y: [6]\n                end\n            end\n        end\n    end\nend\nset [x v] to [-999999999999999]\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)\ncreate clone of (_myself_ v)\nchange [collected max v] by (1)\n\nwhen I receive [tick v]\nif <(COLLECTED) = (COLLECTED MAX)> then\n    broadcast (open portal v)\nend\nnext costume\n\nwhen I start as a clone\nif <touching (you v)?> then\n    change [collected v] by (1)\n    delete this clone\nend\n\nClone at x: [715] y: [40]\nClone at x: [1100] y: [110]\n\nswitch costume to (coin v)\n\nswitch costume to (coin v)\n\ndelete this clone\n\nwhen I receive [elsa v]\nstop [other scripts in sprite v]\n\nwhen I receive [elsa v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [elsa v]\n\nforever\n    next costume\n    hide\n    stop [other scripts in sprite v]\nend\n\nClone at x: [795] y: [55]\nClone at x: [1634] y: [-70]\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nhide\n\nClone at x: [1370] y: [115]\n\n@levels\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nshow\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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 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    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 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        else\n            if <(LEVEL) = [4]> then\n                switch costume to (costume4 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            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume9 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                end\n            end\n        end\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)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [start menu v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [outro v]\nrepeat (50)\n    hide\nend\n\nwhen I receive [outro v]\nforever\n    hide\nend\n\n@exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) (((y) - (SCROLL Y)) + (([sin v] of ((timer) * (400)) ) * (20)))\npoint in direction ((([cos v] of ((timer) * (400)) ) * (20)) + (90))\nif <<(costume [name v]) = [open]> and <touching (you v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    go to [back v] layer\n    switch costume to (closed v)\n    Clone at x: [2050] y: [50]\nelse\n    if <(LEVEL) = [2]> then\n        set [color v] effect to (90)\n        go to [back v] layer\n        switch costume to (closed v)\n        Clone at x: [2050] y: [200]\n    else\n        if <(LEVEL) = [3]> then\n            set [color v] effect to (140)\n            go to [back v] layer\n            switch costume to (closed v)\n            Clone at x: [2000] y: [-20]\n        else\n            if <(LEVEL) = [4]> then\n                set [color v] effect to (40)\n                go to [back v] layer\n                switch costume to (closed v)\n                Clone at x: [1700] y: [-5]\n            else\n                if <(LEVEL) = [5]> then\n                    set [color v] effect to (40)\n                    go to [back v] layer\n                    switch costume to (closed v)\n                    Clone at x: [2000] y: [-5]\n                else\n                    set [x v] to [-999999999]\n                end\n            end\n        end\n    end\nend\n\nset [x v] to [-999999999]\n\nif <(LEVEL) = [3]> then\n    switch costume to (closed v)\n    Clone at x: [30] y: [393]\nend\n\nClone at x: [240] y: [16]\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\nClone at x: [1317] y: [16]\nClone at x: [240] y: [16]\n\nset [y v] to (y)\n\nset [exit v] to [win]\n\nswitch costume to (closed v)\n\nset [x v] to [-999999999]\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nhide\n\nwhen I receive [bring the action! v]\nbroadcast (Play Game v)\n\nwhen I receive [outro v]\nhide\n\n@levels2\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\nshow\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]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 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    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 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        else\n            if <(LEVEL) = [4]> then\n                switch costume to (costume5 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            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (costume9 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                end\n            end\n        end\n    end\nend\n\nswitch costume to (end v)\n\nClone at x: [400] y: [0]\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\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nClone at x: [360] y: [0]\nClone at x: [360] y: [0]\n\nset [level v] to [3]\n\nwhen I receive [start menu v]\nhide\n\nshow\n\nhide\n\nshow\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nhide\n\nwhen I receive [outro v]\nforever\n    hide\nend\n\n@Moving Enemies\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nnext costume\nset size to (70) %\nif <touching (you v)?> then\n    if <not <([y position v] of [you v]) > (y position)>> then\n        set [dai v] to [1]\n        broadcast (headed v)\n    else\n        set [dai v] to [0]\n        broadcast (hehe v)\n    end\nend\n\n\n\nwhen I receive [setup v]\nhide\nset [ghost v] effect to (0)\nset [x v] to [0]\nset [y v] to [0]\nset [color v] effect to (0)\nif <(LEVEL) = [2]> then\n    set [color v] effect to (50)\nend\nif <(LEVEL) = [1]> then\n    Clone at x: [460] y: [-90]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [1400] y: [-97]\n    else\n        if <(LEVEL) = [3]> then\n            set [color v] effect to (130)\n            Clone at x: [80] y: [-90]\n        else\n            if <(LEVEL) = [4]> then\n                set [color v] effect to (30)\n                Clone at x: [350] y: [-85]\n            else\n                if <(LEVEL) = [4]> then\n                    set [color v] effect to (0)\n                    Clone at x: [0] y: [0]\n                end\n            end\n        end\n    end\nend\nset [x v] to [-999999]\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)\nshow\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at x: [340] y: [27]\nClone at x: [530] y: [27]\nClone at x: [786] y: [27]\nClone at x: [1124] y: [27]\nClone at x: [1331] y: [245]\nClone at x: [1065] y: [345]\nClone at x: [825] y: [272]\nClone at x: [392] y: [245]\nClone at x: [197] y: [335]\n\nClone at x: [631] y: [11]\n\nhide\n\nwhen I receive [hehe v]\nrepeat (10)\n    stop [other scripts in sprite v]\n    change y by (-5)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@MOVING PLATFORMS\n\nwhen I receive [tick v]\nPosition (((x) - (SCROLL X)) + (([sin v] of ((timer) * (50)) ) * (200))) ((y) - (SCROLL Y))\nset size to (70) %\n\nnext costume\n\n\n\nwhen I receive [setup v]\nhide\nswitch costume to (LEVEL)\nset [ghost v] effect to (0)\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [1800] y: [-130]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [900] y: [-120]\n    else\n        if <(LEVEL) = [3]> then\n            Clone at x: [390] y: [90]\n            Clone at x: [1850] y: [-100]\n        else\n            if <(LEVEL) = [4]> then\n                Clone at x: [950] y: [-120]\n            end\n        end\n    end\nend\nset [x v] to [-999999]\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)\nshow\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at x: [340] y: [27]\nClone at x: [530] y: [27]\nClone at x: [786] y: [27]\nClone at x: [1124] y: [27]\nClone at x: [1331] y: [245]\nClone at x: [1065] y: [345]\nClone at x: [825] y: [272]\nClone at x: [392] y: [245]\nClone at x: [197] y: [335]\n\nClone at x: [631] y: [11]\n\nhide\n\n@Screen Shot 2020-06-15 at 14\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\n\n@Sprite2\n\n@SUBER COOL INDRO\n\nwhen flag clicked\nset volume to (100) %\nreset timer\nstart sound [Alan Walker - Faded \(instrumental version\).mp3 v]\nerase all\ngo to x: (0) y: (0)\nset pen color to (#0021ff)\nrepeat (150)\n    switch costume to (costume1 v)\n    turn right (15) degrees\n    create clone of (_myself_ v)\n    turn right (30) degrees\n    create clone of (_myself_ v)\n    turn right (40) degrees\n    create clone of (_myself_ v)\n    switch costume to (costume2 v)\n    turn right (15) degrees\n    create clone of (_myself_ v)\n    turn right (30) degrees\n    create clone of (_myself_ v)\n    turn right (40) degrees\n    create clone of (_myself_ v)\nend\nwait (20) seconds\nbroadcast (message1 v)\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set pen size to (10)\n    pen down\n    repeat (2)\n        repeat (30)\n            move (3) steps\n            turn right ((([sin v] of ((timer) * (200)) ) * (3)) + (2)) degrees\n            set pen size to ((([abs v] of (x position) ) / (10)) + (10))\n        end\n    end\n    delete this clone\nend\n\nchange pen (brightness v) by (-1)\nmove (3) steps\nturn right ((([sin v] of ((timer) * (200)) ) * (3)) + (3)) degrees\nset pen size to ((([abs v] of (x position) ) / (10)) + (10))\ndelete this clone\n\nwhen I receive [message1 v]\n\nerase all\n\nwhen I start as a clone\nset pen size to (10)\npen down\nrepeat (10)\n    repeat (70)\n        change pen (brightness v) by (-1)\n    end\n    repeat (70)\n        change pen (brightness v) by (1)\n    end\nend\n\nrepeat (360)\n\nwhen I receive [end v]\nrepeat (100)\n    change volume by (-1)\nend\n\nswitch costume to (costume4 v)\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set pen size to (10)\n    pen down\n    repeat (2)\n        repeat (30)\n            move (30) steps\n            turn right ((([sin v] of ((timer) * (100)) ) * (10)) + (10)) degrees\n            set pen size to ((([abs v] of (x position) ) / (10)) + (10))\n        end\n    end\n    delete this clone\nend\n\ngo [forward v] (1) layers\n\nwhen flag clicked\nswitch costume to (costume4 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    point in direction (90)\n    hide\n    wait (1.7) seconds\n    show\n    set [timer v] to [0]\n    set [brakes v] to [200]\n    set size to (0) %\n    repeat (40)\n        change [timer v] by (40)\n        change [brakes v] by (-5)\n        set size to (((((([sin v] of (timer) ) * (brakes)) / (timer)) * (100)) * (-1)) + (90)) %\n    end\n    wait (0.8) seconds\n    switch costume to (costume3 v)\n    create clone of (_myself_ v)\n    switch costume to (costume4 v)\n    repeat (30)\n        change size by (((0) - (size)) / (5))\n    end\n    hide\n    switch costume to (costume3 v)\n    switch costume to (costume3 v)\n    point in direction (90)\n    wait (1) seconds\n    show\n    set [timer v] to [0]\n    set [brakes v] to [200]\n    set size to (0) %\n    repeat (40)\n        change [timer v] by (40)\n        change [brakes v] by (-5)\n        set size to (((((([sin v] of (timer) ) * (brakes)) / (timer)) * (100)) * (-1)) + (90)) %\n    end\n    wait (1) seconds\n    switch costume to (avery walking-b v)\n    create clone of (_myself_ v)\n    switch costume to (costume3 v)\n    repeat (30)\n        change size by (((0) - (size)) / (5))\n    end\n    hide\nend\n\ncreate clone of (_myself_ v)\n\ndelete this clone\n\nset size to (0) %\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n\ncreate clone of (_myself_ v)\n\ncreate clone of (_myself_ v)\n\nhide\n\ndelete this clone\n\nhide\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    show\n    switch costume to (costume2 v)\n    set size to (100) %\n    switch costume to (avery walking-b v)\n    set y to (0)\n    set x to (-600)\n    start sound [Low Whoosh v]\n    repeat (30)\n        go to [front v] layer\n        change x by (((0) - (x position)) / (5))\n    end\n    stop [other scripts in sprite v]\n    broadcast (BRING THE ACTION! v)\n    erase all\n    stop [this script v]\nend\n\nwhen I receive [bring the action! v]\nhide\ndelete this clone\n\n@Outro\n\nwhen flag clicked\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nif <(costume [number v]) = [1]> then\n    clear graphic effects\n    go to [front v] layer\nend\nif <(costume [number v]) = [2]> then\n    wait (0.5) seconds\n    set y to (300)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set size to (100) %\n    repeat (30)\n        go to [front v] layer\n        set [ghost v] effect to ([abs v] of (x position) )\n        change y by (((0) - (y position)) / (10))\n    end\n    wait (2) seconds\n    forever\n        set size to ((([cos v] of ((timer) * (200)) ) * (10)) + (90)) %\n    end\nend\nif <(costume [number v]) = [3]> then\n    wait (1.5) seconds\n    set x to (300)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set size to (100) %\n    repeat (30)\n        go to [front v] layer\n        set [ghost v] effect to ([abs v] of (x position) )\n        change x by (((0) - (x position)) / (10))\n    end\n    wait (2) seconds\n    forever\n        point in direction ((([cos v] of ((timer) * (100)) ) * (10)) + (90))\n    end\nend\nif <(costume [number v]) = [4]> then\n    wait (2) seconds\n    set x to (-300)\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    set size to (100) %\n    go to [front v] layer\n    repeat (30)\n        go to [front v] layer\n        set [ghost v] effect to ([abs v] of (x position) )\n        change x by (((0) - (x position)) / (10))\n    end\n    wait (2) seconds\n    forever\n        point in direction ((([sin v] of ((timer) * (100)) ) * (10)) + (90))\n    end\nend\n\nset x to (300)\n\nchange x by (10)\n\npoint in direction (90)\n\nchange size by (10)\n\nwhen I receive [outro v]\nswitch costume to (costume1 v)\nstart sound [Blinding Lights v]\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\nhide\n\n
------The Way Back Home || A Scrolling Platformer-------   \n\nStory: You were an ordinary cube, living an ordinary life. When suddenly a machine called the autavachron whisks you far away from home! you need to get back!\n\nControls\n..\n\n..\ncan you guess?\n\njump on enemies (YAWN) collect all the coins to unlock the portal (SNORE)\n\nthere are currently 5 levels\n\ntell me about any glitches\n\noh and make sure to love fave and mabye even follow if you really want to.\n\nchou! >XD