Up in the Sky: Pen Platformer ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀#games #all
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (backdrop1 v)\n    set [☁ wr v] to (☁ wr)\nend\n\nswitch backdrop to (backdrop2 v)\nerase all\n\nwhen flag clicked\nplay sound [Upbeat and Happy Background Music v] until done\nplay sound [Upbeat and Happy Background Music v] until done\nplay sound [Upbeat and Happy Background Music v] until done\nplay sound [Upbeat and Happy Background Music v] until done\n\n@pen\n\ndefine Go To (x) (y)\ngo to x: ((x) + (Scroll X)) y: ((y) + (Scroll Y))\n\ndefine Scrolling\nchange [scroll x v] by (() - (round ((x position) / (10))))\nchange [x position v] by (() - (round ((x position) / (10))))\nchange [scroll y v] by (() - (round ((y position) / (10))))\nchange [y position v] by (() - (round ((y position) / (10))))\n\ndefine Update\ndelete (all) of [touching v]\nset [i v] to [0]\nrepeat (length of [level xs v])\n    change [i v] by (1)\n    if <<<(x position) < (((item (i) of [level xs v]) + (Scroll X)) + (item (i) of [level widths v]))> and <((x position) + (20)) > ((item (i) of [level xs v]) + (Scroll X))>> and <<(y position) < (((item (i) of [level ys v]) + (Scroll Y)) + (item (i) of [level heights v]))> and <((y position) + (20)) > ((item (i) of [level ys v]) + (Scroll Y))>>> then\n        if <not <[touching v] contains (item (i) of [level types v])?>> then\n            add (item (i) of [level types v]) to [touching v]\n        end\n    end\nend\n\ndefine Create Level\nset [final time v] to [0]\ndelete (all) of [level xs v]\ndelete (all) of [level ys v]\ndelete (all) of [level widths v]\ndelete (all) of [level heights v]\ndelete (all) of [level types v]\nAdd Rectangle (-150) (-50) (300) (25) (1)\nAdd Rectangle (150) (-50) (50) (25) (2)\nAdd Rectangle (300) (50) (50) (25) (2)\nAdd Rectangle (150) (190) (50) (25) (2)\nAdd Rectangle (300) (290) (50) (25) (2)\nAdd Rectangle (125) (50) (25) (500) (1)\nAdd Rectangle (350) (-50) (25) (500) (1)\nAdd Rectangle (150) (425) (100) (25) (1)\nAdd Rectangle (375) (425) (50) (25) (1)\nAdd Rectangle (150) (525) (400) (25) (1)\nAdd Rectangle (425) (-50) (25) (500) (1)\nAdd Rectangle (300) (425) (50) (25) (1)\nAdd Rectangle (525) (0) (25) (525) (1)\nAdd Rectangle (450) (-50) (250) (25) (1)\nAdd Rectangle (700) (-50) (25) (200) (1)\nAdd Rectangle (550) (0) (125) (25) (1)\nAdd Rectangle (575) (50) (125) (25) (1)\nAdd Rectangle (550) (100) (125) (25) (1)\nAdd Rectangle (575) (150) (600) (25) (1)\nAdd Rectangle (150) (-75) (225) (25) (1)\nAdd Rectangle (700) (175) (25) (25) (3)\nAdd Rectangle (775) (175) (25) (50) (3)\nAdd Rectangle (850) (175) (25) (75) (3)\nAdd Rectangle (925) (175) (25) (50) (3)\nAdd Rectangle (1000) (175) (25) (25) (3)\nAdd Rectangle (1100) (175) (25) (75) (4)\nAdd Rectangle (1175) (151) (250) (25) (6)\nAdd Rectangle (1175) (150) (250) (25) (5)\nAdd Rectangle (1750) (151) (100) (25) (6)\nAdd Rectangle (1750) (150) (100) (25) (5)\nAdd Rectangle (2100) (151) (100) (25) (6)\nAdd Rectangle (2100) (150) (100) (25) (5)\nAdd Rectangle (2400) (150) (200) (25) (1)\nAdd Rectangle (2500) (175) (25) (75) (4)\nAdd Rectangle (2700) (151) (75) (25) (8)\nAdd Rectangle (2700) (150) (75) (25) (7)\nAdd Rectangle (2800) (175) (25) (50) (3)\nAdd Rectangle (2650) (26) (75) (25) (8)\nAdd Rectangle (2650) (25) (75) (25) (7)\nAdd Rectangle (2600) (100) (250) (25) (3)\nAdd Rectangle (3100) (75) (100) (25) (1)\nAdd Rectangle (2950) (175) (25) (200) (3)\nAdd Rectangle (3300) (175) (100) (25) (1)\nAdd Rectangle (3350) (200) (25) (75) (4)\nAdd Rectangle (3500) (250) (25) (25) (1)\nAdd Rectangle (3375) (325) (25) (25) (1)\nAdd Rectangle (3500) (400) (25) (25) (1)\nAdd Rectangle (3375) (475) (25) (25) (1)\nAdd Rectangle (3355) (275) (25) (300) (3)\nAdd Rectangle (3520) (200) (25) (375) (3)\nAdd Rectangle (3500) (550) (25) (25) (1)\nAdd Rectangle (3515) (575) (110) (25) (1)\nAdd Rectangle (3600) (600) (25) (75) (4)\nAdd Rectangle (3625) (450) (25) (150) (1)\nAdd Rectangle (3650) (450) (500) (25) (1)\nAdd Rectangle (4150) (450) (25) (150) (1)\nAdd Rectangle (3650) (475) (500) (25) (9)\nAdd Rectangle (3650) (490) (500) (25) (9)\nAdd Rectangle (3650) (505) (500) (25) (9)\nAdd Rectangle (3650) (520) (500) (25) (9)\nAdd Rectangle (3650) (535) (500) (25) (9)\nAdd Rectangle (3650) (550) (500) (25) (9)\nAdd Rectangle (3650) (565) (500) (25) (9)\nAdd Rectangle (3650) (575) (500) (25) (9)\nAdd Rectangle (3700) (600) (250) (25) (3)\nAdd Rectangle (3700) (500) (50) (25) (3)\nAdd Rectangle (3675) (475) (100) (25) (3)\nAdd Rectangle (3800) (575) (100) (25) (3)\nAdd Rectangle (3825) (550) (50) (25) (3)\nAdd Rectangle (3950) (560) (150) (25) (3)\nAdd Rectangle (3950) (475) (150) (25) (3)\nAdd Rectangle (4175) (575) (350) (25) (1)\nAdd Rectangle (4225) (600) (25) (75) (4)\nAdd Rectangle (4325) (590) (150) (15) (10)\nAdd Rectangle (4500) (700) (450) (25) (1)\nAdd Rectangle (4500) (690) (450) (15) (10)\nAdd Rectangle (4575) (700) (25) (25) (11)\nAdd Rectangle (4650) (700) (25) (25) (11)\nAdd Rectangle (4725) (700) (25) (25) (11)\nAdd Rectangle (4800) (700) (25) (25) (11)\nAdd Rectangle (4875) (700) (25) (25) (11)\nAdd Rectangle (4950) (700) (25) (25) (11)\nAdd Rectangle (4950) (500) (250) (25) (1)\nAdd Rectangle (4950) (501) (250) (25) (12)\n\ndefine Draw\npen up\nset pen size to (5)\nset [i v] to [0]\nrepeat (length of [level xs v])\n    change [i v] by (1)\n    if <(item (i) of [level types v]) = [11]> then\n        if <(item (i) of [level ys v]) > [750]> then\n            set [moving platform_y v] to [-4]\n        end\n        if <[650] > (item (i) of [level ys v])> then\n            set [moving platform_y v] to [4]\n        end\n        set pen color to (#ffffff)\n        replace item (i) of [level ys v] with ((item (i) of [level ys v]) + (moving platform_y))\n    end\n    if <<(item (i) of [level types v]) = [7]> or <(item (i) of [level types v]) = [8]>> then\n        if <(item (i) of [level xs v]) > [3200]> then\n            set [moving platform x_dir v] to [-2]\n        end\n        if <[2575] > (item (i) of [level xs v])> then\n            set [moving platform x_dir v] to [2]\n        end\n        set pen color to (#ffffff)\n        replace item (i) of [level xs v] with ((item (i) of [level xs v]) + (moving platform x_dir))\n    end\n    if <<<((Scroll Y) + (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))) > [-180]> and <((Scroll Y) + ((item (i) of [level ys v]) + (5))) < [240]>> and <<((Scroll X) + (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5))) > [-240]> and <((Scroll X) + ((item (i) of [level xs v]) + (5))) < [240]>>> then\n        Go To ((item (i) of [level xs v]) + (5)) ((item (i) of [level ys v]) + (5))\n        set pen color to (#000000)\n        if <(item (i) of [level types v]) = [2]> then\n            set pen color to (#e2962b)\n        end\n        if <<(item (i) of [level types v]) = [1]> or <(item (i) of [level types v]) = [12]>> then\n            set pen color to (#ffffff)\n            if <<(item (i) of [level types v]) = [12]> and <(final time) = [0]>> then\n                set [final time v] to (timer)\n            end\n        end\n        if <<(item (i) of [level types v]) = [3]> or <(item (i) of [level types v]) = [11]>> then\n            set pen color to (#ff0000)\n        end\n        if <(item (i) of [level types v]) = [4]> then\n            set pen color to (#10ff00)\n        end\n        if <(item (i) of [level types v]) = [5]> then\n            set pen color to (#00ffff)\n        end\n        if <<(item (i) of [level types v]) = [6]> or <(item (i) of [level types v]) = [8]>> then\n            set pen color to (#3f8fff)\n        end\n        if <(item (i) of [level types v]) = [7]> then\n            set pen color to (#ffffff)\n        end\n        if <(item (i) of [level types v]) = [9]> then\n            set pen color to (#0043ff)\n        end\n        if <(item (i) of [level types v]) = [10]> then\n            set pen color to (#e16c00)\n        end\n        pen down\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5)) ((item (i) of [level ys v]) + (5))\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))\n        Go To ((item (i) of [level xs v]) + (5)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))\n        Go To ((item (i) of [level xs v]) + (5)) ((item (i) of [level ys v]) + (5))\n        set pen size to (5.9)\n        Go To ((item (i) of [level xs v]) + (10)) ((item (i) of [level ys v]) + (10))\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (10)) ((item (i) of [level ys v]) + (10))\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (10)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (10))\n        Go To ((item (i) of [level xs v]) + (10)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (10))\n        Go To ((item (i) of [level xs v]) + (10)) ((item (i) of [level ys v]) + (10))\n        pen up\n    end\nend\nset pen color to (#ee7d16)\ngo to x: (x position) y: (y position)\npen down\ngo to x: (x position) y: ((y position) + (20))\ngo to x: ((x position) + (20)) y: ((y position) + (20))\ngo to x: ((x position) + (20)) y: (y position)\ngo to x: (x position) y: (y position)\npen up\ngo to x: ((x position) - (-5)) y: ((y position) - (-5))\nset pen size to (10)\npen down\ngo to x: ((x position) - (-5)) y: ((y position) + (15))\ngo to x: ((x position) + (15)) y: ((y position) + (15))\ngo to x: ((x position) + (15)) y: ((y position) - (-5))\ngo to x: ((x position) - (-5)) y: ((y position) - (-5))\npen up\nset pen size to (5)\nset pen color to (#ffffff)\ngo to x: ((x position) - (-5)) y: ((y position) - (-7))\npen down\ngo to x: ((x position) - (-5)) y: ((y position) - (-14))\npen up\ngo to x: ((x position) - (-15)) y: ((y position) - (-7))\npen down\ngo to x: ((x position) - (-15)) y: ((y position) - (-14))\npen up\nset pen color to (#000000)\nset pen size to (3.5)\npen up\ngo to x: (((x position) + (5)) - ((Xv) * (-0.2))) y: (((y position) + (8)) - (((Yv) + (6)) * (-0.3)))\npen down\npen up\ngo to x: ((x position) - (((Xv) * (-0.2)) + (-15))) y: (((y position) - (-8)) - (((Yv) + (6)) * (-0.3)))\npen down\npen up\n\ndefine Add Rectangle (x) (y) (width) (height) (tyoe)\nadd (x) to [level xs v]\nadd (y) to [level ys v]\nadd (width) to [level widths v]\nadd (height) to [level heights v]\nadd (tyoe) to [level types v]\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (Scroll X) to encoded\nwrite (Scroll Y) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine write (val) to encoded\nset [letter# v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter#) of (val)) in [code v]))\n    change [letter# v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                set [☁ p9 v] to (value)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nerase all\nCreate Codes\nset [my player # v] to [0]\nset [max players v] to [9]\nbroadcast (setup - opponents v) and wait\nset [cloud v] to [2]\nPrint: [joining] X: [-120] Y: [10] Size: [20] Color RGB: [255] [255] [255] Fade: [] Thickness: [3] Spacing: [2]\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    set [cloud v] to [4]\n    broadcast (begin v)\nelse\n    set [cloud v] to [3]\n    Print: [server full :\(] X: [-200] Y: [0] Size: [14] Color RGB: [255] [0] [0] Fade: [] Thickness: [3] Spacing: [2]\nend\n\nwhen I receive [begin v]\nforever\n    send cloud data\nend\n\nwhen I receive [begin v]\nforever\n    Update\n    hide\nend\n\nwhen I receive [begin v]\nCreate Level\nset [respawnpoint_x v] to [0]\nset [respawnpoint_y v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset [x position v] to [0]\nset [y position v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nforever\n    erase all\n    Draw\n    draw players\n    Update\n    if <[touching v] contains [6]?> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.99))\n    else\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n    end\n    if <[touching v] contains [8]?> then\n        change [x position v] by (moving platform x_dir)\n    end\n    change [x position v] by (Xv)\n    Update\n    if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n        change [y position v] by (1)\n        Update\n        if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n            change [y position v] by (1)\n            Update\n            if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n                change [y position v] by (1)\n                Update\n                if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n                    change [y position v] by (1)\n                    Update\n                    if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n                        change [y position v] by (1)\n                        Update\n                        if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n                            change [x position v] by ((Xv) * (-1))\n                            change [y position v] by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(username) = [dn_scrtch]>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    Update\n    change [yv v] by (-1)\n    change [y position v] by (Yv)\n    Update\n    if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or <[touching v] contains [7]?>> then\n        change [y position v] by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    Update\n    change [y position v] by (-1)\n    Update\n    if <<<[touching v] contains [1]?> or <[touching v] contains [5]?>> or > then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    if <[touching v] contains [9]?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [8]\n        end\n    end\n    Update\n    if <[touching v] contains [2]?> then\n        set [yv v] to [20]\n    end\n    Update\n    if <<<[touching v] contains [3]?> or <[touching v] contains [11]?>> or <(Scroll Y) > [500]>> then\n        set [final time v] to [0]\n        Create Level\n        set [moving platform x_dir v] to [-2]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [x position v] to [0]\n        set [y position v] to [0]\n        set [scroll x v] to (respawnpoint_x)\n        set [scroll y v] to (respawnpoint_y)\n    end\n    if <[touching v] contains [4]?> then\n        set [respawnpoint_x v] to (Scroll X)\n        set [respawnpoint_y v] to (Scroll Y)\n        Print: [green = checkpoint] X: [-200] Y: [-150] Size: [12] Color RGB: [0] [255] [0] Fade: [90] Thickness: [8] Spacing: [2]\n        Print: [green = checkpoint] X: [-200] Y: [-150] Size: [12] Color RGB: [0] [255] [0] Fade: [0] Thickness: [3] Spacing: [2]\n    end\n    if <[touching v] contains [9]?> then\n        set [xv v] to ((Xv) / (1.5))\n        set [yv v] to ((Yv) / (1.5))\n    end\n    if <[touching v] contains [10]?> then\n        set [yv v] to [1]\n        set [xv v] to ((Xv) / (1.3))\n    end\n    if <[touching v] contains [12]?> then\n        Print: [finished :D] X: [-100] Y: [-50] Size: [12] Color RGB: [255] [255] [255] Fade: [0] Thickness: [3] Spacing: [2]\n        Print: (final time) X: [-100] Y: [-100] Size: [12] Color RGB: [255] [255] [255] Fade: [0] Thickness: [3] Spacing: [2]\n        Print: (join [wr: ] (☁ wr)) X: [-100] Y: [-150] Size: [12] Color RGB: [255] [255] [255] Fade: [0] Thickness: [3] Spacing: [2]\n        if <(☁ wr) > (final time)> then\n            set [☁ wr v] to (final time)\n        end\n    end\n    Update\n    change [y position v] by (1)\n    Scrolling\nend\n\ndefine draw players\nget online players\nset [iii v] to [1]\nrepeat (online players)\n    if <not <(item (iii) of [online players v]) = (MY PLAYER #)>> then\n        pen up\n        Print: (item (item (iii) of [online players v]) of [player names v]) X: ((item (item (iii) of [online players v]) of [player x's v]) + (-30)) Y: ((item (item (iii) of [online players v]) of [player y's v]) + (50)) Size: [8] Color RGB: [255] [255] [255] Fade: [0] Thickness: [3] Spacing: [1.5]\n        set pen size to (5)\n        set pen color to (#ff9400)\n        go to x: (item (item (iii) of [online players v]) of [player x's v]) y: ((item (item (iii) of [online players v]) of [player y's v]) + (0))\n        pen down\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (0)) y: ((item (item (iii) of [online players v]) of [player y's v]) + (20))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) + (20)) y: ((item (item (iii) of [online players v]) of [player y's v]) + (20))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) + (20)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (0))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (0)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (0))\n        pen up\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-5)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-5))\n        set pen size to (10)\n        pen down\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-5)) y: ((item (item (iii) of [online players v]) of [player y's v]) + (15))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) + (15)) y: ((item (item (iii) of [online players v]) of [player y's v]) + (15))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) + (15)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-5))\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-5)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-5))\n        pen up\n        set pen size to (5)\n        set pen color to (#ffffff)\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-5)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-7))\n        pen down\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-5)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-14))\n        pen up\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-15)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-7))\n        pen down\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-15)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-14))\n        pen up\n        set pen color to (#000000)\n        set pen size to (3.5)\n        pen up\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) + (5)) y: ((item (item (iii) of [online players v]) of [player y's v]) + (8))\n        pen down\n        pen up\n        go to x: ((item (item (iii) of [online players v]) of [player x's v]) - (-15)) y: ((item (item (iii) of [online players v]) of [player y's v]) - (-8))\n        pen down\n        pen up\n    end\n    change [iii v] by (1)\nend\n\ndefine get online players\ndelete all of [online players v]\nset [online players v] to [0]\nset [ii v] to [1]\nrepeat (9)\n    if <(item (ii) of [player offline v]) < [100]> then\n        add (ii) to [online players v]\n        change [online players v] by (1)\n    end\n    change [ii v] by (1)\nend\n\ndefine Create Codes\ndelete (all) of [codes v]\nadd [] to [codes v]\nadd [011010505061616808010464] to [codes v]\nadd [0008085858676765655454044453535151404000] to [codes v]\nadd [6150501010010107071818585867] to [codes v]\nadd [000808585867676161505000] to [codes v]\nadd [6000000804440868] to [codes v]\nadd [600000080444] to [codes v]\nadd [615050101001010707181858586767646444] to [codes v]\nadd [000860680464] to [codes v]\nadd [105030381858] to [codes v]\nadd [00603037372828181807] to [codes v]\nadd [0008043434682450] to [codes v]\nadd [00080868] to [codes v]\nadd [0800003434606068] to [codes v]\nadd [080000686860] to [codes v]\nadd [01101050506161676758581818070701] to [codes v]\nadd [080000505061616363545404] to [codes v]\nadd [011010505061616666484818180707016846] to [codes v]\nadd [0800005050616163635454043468] to [codes v]\nadd [601010010103031414545465656767585808] to [codes v]\nadd [00603038] to [codes v]\nadd [00070718185858676760] to [codes v]\nadd [00383860] to [codes v]\nadd [0018183434585860] to [codes v]\nadd [00686008] to [codes v]\nadd [003434603438] to [codes v]\nadd [006060080868] to [codes v]\nadd [123030380868] to [codes v]\nadd [011010505061616262080868] to [codes v]\nadd [01101050506161636354542454656567675858181807] to [codes v]\nadd [505850050565] to [codes v]\nadd [600000040413135353646467675858181807] to [codes v]\nadd [5020200404070718185858676765655454242405] to [codes v]\nadd [00606018] to [codes v]\nadd [011010505061616363545414140303015465656767585818180707050514] to [codes v]\nadd [011010505061616664141403030166484818] to [codes v]\nadd [011010505061616767585818180707010167] to [codes v]\nadd [243333444453] to [codes v]\nadd [2031] to [codes v]\nadd [30364838] to [codes v]\nadd [454343232325255555646462625151111102020606171767] to [codes v]\nadd [2028404803630565] to [codes v]\nadd [5111110202030314145454656566665757173038] to [codes v]\nadd [600811115757] to [codes v]\nadd [22303042] to [codes v]\nadd [68020201011010202031313232050507071818383864] to [codes v]\nadd [32303211325132233243] to [codes v]\nadd [403232363648] to [codes v]\nadd [203232363628] to [codes v]\nadd [0868] to [codes v]\nadd [2444] to [codes v]\nadd [04643137] to [codes v]\nadd [13531555] to [codes v]\nadd [403131333324243535373748] to [codes v]\nadd [503030383858] to [codes v]\nadd [203131333344443535373728] to [codes v]\nadd [103030383818] to [codes v]\nadd [3038] to [codes v]\nadd [1058] to [codes v]\nadd [31414142423232313747474848383837] to [codes v]\nadd [31414142423232314638] to [codes v]\nadd [20224042] to [codes v]\nadd [3032] to [codes v]\nadd [30020234] to [codes v]\nadd [3628] to [codes v]\nadd [30626234] to [codes v]\nadd [2737373838282827] to [codes v]\nadd [38383634344444535351514040202011] to [codes v]\nadd [5018] to [codes v]\nset [characters v] to [ abcdefghijklmnopqrstuvwxyz1234567890~`!@#$%^&*\(\)_-+={\[}\]|\:;"'<,>.?/]\n\ndefine set pen color R: (r) G: (g) B: (b) Fade: (f)\nset pen color to ((((((([floor v] of ((255) - ((f) * (2.55))) ) * (256)) + (([floor v] of (r) ) * <(r) > [0]>)) * (256)) + (([floor v] of (g) ) * <(g) > [0]>)) * (256)) + (([floor v] of (b) ) * <(b) > [0]>))\n\ndefine Print: (text) X: (x) Y: (y) Size: (s) Color RGB: (r) (g) (b) Fade: (f) Thickness: (t) Spacing: (space)\nset pen color R: (r) G: (g) B: (b) Fade: (f)\nset [print count v] to [1]\nrepeat (length of (text))\n    set [char count v] to [0]\n    repeat until <(letter (Char count) of (Characters)) = (letter (Print count) of (text))>\n        change [char count v] by (1)\n    end\n    set [char id v] to (Char count)\n    set [size v] to (((s) / (8)) * (t))\n    set pen size to (Size)\n    set [startx v] to (x)\n    set [line count v] to [1]\n    repeat ((length of (item (Char ID) of [codes v])) / (4))\n        go to x: (((startX) + (((Print count) - (1)) * ((s) * (space)))) + ((letter (Line count) of (item (Char ID) of [codes v])) * ((s) / (8)))) y: ((y) - ((letter ((Line count) + (1)) of (item (Char ID) of [codes v])) * ((s) / (8))))\n        pen down\n        go to x: (((startX) + (((Print count) - (1)) * ((s) * (space)))) + ((letter ((Line count) + (2)) of (item (Char ID) of [codes v])) * ((s) / (8)))) y: ((y) - ((letter ((Line count) + (3)) of (item (Char ID) of [codes v])) * ((s) / (8))))\n        pen up\n        change [line count v] by (4)\n    end\n    change [print count v] by (1)\nend\n\nset [final time v] to (timer)\n\n@list\n\ndelete all of [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [] to [code v]\nadd [a] to [code v]\nadd [b] to [code v]\nadd [c] to [code v]\nadd [d] to [code v]\nadd [e] to [code v]\nadd [f] to [code v]\nadd [g] to [code v]\nadd [h] to [code v]\nadd [i] to [code v]\nadd [j] to [code v]\nadd [k] to [code v]\nadd [l] to [code v]\nadd [m] to [code v]\nadd [n] to [code v]\nadd [o] to [code v]\nadd [p] to [code v]\nadd [q] to [code v]\nadd [r] to [code v]\nadd [s] to [code v]\nadd [t] to [code v]\nadd [u] to [code v]\nadd [v] to [code v]\nadd [w] to [code v]\nadd [x] to [code v]\nadd [y] to [code v]\nadd [z] to [code v]\nadd [0] to [code v]\nadd [1] to [code v]\nadd [2] to [code v]\nadd [3] to [code v]\nadd [4] to [code v]\nadd [5] to [code v]\nadd [6] to [code v]\nadd [7] to [code v]\nadd [8] to [code v]\nadd [9] to [code v]\nadd [+] to [code v]\nadd [-] to [code v]\nadd [.] to [code v]\nadd [] to [code v]\nadd [_] to [code v]\n\n@others\n\nwhen I receive [setup - opponents v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\ndelete all of [player names v]\ndelete all of [player x's v]\ndelete all of [player y's v]\ndelete all of [player offline v]\nrepeat (9)\n    add [] to [player names v]\n    add [] to [player x's v]\n    add [] to [player y's v]\n    add [] to [player offline v]\nend\n\nwhen I receive [begin v]\nforever\n    set [counter v] to [0]\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n    end\nend\n\ndefine tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nreplace item (player #) of [player offline v] with (offline)\nif <not <(offline) = [100]>> then\n    begin decode of (value)\n    value = read from encoded\n    replace item (player #) of [player names v] with (join (player #) (join [: ] (value)))\n    value = read from encoded\n    value = read from encoded\n    replace item (player #) of [player x's v] with ((Scroll X) - (value))\n    value = read from encoded\n    replace item (player #) of [player y's v] with (((Scroll Y) - (value)) - (5))\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                set [value v] to (☁ P9)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nerase all\n\nif <<(offline) = [100]> and <<not <([abs v] of ((Scroll X) - (x position)) ) > [120]>> or <not <([abs v] of ((Scroll Y) - (y position)) ) > [90]>>>> then\nchange [counter v] by (1)\n\n@Sprite1\n\ndefine fill (ax) (ay) (bx) (by) (cx) (cy)\nset [lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\nset [lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\nset [lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\nset [peri v] to (((lena) + (lenb)) + (lenc))\nset [incx v] to (((((lena) * (ax)) + ((lenb) * (bx))) + ((lenc) * (cx))) / (peri))\nset [incy v] to (((((lena) * (ay)) + ((lenb) * (by))) + ((lenc) * (cy))) / (peri))\nset [inr v] to (([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) / (peri)) ) / (2))\ngo to x: (round (incx)) y: (round (incy))\nset pen shade to (30)\nset pen size to ((inr) * (2))\npen down\npen up\nif <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n    set [ta v] to (lena)\n    set [tb v] to (lenb)\n    set [tc v] to (lenc)\n    set [tx v] to (ax)\n    set [ty v] to (ay)\nelse\n    set [tb v] to (lena)\n    if <<(lenb) < (lena)> and <(lenb) < (lenc)>> then\n        set [ta v] to (lenb)\n        set [tc v] to (lenc)\n        set [tx v] to (bx)\n        set [ty v] to (by)\n    else\n        set [ta v] to (lenc)\n        set [tc v] to (lenb)\n        set [tx v] to (cx)\n        set [ty v] to (cy)\n    end\nend\nset [td v] to ([sqrt v] of ((((tx) - (incx)) * ((tx) - (incx))) + (((ty) - (incy)) * ((ty) - (incy)))) )\nset [rate v] to (((td) - (inr)) / ((td) * (2)))\nset [r v] to (inr)\nset [aox v] to (incx)\nset [aoy v] to (incy)\nset [box v] to (incx)\nset [boy v] to (incy)\nset [cox v] to (incx)\nset [coy v] to (incy)\nrepeat (level of accuracy)\n    set [r v] to ((r) * (rate))\n    set [aox v] to ((ax) + (((Aox) - (ax)) * (rate)))\n    set [aoy v] to ((ay) + (((Aoy) - (ay)) * (rate)))\n    set [box v] to ((bx) + (((Box) - (bx)) * (rate)))\n    set [boy v] to ((by) + (((Boy) - (by)) * (rate)))\n    set [cox v] to ((cx) + (((Cox) - (cx)) * (rate)))\n    set [coy v] to ((cy) + (((Coy) - (cy)) * (rate)))\n    set pen size to ((2) * (r))\n    go to x: (Aox) y: (Aoy)\n    pen down\n    go to x: (Box) y: (Boy)\n    go to x: (Cox) y: (Coy)\n    go to x: (Aox) y: (Aoy)\n    pen up\nend\n\nwhen flag clicked\nset [level of accuracy v] to [10]\nforever\nend\n\nfill (0) (0) (100) (0) (0) (100)\n\nerase all\n\n
arrow keys/ WASD to move and jump\n\nhave fun playing together with other Scratchers\n\njoin my DMC: https://scratch.mit.edu/projects/438576192/\n\nthx to @Hockeycat88 for music