list scrolling platformer v.0.1

Instructions: PEN VERSION: https://scratch.mit.edu/projects/718813722\n\n0 SPRITES! Owo\n\narrow keys / WAD\n\ngreean - platform\nred - lava\nyellow -  coin\nbrown - jumppad\nwhite -  flag\n\nhave been working on this for a few days, it was a break from a big project im currently working on...\n\n\n\noh and #games and #list\n\n

@Stage\n\nwhen flag clicked\nhide list [list based scrolling platformer | levitm v]\nset [coins v] to [0]\nsetup\nset [# v] to [play]\nforever\n    set [timer v] to (timer)\n    broadcast (tick v) and wait\n    set [fps v] to ((1) / ((timer) - (timer)))\nend\n\nwhen I receive [tick v]\nclear graphic effects\nif <(#) = [play]> then\n    player\n    update list\nelse\n    if <(☁ highscore :\)) > (time)> then\n        set [☁ highscore :\) v] to (time)\n        encode username\n        wait (0.1) seconds\n        set [☁ highscore by me v] to (encoded)\n    end\n    over\n    stop [all v]\nend\n\ndefine get (x) (y) | (number or text)\nif <<<(y) > [99]> or <[0] > (y)>> or <<(x) > [99]> or <[0] > (x)>>> then\n    set [output v] to (item (1) of [characters v])\nelse\n    if <(number or text) = [1]> then\n        set [output v] to (item ((((y) * (100)) + (x)) + (1)) of [list v])\n    else\n        set [output v] to (item ((((y) * (100)) + (x)) + (1)) of [whole list v])\n    end\nend\n\ndefine set (x) (y) | (...) | (square?)\nif <not <<<(y) > [99]> or <[0] > (y)>> or <<(x) > [99]> or <[0] > (x)>>>> then\n    replace item ((((y) * (100)) + (x)) + (1)) of [whole list v] with (...)\n    if <(square?) = [1]> then\n        replace item ((((y) * (100)) + (x)) + (1)) of [list v] with (...)\n    end\nend\n\ndefine setup\nspawn\ndelete all of [whole list v]\nrepeat (10000)\n    add (item (1) of [characters v]) to [whole list v]\nend\ndelete all of [list v]\nrepeat (10000)\n    add (item (1) of [characters v]) to [list v]\nend\nsquare [0] [40] to [15] [45] [2]\nsquare [0] [40] to [0] [51] [2]\nsquare [20] [39] to [30] [42] [2]\nsquare [8] [42] to [10] [45] [4]\nset [13] [46] | (item (5) of [characters v]) | [1]\nset [25] [43] | (item (5) of [characters v]) | [1]\nset [23] [43] | (item (5) of [characters v]) | [1]\nset [27] [43] | (item (5) of [characters v]) | [1]\nsquare [35] [50] to [40] [0] [2]\nsquare [33] [45] to [36] [43] [2]\nset [36] [52] | (item (5) of [characters v]) | [1]\nset [38] [52] | (item (5) of [characters v]) | [1]\nsquare [47] [51] to [43] [53] [2]\nsquare [56] [0] to [50] [56] [2]\nset [54] [58] | (item (5) of [characters v]) | [1]\nset [52] [57] | (item (5) of [characters v]) | [1]\nset [50] [56] | (item (5) of [characters v]) | [1]\nsquare [52] [55] to [55] [55] [6]\nsquare [57] [64] to [64] [0] [2]\nset [58] [66] | (item (5) of [characters v]) | [1]\nset [60] [66] | (item (5) of [characters v]) | [1]\nset [62] [66] | (item (5) of [characters v]) | [1]\nsquare [66] [99] to [80] [20] [2]\nsquare [64] [18] to [84] [0] [2]\nsquare [90] [18] to [83] [0] [4]\nsquare [90] [18] to [99] [0] [2]\nsquare [92] [18] to [95] [18] [6]\nsquare [99] [0] to [99] [100] [2]\nsquare [99] [27] to [95] [27] [2]\nsquare [94] [32] to [97] [32] [2]\nsquare [92] [37] to [89] [37] [2]\nsquare [80] [38] to [85] [38] [2]\nsquare [83] [43] to [99] [45] [2]\nsquare [80] [43] to [80] [43] [2]\nsquare [85] [44] to [88] [44] [6]\nsquare [89] [44] to [99] [44] [4]\nsquare [95] [50] to [99] [50] [2]\nsquare [88] [55] to [70] [55] [2]\nsquare [81] [56] to [81] [60] [7]\nsquare [81] [58] to [84] [60] [7]\nset [97] [29] | (item (5) of [characters v]) | [1]\nset [95] [34] | (item (5) of [characters v]) | [1]\nset [91] [39] | (item (5) of [characters v]) | [1]\nset [81] [40] | (item (5) of [characters v]) | [1]\nset [83] [40] | (item (5) of [characters v]) | [1]\nset [96] [52] | (item (5) of [characters v]) | [1]\nset [87] [57] | (item (5) of [characters v]) | [1]\nset [85] [57] | (item (5) of [characters v]) | [1]\n\ndefine update list\ndelete all of [list based scrolling platformer | levitm v]\nset [iy v] to ((scroll y) + (6))\nset [i# v] to [0]\nrepeat (13)\n    change [i# v] by (1)\n    set [ix v] to ((scroll x) - (13))\n    delete all of [row v]\n    if <[10] > (i#)> then\n        add [ ] to [row v]\n    end\n    set [i## v] to [0]\n    repeat (21)\n        change [i## v] by (1)\n        change [ix v] by (1)\n        get (ix) (iy) | []\n        if <not <<(i##) > [19]> and <(i#) = [1]>>> then\n            if <not <<(i##) > [19]> and <(i#) = [2]>>> then\n                if <not <<(i##) > [19]> and <(i#) = [3]>>> then\n                    add (output) to [row v]\n                end\n            end\n        end\n    end\n    if <(i#) = [1]> then\n        add (join (row) (join [| fps ] ([ceiling v] of (fps) ))) to [list based scrolling platformer | levitm v]\n    else\n        if <(i#) = [2]> then\n            add (join (row) (join (join [|] (item (5) of [characters v])) (join [: ] (coins)))) to [list based scrolling platformer | levitm v]\n        else\n            if <(i#) = [3]> then\n                add (join (row) (join (join [|] [ time ]) (round (timer)))) to [list based scrolling platformer | levitm v]\n            else\n                add (row) to [list based scrolling platformer | levitm v]\n            end\n        end\n    end\n    change [iy v] by (-1)\nend\n\ndefine player\nset [ye? v] to ((<(ye?) = [3]> * (1)) + ((<(ye?) = [1]> * (2)) + (<(ye?) = [2]> * (3))))\nif <(ye?) = [1]> then\n    if <<<key (up arrow v) pressed?> or <key (space v) pressed?>> or <key (w v) pressed?>> then\n        if <(sy) = [0]> then\n            change [scroll y v] by (-1)\n            collision\n            set [sy v] to ((item (1) of [collision v]) * (6))\n            change [scroll y v] by (1)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [scroll x v] by (1)\n        collision\n        change [scroll x v] by (() - (item (1) of [collision v]))\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [scroll x v] by (-1)\n        collision\n        change [scroll x v] by (item (1) of [collision v])\n    end\n    if <(sy) > [0]> then\n        change [sy v] by (-1)\n        change [scroll y v] by (1)\n        collision\n        change [scroll y v] by (() - (item (1) of [collision v]))\n        set [sy v] to ((sy) - ((item (1) of [collision v]) * (sy)))\n    end\n    if <(sy) = [0]> then\n        change [scroll y v] by (-1)\n        collision\n        change [scroll y v] by (item (1) of [collision v])\n    end\n    if <<<(scroll y) > [99]> or <[0] > (scroll y)>> or <<(scroll x) > [99]> or <[0] > (scroll x)>>> then\n        spawn\n    end\n    collision\n    if <(item (2) of [collision v]) = [1]> then\n        spawn\n    end\n    change [scroll y v] by (-1)\n    collision\n    if <(item (2) of [collision v]) = [1]> then\n        spawn\n    end\n    change [scroll y v] by (1)\n    if <(item (3) of [collision v]) = [1]> then\n        set [sy v] to [10]\n    end\n    change [scroll y v] by (-1)\n    collision\n    if <(item (3) of [collision v]) = [1]> then\n        set [sy v] to [10]\n    end\n    change [scroll y v] by (1)\n    set (item (1) of [last pos v]) (item (2) of [last pos v]) | (item (9) of [last pos v]) | []\n    replace item (1) of [last pos v] with (scroll x)\n    replace item (2) of [last pos v] with (scroll y)\n    set (item (3) of [last pos v]) (item (4) of [last pos v]) | (item (10) of [last pos v]) | []\n    replace item (3) of [last pos v] with ((scroll x) + (1))\n    replace item (4) of [last pos v] with (scroll y)\n    set (item (5) of [last pos v]) (item (6) of [last pos v]) | (item (11) of [last pos v]) | []\n    replace item (5) of [last pos v] with (scroll x)\n    replace item (6) of [last pos v] with ((scroll y) + (1))\n    set (item (7) of [last pos v]) (item (8) of [last pos v]) | (item (12) of [last pos v]) | []\n    replace item (7) of [last pos v] with ((scroll x) + (1))\n    replace item (8) of [last pos v] with ((scroll y) + (1))\n    set (scroll x) (scroll y) | (item (3) of [characters v]) | []\n    get (scroll x) (scroll y) | [1]\n    replace item (9) of [last pos v] with (output)\n    set ((scroll x) + (1)) (scroll y) | (item (3) of [characters v]) | []\n    get ((scroll x) + (1)) (scroll y) | [1]\n    replace item (10) of [last pos v] with (output)\n    set (scroll x) ((scroll y) + (1)) | (item (3) of [characters v]) | []\n    get (scroll x) ((scroll y) + (1)) | [1]\n    replace item (11) of [last pos v] with (output)\n    set ((scroll x) + (1)) ((scroll y) + (1)) | (item (3) of [characters v]) | []\n    get ((scroll x) + (1)) ((scroll y) + (1)) | [1]\n    replace item (12) of [last pos v] with (output)\nend\n\ndefine square (x1) (y1) to (x2) (y2) (e)\nset [ix v] to (x1)\nrepeat (([abs v] of ((x1) - (x2)) ) + <([abs v] of ((x1) - (x2)) ) = [0]>)\n    set [iy v] to (y1)\n    repeat (([abs v] of ((y1) - (y2)) ) + <([abs v] of ((y1) - (y2)) ) = [0]>)\n        set (ix) (iy) | (item (e) of [characters v]) | [1]\n        change [iy v] by ((1) - (<(y1) > (y2)> * (2)))\n    end\n    change [ix v] by ((1) - (<(x1) > (x2)> * (2)))\nend\n\ndefine collision\nreplace item (3) of [collision v] with [0]\nreplace item (2) of [collision v] with [0]\nreplace item (1) of [collision v] with [0]\nget (scroll x) ((scroll y) + (1)) | []\nif <(output) = (item (2) of [characters v])> then\n    replace item (1) of [collision v] with [1]\nend\nif <(output) = (item (4) of [characters v])> then\n    replace item (2) of [collision v] with [1]\nend\nif <(output) = (item (6) of [characters v])> then\n    replace item (3) of [collision v] with [1]\nend\nif <(output) = (item (7) of [characters v])> then\n    set [# v] to [end]\n    broadcast (game over v)\n    stop [this script v]\nend\nif <(output) = (item (5) of [characters v])> then\n    set (scroll x) ((scroll y) + (1)) | (item (1) of [characters v]) | [1]\n    change [coins v] by (1)\nend\nget ((scroll x) + (1)) ((scroll y) + (1)) | []\nif <(output) = (item (2) of [characters v])> then\n    replace item (1) of [collision v] with [1]\nend\nif <(output) = (item (4) of [characters v])> then\n    replace item (2) of [collision v] with [1]\nend\nif <(output) = (item (6) of [characters v])> then\n    replace item (3) of [collision v] with [1]\nend\nif <(output) = (item (7) of [characters v])> then\n    set [# v] to [end]\n    broadcast (game over v)\n    stop [this script v]\nend\nif <(output) = (item (5) of [characters v])> then\n    set ((scroll x) + (1)) ((scroll y) + (1)) | (item (1) of [characters v]) | [1]\n    change [coins v] by (1)\nend\nget (scroll x) (scroll y) | []\nif <(output) = (item (2) of [characters v])> then\n    replace item (1) of [collision v] with [1]\nend\nif <(output) = (item (4) of [characters v])> then\n    replace item (2) of [collision v] with [1]\nend\nif <(output) = (item (6) of [characters v])> then\n    replace item (3) of [collision v] with [1]\nend\nif <(output) = (item (7) of [characters v])> then\n    set [# v] to [end]\n    broadcast (game over v)\n    stop [this script v]\nend\nif <(output) = (item (5) of [characters v])> then\n    set (scroll x) (scroll y) | (item (1) of [characters v]) | [1]\n    change [coins v] by (1)\nend\nget ((scroll x) + (1)) (scroll y) | []\nif <(output) = (item (2) of [characters v])> then\n    replace item (1) of [collision v] with [1]\nend\nif <(output) = (item (4) of [characters v])> then\n    replace item (2) of [collision v] with [1]\nend\nif <(output) = (item (6) of [characters v])> then\n    replace item (3) of [collision v] with [1]\nend\nif <(output) = (item (7) of [characters v])> then\n    set [# v] to [end]\n    broadcast (game over v)\n    stop [this script v]\nend\nif <(output) = (item (5) of [characters v])> then\n    set ((scroll x) + (1)) (scroll y) | (item (1) of [characters v]) | [1]\n    change [coins v] by (1)\nend\n\ndefine spawn\nreset timer\nset [scroll x v] to [2]\nset [scroll y v] to [50]\nset [sy v] to [0]\n\ndefine over\ndecode\ndelete all of [list based scrolling platformer | levitm v]\nadd (join [your time: ] (time)) to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [                                                    GAME OVER] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd (join (join [                                Highscore: ] (☁ highscore :\))) (join [ by: ] (highscore by))) to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd [] to [list based scrolling platformer | levitm v]\nadd (join [🟨: ] (join (coins) [/20])) to [list based scrolling platformer | levitm v]\n\nwhen I receive [game over v]\nset [time v] to (timer)\n\ndefine decode\nset [highscore by v] to []\nset [letter# v] to [1]\nrepeat ((length of (☁ highscore by me)) / (2))\n    set [highscore by v] to (join (highscore by) (item (join (letter (letter#) of (☁ highscore by me)) (letter ((letter#) + (1)) of (☁ highscore by me))) of [aplhabet v]))\n    change [letter# v] by (2)\nend\n\ndefine encode username\nset [letter# v] to [1]\nset [encoded v] to []\nrepeat (length of (username))\n    set [encoded v] to (join (encoded) (item # of (letter (letter#) of (username)) in [aplhabet v]))\n    change [letter# v] by (1)\nend\n\n