⤵ Reverse ⤴ - a generic scrolling platformer
@Stage\n\nwhen flag clicked\nset volume to (50) %\nforever\n    play sound [tobu-seven v] until done\n    play sound [tobu-colors v] until done\nend\n\nwhen flag clicked\nreset timer\nset [level v] to [0]\n\nwhen I receive [new level yay v]\nchange [level v] by (1)\n\nbroadcast (NEW LEVEL YAY v)\n\nwhen I receive [yeet v]\nwait (0.2) seconds\nset volume to (((([costume # v] of [mute button v]) * (-1)) * (50)) + (100)) %\n\nwhen flag clicked\nforever\n    if <not <(LEVEL) = [6]>> then\n        set [timer v] to (timer)\n    end\nend\n\n@Player\n\ndefine Go (direction) (speed)\nif <(ded) = [0]> then\n    change x by (speed)\n    set [sthoppp v] to [0]\n    set [slope v] to [0]\n    repeat until <<(slope) = [8]> or <<not <touching (platformer v)?>> and <not <touching (bricks v)?>>>>\n        if <(round (gravity)) = [-1]> then\n            change y by (1)\n            change [slope v] by (1)\n            set [touched? v] to [1]\n        end\n        if <(round (gravity)) = [1]> then\n            change y by (-1)\n            change [slope v] by (1)\n            set [touched? v] to [1]\n        end\n    end\n    if <(slope) = [8]> then\n        if <(round (gravity)) = [-1]> then\n            change x by ((0) - (speed))\n            change y by ((0) - (slope))\n            change x by ((scroll xvel) * (-1))\n        end\n        if <(round (gravity)) = [1]> then\n            change x by ((0) - (speed))\n            change y by (((0) - (slope)) * (-1))\n            change x by ((scroll xvel) * (-1))\n        end\n    end\n    if <(ded) = [0]> then\n        if <(x position) < [0]> then\n            if <[15] > (scroll x)> then\n                set [sthoppp v] to [1]\n                if <not <(slope) = [8]>> then\n                    change [scroll xvel v] by (0.99999)\n                end\n            end\n        end\n        if <[0] < (x position)> then\n            if <(scroll x) > [-1040]> then\n                set [sthoppp v] to [1]\n                if <not <(slope) = [8]>> then\n                    change [scroll xvel v] by (-0.99999)\n                end\n            end\n        end\n    end\n    if <(slope) = [8]> then\n        set [scroll xvel v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [play v]\nset [brightness v] effect to (100)\ngo to x: (0) y: (0)\nset [yvel v] to [8]\nshow\nset [xvel v] to [0]\nforever\n    if <(gravity) = [-1]> then\n        change [yvel v] by (-0.8)\n    end\n    if <(gravity) = [1]> then\n        change [yvel v] by (0.8)\n    end\n    change y by (yvel)\n    set [touched? v] to [0]\n    if <(gravity) = [-1]> then\n        touch ground <(yvel) > [0]>\n    end\n    if <(gravity) = [1]> then\n        touch ground <[0] > (yvel)>\n    end\nend\n\nwhen I receive [play v]\nforever\n    set [scroll yvel v] to ((scroll yvel) * (0.8))\n    change y by (scroll yvel)\n    change [scroll y v] by (scroll yvel)\n    if <(gravity) = [-1]> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(is it falling?) < [3]>> then\n            set [yvel v] to [10]\n        end\n    end\n    if <(gravity) = [1]> then\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> and <(is it falling?) < [3]>> then\n            set [yvel v] to [-10]\n        end\n    end\n    if <(scrolling mode?) = [1]> then\n        if <(gravity) = [-1]> then\n            if <<[20] < (y position)> and <(yvel) > [0]>> then\n                change [scroll yvel v] by ((round ((yvel) + (0.4))) / (-4))\n            end\n            if <<(y position) < [-20]> and <[0] > (yvel)>> then\n                change [scroll yvel v] by ((round ((yvel) + (0.4))) / (-4))\n            end\n            if <<(scroll y) > [50]> and <(y position) < [-10]>> then\n                set [scroll yvel v] to [0]\n            end\n        end\n        if <(gravity) = [1]> then\n            if <<[25] < (y position)> and <(yvel) > [0]>> then\n                change [scroll yvel v] by ((round ((yvel) + (0.4))) / (-4))\n            end\n            if <<(y position) < [-25]> and <[0] > (yvel)>> then\n                change [scroll yvel v] by ((round ((yvel) + (0.4))) / (-4))\n            end\n            if <<[-150] > (scroll y)> and <[10] < (y position)>> then\n                set [scroll yvel v] to [0]\n            end\n        end\n    end\n    if <touching (flag v)?> then\n        stop [other scripts in sprite v]\n        broadcast (next v)\n        broadcast (play v)\n        start sound [select v]\n        hide\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [play v]\nforever\n    set rotation style [left-right v]\n    set [xvel v] to [0]\n    set [ded v] to [0]\n    if <(ded) = [0]> then\n        if <<not <<key (left arrow v) pressed?> and <key (right arrow v) pressed?>>> and <not <<key (a v) pressed?> and <key (d v) pressed?>>>> then\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                Go [90] [6]\n                set [xvel v] to [6]\n                point in direction (90)\n            end\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                Go [90] [-6]\n                set [xvel v] to [-6]\n                point in direction (-90)\n            end\n        end\n    end\n    if <<touching (platformer v)?> or <touching (bricks v)?>> then\n        set [xvel v] to ((xvel) * (-1))\n        change x by (xvel)\n        if <key (up arrow v) pressed?> then\n            set [yvel v] to [14]\n        end\n        set [touched? v] to [1]\n    end\nend\n\ndefine touch ground <up?>\nchange [is it falling? v] by (1)\nrepeat until <<not <touching (platformer v)?>> and <not <touching (bricks v)?>>>\n    if <(gravity) = [-1]> then\n        if <up?> then\n            change y by (-5)\n            set [touched? v] to [1]\n        else\n            change y by (1)\n            set [is it falling? v] to [0]\n            set [touched? v] to [1]\n        end\n        set [yvel v] to [0]\n        set [touched? v] to [1]\n    end\n    if <(gravity) = [1]> then\n        if <up?> then\n            change y by (5)\n            set [touched? v] to [1]\n        else\n            change y by (-1)\n            set [is it falling? v] to [0]\n            set [touched? v] to [1]\n        end\n        set [yvel v] to [0]\n        set [touched? v] to [1]\n    end\nend\n\nwhen I receive [play v]\ngo to x: (item (1) of [save x v]) y: (item (1) of [save y v])\nforever\n    change [scroll x v] by (scroll xvel)\n    change [e v] by (scroll xvel)\n    change [ee v] by (scroll xvel)\nend\n\nwhen I receive [play v]\nset [scroll xvel v] to [0]\nset [scroll yvel v] to [0]\nset [die? v] to [0]\nset [scroll x v] to (item (1) of [save scroll x v])\nset [scroll y v] to (item (1) of [save scroll y v])\nforever\n    if <[-204] > (y position)> then\n        start sound [Crunch v]\n        die\n    end\n    if <touching (spikes v)?> then\n        start sound [Crunch v]\n        die\n    end\n    if <touching (saws v)?> then\n        start sound [Crunch v]\n        die\n    end\n    if <touching (fireball v)?> then\n        start sound [Crunch v]\n        die\n    end\n    if <touching (obstacle2 v)?> then\n        start sound [Crunch v]\n        die\n    end\n    if <(y position) > [220]> then\n        start sound [Crunch v]\n        die\n    end\nend\n\nwhen I receive [play v]\nset [brightness v] effect to (100)\ngo to x: (item (1) of [save x v]) y: (item (1) of [save y v])\nshow\nset [xvel v] to [0]\nset [yvel v] to [0]\nset size to (110) %\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change size by (-1)\nend\nset [brightness v] effect to (0)\n\nwhen I receive [play v]\nset size to (110) %\nset [brightness v] effect to (100)\n\nwhen I receive [clicc v]\nbroadcast (play v)\n\nwhen I receive [play v]\nforever\n    if <<[1] > (yvel)> and <(yvel) > [-1]>> then\n        if <(touched?) = [1]> then\n            set volume to (100) %\n            start sound [ hit v]\n            wait until <not <<[1] > (yvel)> and <(yvel) > [-1]>>>\n        end\n    end\nend\n\nwhen flag clicked\ndelete all of [save scroll x v]\ndelete all of [save x v]\ndelete all of [save y v]\ndelete all of [save scroll y v]\ninsert [0] at (1) of [save scroll x v] \ninsert [0] at (1) of [save x v] \ninsert [0] at (1) of [save y v] \ninsert [-50] at (1) of [save scroll y v] \n\nwhen I receive [play v]\nforever\n    set [scroll xvel v] to ((scroll xvel) * (0.857))\n    set [nani v] to <(yvel) > [0.1]>\nend\n\nwhen flag clicked\nset [score v] to [0]\n\nwhen I receive [next v]\nset [scrolling mode? v] to [0]\n\nwhen flag clicked\nset [scrolling mode? v] to [1]\n\nwhen I receive [next v]\ndelete all of [save scroll x v]\ndelete all of [save x v]\ndelete all of [save y v]\ndelete all of [save scroll y v]\ninsert [0] at (1) of [save scroll x v] \ninsert [0] at (1) of [save x v] \ninsert [0] at (1) of [save y v] \ninsert [0] at (1) of [save scroll y v] \n\nwhen I receive [oof v]\nset volume to (0) %\n\ndefine die\nhide\nset [brightness v] effect to (100)\nbroadcast (particles v)\nrepeat (10)\n    set [scroll xvel v] to [0]\n    set [scroll yvel v] to [0]\n    set [ded v] to [1]\nend\ngo to x: (-100) y: (0)\nset [ded v] to [1]\nset [scroll xvel v] to (((item (1) of [save scroll x v]) - (scroll x)) / (5))\nset [scroll yvel v] to (((item (1) of [save scroll y v]) - (scroll y)) / (5))\nrepeat (35)\n    set [scroll xvel v] to (((item (1) of [save scroll x v]) - (scroll x)) / (5))\n    set [scroll yvel v] to (((item (1) of [save scroll y v]) - (scroll y)) / (5))\n    set [ded v] to [1]\n    go to x: (-100) y: (0)\nend\nset [gravity v] to [-1]\nbroadcast (restart v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\n\nwhen I receive [play v]\nforever\n    set [scrolling mode? v] to [1]\n    if <touching (checkpoints v)?> then\n        insert (scroll x) at (1) of [save scroll x v] \n        insert [0] at (1) of [save x v] \n        insert ((y position) + (50)) at (1) of [save y v] \n        insert (scroll y) at (1) of [save scroll y v] \n    end\nend\n\nbroadcast (play v)\n\nwhen I receive [play v]\nforever\n    change x by (scroll xvel)\n    if <(round (gravity)) = [-1]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (right v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (right v)\n        end\n        if <<<not <key (right arrow v) pressed?>> and <not <key (d v) pressed?>>> and <<not <key (left arrow v) pressed?>> and <not <key (a v) pressed?>>>> then\n            switch costume to (huh v)\n        end\n    end\n    if <(round (gravity)) = [1]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            switch costume to (right2 v)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (right2 v)\n        end\n        if <<<not <key (right arrow v) pressed?>> and <not <key (d v) pressed?>>> and <<not <key (left arrow v) pressed?>> and <not <key (a v) pressed?>>>> then\n            switch costume to (huh2 v)\n        end\n    end\nend\n\nwhen I receive [particles v]\nswitch costume to (particles v)\nfaster particle effect\n\nwhen I start as a clone\nset [brightness v] effect to (10)\nswitch costume to (particles v)\nset size to (100) %\nshow\nset rotation style [don't rotate v]\nset [ghost v] effect to (0)\nrepeat (pick random (1) to (5))\n    move (10) steps\nend\nrepeat (pick random (1) to (5))\n    move (8) steps\nend\nrepeat (pick random (1) to (5))\n    move (5) steps\nend\nrepeat (pick random (1) to (5))\n    move (3) steps\nend\nrepeat (pick random (1) to (5))\n    move (2) steps\nend\nrepeat (pick random (1) to (5))\n    move (1) steps\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat (20)\n    change [ghost v] effect by (8)\n    change size by (-3)\nend\n\nwhen I start as a clone\nforever\n    change y by (scroll yvel)\n    change x by (scroll xvel)\nend\n\nwhen I receive [restart v]\nbroadcast (play v)\n\ndefine faster particle effect\nrepeat (20)\n    point in direction (pick random (180) to (-180))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [play v]\nforever\n    if <(ded) = [0]> then\n        if <<(scroll x) > [15]> and <(x position) < [0]>> then\n            set [scroll xvel v] to [0]\n        end\n        if <<[-1040] > (scroll x)> and <[0] < (x position)>> then\n            set [scroll xvel v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nreset\n\ndefine reset\nbroadcast (restart v)\n\ndefine new level yay\nhide\nstart sound [Coin v]\nbroadcast (NEW LEVEL YAY v)\nset [brightness v] effect to (100)\ngo to x: (-100) y: (0)\nrepeat (45)\n    go to x: (-100) y: (0)\n    set [scroll xvel v] to (((item (1) of [save scroll x v]) - (scroll x)) / (5))\n    set [scroll yvel v] to (((item (1) of [save scroll y v]) - (scroll y)) / (5))\n    set [ded v] to [1]\nend\nset [gravity v] to [-1]\nbroadcast (restart v)\n\nwhen I receive [play v]\nforever\n    if <(x position) > [260]> then\n        new level yay\n    end\nend\n\n@Platformer\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nbroadcast (play v)\nbroadcast (start v)\nswitch costume to (costume1 v)\ncreate\n\ndefine create\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: (((((costume [number v]) - (1)) mod (3)) * (480)) + (scroll x)) y: (scroll y)\nend\n\nwhen I receive [new level yay v]\nnext costume\nnext costume\nnext costume\n\n@hmm\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\ngo to x: (pick random (-240) to (240)) y: ((gravity) * (-999))\nshow\nforever\n    change y by (((size) / (9)) * (gravity))\nend\n\nwhen I start as a clone\nset [ghost v] effect to (70)\nset size to (pick random (100) to (300)) %\nrepeat (20)\n    change size by (-10)\n    change [ghost v] effect by (1.5)\nend\ndelete this clone\n\nwhen flag clicked\nset [gravity v] to [-1]\n\nwhen I receive [reverse v]\nif <(gravity) = [-1]> then\n    set [yvel v] to [0]\n    set [gravity v] to [1]\nelse\n    set [yvel v] to [0]\n    set [gravity v] to [-1]\nend\n\nbroadcast (REVERSE v)\nwait (0.2) seconds\n\nbroadcast (REVERSE v)\n\n@Background\n\nwhen I receive [play v]\nforever\n    go to [back v] layer\n    go to x: ((((scroll x) / (3)) mod (480)) + (-480)) y: (0)\n    set [ghost v] effect to (80)\nend\n\n@orbs\n\ndefine create\npoint in direction (1)\nrepeat (2)\n    create clone of (_myself_ v)\n    turn right (1) degrees\nend\n\nwhen I start as a clone\nshow\nforever\n    set rotation style [don't rotate v]\n    if <(LEVEL) = [0]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (670)) y: ((scroll y) + (8))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (927)) y: ((scroll y) + (8))\n        end\n    end\n    if <(LEVEL) = [1]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (371)) y: ((scroll y) + (-50))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (650)) y: ((scroll y) + (8))\n        end\n    end\n    if <(LEVEL) = [2]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (0)) y: ((scroll y) + (0))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (545)) y: ((scroll y) + (100))\n        end\n        if <(direction) = [3]> then\n            go to x: ((scroll x) + (390)) y: ((scroll y) + (-150))\n        end\n        if <(direction) = [4]> then\n            go to x: ((scroll x) + (1020)) y: ((scroll y) + (150))\n        end\n    end\n    if <(LEVEL) = [3]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (260)) y: ((scroll y) + (50))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (540)) y: ((scroll y) + (120))\n        end\n        if <(direction) = [3]> then\n            go to x: ((scroll x) + (640)) y: ((scroll y) + (0))\n        end\n        if <(direction) = [4]> then\n            go to x: ((scroll x) + (710)) y: ((scroll y) + (80))\n        end\n    end\n    if <(LEVEL) = [4]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (67)) y: ((scroll y) + (55))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (207)) y: ((scroll y) + (55))\n        end\n        if <(direction) = [3]> then\n            go to x: ((scroll x) + (347)) y: ((scroll y) + (55))\n        end\n        if <(direction) = [4]> then\n            go to x: ((scroll x) + (487)) y: ((scroll y) + (55))\n        end\n        if <(direction) = [5]> then\n            go to x: ((scroll x) + (986)) y: ((scroll y) + (20))\n        end\n        if <(direction) = [6]> then\n            go to x: ((scroll x) + (1116)) y: ((scroll y) + (60))\n        end\n    end\n    if <(LEVEL) = [5]> then\n        if <(direction) = [1]> then\n            go to x: ((scroll x) + (230)) y: ((scroll y) + (92))\n        end\n        if <(direction) = [2]> then\n            go to x: ((scroll x) + (377)) y: ((scroll y) + (92))\n        end\n        if <(direction) = [3]> then\n            go to x: ((scroll x) + (524)) y: ((scroll y) + (92))\n        end\n        if <(direction) = [4]> then\n            go to x: ((scroll x) + (1040)) y: ((scroll y) + (105))\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\nswitch costume to (costume1 v)\ndelete all of [orb effect v]\ncreate\n\nbroadcast (REVERSE v)\n\nwhen I receive [particles v]\nset [gravity v] to [-1]\n\nwhen flag clicked\nset [gravity v] to [-1]\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        if <touching (player v)?> then\n            set [yvel v] to [0]\n            if <(gravity) = [-1]> then\n                set [gravity v] to [1]\n                switch costume to (costume2 v)\n                set size to (0) %\n                wait until <not <touching (player v)?>>\n            end\n        end\n        if <touching (player v)?> then\n            if <(gravity) = [1]> then\n                set [gravity v] to [-1]\n                switch costume to (costume2 v)\n                set size to (0) %\n                wait until <not <touching (player v)?>>\n            end\n        end\n    end\nend\n\nwhen I receive [new level yay v]\ndelete this clone\n\nwhen I receive [new level yay v]\ndelete all of [orb effect v]\nwait (0) seconds\nif <(LEVEL) = [1]> then\n    point in direction (1)\n    repeat (2)\n        create clone of (_myself_ v)\n        turn right (1) degrees\n    end\nend\nif <(LEVEL) = [2]> then\n    point in direction (1)\n    repeat (4)\n        create clone of (_myself_ v)\n        turn right (1) degrees\n    end\nend\nif <(LEVEL) = [3]> then\n    point in direction (1)\n    repeat (4)\n        create clone of (_myself_ v)\n        turn right (1) degrees\n    end\nend\nif <(LEVEL) = [4]> then\n    point in direction (1)\n    repeat (6)\n        create clone of (_myself_ v)\n        turn right (1) degrees\n    end\nend\nif <(LEVEL) = [5]> then\n    point in direction (1)\n    repeat (4)\n        create clone of (_myself_ v)\n        turn right (1) degrees\n    end\nend\n\nwhen I receive [play v]\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (60)\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\ninsert [0] at (direction) of [orb effect v] \nforever\n    change size by (item (direction) of [orb effect v])\n    replace item (direction) of [orb effect v] with (((item (direction) of [orb effect v]) * (0.8)) + (((100) - (size)) * (0.2)))\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\ndefine create\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: (((((costume [number v]) - (1)) mod (3)) * (480)) + (scroll x)) y: (scroll y)\nend\n\nwhen I receive [start v]\nhide\nswitch costume to (costume1 v)\ncreate\n\nwhen I receive [new level yay v]\nnext costume\nnext costume\nnext costume\n\n@Text and BG\n\nwhen flag clicked\nhide\n\ndefine create\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nforever\n    go to x: (((((costume [number v]) - (1)) mod (3)) * (480)) + (scroll x)) y: (scroll y)\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I receive [start v]\nhide\nswitch costume to (costume1 v)\ncreate\n\nwhen I receive [new level yay v]\nnext costume\nnext costume\nnext costume\n\n@Saws\n\nwhen I start as a clone\nshow\ngo to [back v] layer\ninsert (y position) at (costume [number v]) of [saw y v] \ninsert (x position) at (costume [number v]) of [saw x v] \nforever\n    set rotation style [all around v]\n    turn right (8) degrees\n    replace item (costume [number v]) of [saw x v] with (x position)\n    replace item (costume [number v]) of [saw y v] with (y position)\n    if <(LEVEL) = [2]> then\n        if <(costume [number v]) = [1]> then\n            go to x: (((scroll x) + (270)) + (([cos v] of ((timer) * (100)) ) * (100))) y: ((scroll y) + (155))\n        end\n    end\n    if <(LEVEL) = [3]> then\n        if <(costume [number v]) = [1]> then\n            go to x: (((scroll x) + (270)) + (([cos v] of ((timer) * (100)) ) * (100))) y: ((scroll y) + (155))\n        end\n        if <(costume [number v]) = [2]> then\n            go to x: (((scroll x) + (270)) + (([cos v] of (((timer) * (100)) + (180)) ) * (100))) y: ((scroll y) + (-40))\n        end\n    end\n    if <(LEVEL) = [4]> then\n        if <(costume [number v]) = [1]> then\n            go to x: (((scroll x) + (140)) + (([cos v] of ((timer) * (100)) ) * (50))) y: ((scroll y) + (155))\n        end\n        if <(costume [number v]) = [2]> then\n            go to x: (((scroll x) + (620)) + (([cos v] of (((timer) * (100)) + (180)) ) * (50))) y: ((scroll y) + (-40))\n        end\n        if <(costume [number v]) = [3]> then\n            go to x: (((scroll x) + (220)) + (([cos v] of (((timer) * (100)) + (180)) ) * (50))) y: ((scroll y) + (-40))\n        end\n        if <(costume [number v]) = [4]> then\n            go to x: (((scroll x) + (540)) + (([cos v] of (((timer) * (100)) + (0)) ) * (50))) y: ((scroll y) + (155))\n        end\n        if <(costume [number v]) = [5]> then\n            go to x: (((scroll x) + (420)) + (([cos v] of (((timer) * (100)) + (180)) ) * (50))) y: ((scroll y) + (-40))\n        end\n        if <(costume [number v]) = [6]> then\n            go to x: (((scroll x) + (340)) + (([cos v] of (((timer) * (100)) + (0)) ) * (50))) y: ((scroll y) + (155))\n        end\n    end\n    if <(LEVEL) = [5]> then\n        if <(costume [number v]) = [1]> then\n            go to x: ((scroll x) + (700)) y: ((scroll y) + ((([cos v] of ((timer) * (100)) ) * (100)) + (50)))\n        end\n        if <(costume [number v]) = [2]> then\n            go to x: ((scroll x) + (780)) y: ((scroll y) + ((([cos v] of (((timer) * (100)) + (180)) ) * (100)) + (50)))\n        end\n        if <(costume [number v]) = [3]> then\n            go to x: ((scroll x) + (860)) y: ((scroll y) + ((([cos v] of (((timer) * (100)) + (0)) ) * (100)) + (50)))\n        end\n        if <(costume [number v]) = [4]> then\n            go to x: ((scroll x) + (940)) y: ((scroll y) + ((([cos v] of (((timer) * (100)) + (180)) ) * (100)) + (50)))\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\ndelete all of [saw x v]\ndelete all of [saw y v]\n\nbroadcast (NEW LEVEL YAY v)\n\nwhen I receive [particles v]\nset [gravity v] to [-1]\n\nwhen flag clicked\nset [gravity v] to [-1]\n\nwhen I receive [new level yay v]\ndelete this clone\n\nwhen I receive [new level yay v]\ndelete all of [saw x v]\ndelete all of [saw y v]\nwait (0) seconds\nif <(LEVEL) = [2]> then\n    switch costume to (costume1 v)\n    repeat (1)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(LEVEL) = [3]> then\n    switch costume to (costume1 v)\n    repeat (2)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(LEVEL) = [4]> then\n    switch costume to (costume1 v)\n    repeat (6)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\nif <(LEVEL) = [5]> then\n    switch costume to (costume1 v)\n    repeat (4)\n        create clone of (_myself_ v)\n        next costume\n    end\nend\n\nwhen I start as a clone\nrepeat ((costume [number v]) / (9))\n    turn right (0) degrees\nend\nforever\n    set [saw id v] to (costume [number v])\n    create clone of (i also added effects v)\n    repeat (6)\n        turn right (0) degrees\n    end\nend\n\nbroadcast (NEW LEVEL YAY v)\n\nhide\n\n@i also added effects\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nswitch costume to (pick random (1) to (2))\ngo to x: (item (saw ID) of [saw x v]) y: (item (saw ID) of [saw y v])\nif <(pick random (1) to (2)) = [1]> then\n    change x by (pick random (20) to (30))\n    point in direction (pick random (70) to (110))\nelse\n    change x by (pick random (-30) to (-20))\n    point in direction (pick random (-70) to (-110))\nend\nforever\n    change x by (scroll xvel)\n    change y by (scroll yvel)\nend\n\nwhen I start as a clone\nset size to (pick random (20) to (100)) %\nrepeat (10)\n    move (5) steps\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\n@Visuals\n\ndefine Write (text)\nset [1 v] to [1]\nrepeat (length of (text))\n    switch costume to (letter (1) of (text))\n    create clone of (_myself_ v)\n    change [1 v] by (1)\n    change x by (12)\n    if <(x position) > [219]> then\n        change y by (-10)\n        set x to (-220)\n    end\nend\nhide\n\nwhen flag clicked\nshow\nforever\n    set size to (50) %\n    go to x: (-220) y: (150)\n    set [brightness v] effect to (0)\n    Write (TIMER)\nend\n\nwhen I start as a clone\nset size to (50) %\nshow\ngo to [front v] layer\nwait (0) seconds\ndelete this clone\n\n@thing\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    change x by (((((length of (round ((TIMER) + (-0.5)))) - (1)) * (10)) - (x position)) / (3))\nend\n\n@mute button\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        next costume\n        broadcast (yeet v)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\n\nwhen flag clicked\ngo to x: (-90) y: (149)\nset size to (100) %\nforever\n    change x by ((((((length of (round ((TIMER) + (-0.5)))) - (1)) * (10)) + (-90)) - (x position)) / (3))\n    if <touching (mouse-pointer v)?> then\n        change size by (((110) - (size)) / (3))\n    else\n        change size by (((100) - (size)) / (3))\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n
back in 2020 i thought scrolling platformer games like this were cool, but today people mostly call them "generic" so i'm sorry if it is.