☁ ENGINE Multiplayer Scrolling Platformer
@Stage\n\ndefine render\nClear all\nset [loops v] to [0]\nrepeat (length of [x v])\n    change [loops v] by (1)\n    if <(item (loops) of [type v]) = [1]> then\n        Fill (round (((item (loops) of [x v]) - (camx)) + (26))) ((7) - (round ((item (loops) of [y v]) - (camy)))) (round (((item (loops) of [x2 v]) - (camx)) + (26))) ((7) - (round ((item (loops) of [y2 v]) - (camy)))) [█] \n    end\n    if <(item (loops) of [type v]) = [2]> then\n        Fill (round (((item (loops) of [x v]) - (camx)) + (26))) ((7) - (round ((item (loops) of [y v]) - (camy)))) (round (((item (loops) of [x2 v]) - (camx)) + (26))) ((7) - (round ((item (loops) of [y2 v]) - (camy)))) [▓] <>\n    end\n    if <(item (loops) of [type v]) = [3]> then\n        if <(round (((item (loops) of [x v]) - (camx)) + (26))) > [0]> then\n            Insert [═] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (26)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (27))) > [0]> then\n            Insert [╦] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (27)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (28))) > [0]> then\n            Insert [═] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (28)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (29))) > [0]> then\n            Insert [═] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (29)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (30))) > [0]> then\n            Insert [╦] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (30)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (31))) > [0]> then\n            Insert [═] at line ((7) - (round ((item (loops) of [y2 v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (31)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (27))) > [0]> then\n            Insert [║] at line ((7) - (round ((item (loops) of [y v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (27)))\n        end\n        if <(round (((item (loops) of [x v]) - (camx)) + (30))) > [0]> then\n            Insert [║] at line ((7) - (round ((item (loops) of [y v]) - (camy)))) pos (round (((item (loops) of [x v]) - (camx)) + (30)))\n        end\n    end\nend\nchange [y v] by (0.2)\nFill (round ((((x) - (6)) - (camx)) + (26))) ((7) - (round (((y) - (1)) - (camy)))) (round ((((x) + ()) - (camx)) + (26))) ((7) - (round (((y) + (1)) - (camy)))) [░] \nif <(eye) = [0]> then\n    Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (2)) - (camx)) + (26)))\n    Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (4)) - (camx)) + (26)))\nelse\n    if <(xv) > [1]> then\n        Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (1)) - (camx)) + (26)))\n        Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (3)) - (camx)) + (26)))\n    else\n        if <(xv) < [-1]> then\n            Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (3)) - (camx)) + (26)))\n            Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (5)) - (camx)) + (26)))\n        else\n            Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (2)) - (camx)) + (26)))\n            Insert [█] at line ((7) - (round ((y) - (camy)))) pos (round ((((x) - (4)) - (camx)) + (26)))\n        end\n    end\nend\nchange [y v] by (-0.2)\n\ndefine level 1\ncreate rect [-20] [-7] [120] [-5] [1]\ncreate rect (([abs v] of ((((move) * (0.5)) mod (100)) - (50)) ) + (120)) [-7] (([abs v] of ((((move) * (0.5)) mod (100)) - (50)) ) + (140)) [-5] [1]\ncreate rect [190] [-7] [260] [-5] [1]\nSpike at [20] [-5]\nSpike at [50] [-5]\nSpike at [80] [-5]\nSpike at [86] [-5]\nSpike at [220] [-5]\nSpike at [226] [-5]\nSpike at [232] [-5]\nSet level end to [260]\nspring [-15] [-5]\n\nwhen I receive [death v]\nset [camx v] to [0]\nset [camy v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\n\ndefine get collision (x) (y) (x2) (y2)\ndelete all of [collisions v]\nset [loops v] to [0]\nrepeat (length of [x v])\n    change [loops v] by (1)\n    if <<<(item (loops) of [x v]) < (x2)> and <(x) < (item (loops) of [x2 v])>> and <<(item (loops) of [y v]) < (y2)> and <(y) < (item (loops) of [y2 v])>>> then\n        add (item (loops) of [type v]) to [collisions v]\n    end\nend\n\ndefine special detection\nget collision ((x) - (8)) ((y) - (1)) ((x) + (2)) ((y) + (1))\nif <[collisions v] contains [2]?> then\n    broadcast (death v)\nend\nif <[collisions v] contains [3]?> then\n    set [yv v] to [2]\nend\nif <(y) < [-30]> then\n    broadcast (death v)\nend\nif <(x) > (level end)> then\n    broadcast (next level v)\nend\nif <(camx) > ((level end) - (30))> then\n    set [camx v] to ((level end) - (30))\nend\n\ndefine wall detection\nget collision ((x) - (5)) ((y) - (1)) ((x) + (0)) ((y) + (1))\nrepeat (10)\n    if <[collisions v] contains [1]?> then\n        get collision ((x) - (5)) ((y) - (1)) ((x) + (0)) ((y) + (1))\n        change [y v] by (0.1)\n    end\nend\nif <[collisions v] contains [1]?> then\n    change [y v] by (-1)\n    change [x v] by ((xv) * (-1))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(xv) > [0]> then\n            set [xv v] to [-2]\n            change [x v] by (-2)\n            set [yv v] to [1]\n        else\n            set [xv v] to [2]\n            change [x v] by (2)\n            set [yv v] to [1]\n        end\n    else\n        set [xv v] to [0]\n    end\nend\n\ndefine physics\nspecial detection\nleft and right movement\nwall detection\nup-down movement\n\ndefine Internal || fill (x) (y) (x2) (y2) (char) <border?>\nif <border?> then\n    if <(y) = (y2)> then\n        set [inserted v] to []\n        repeat (((x2) - (x)) + (1))\n            set [inserted v] to (join (inserted) [═])\n        end\n        Insert (inserted) at line (y) pos (x)\n    else\n        set [inserted v] to []\n        if <not <(x) = [0]>> then\n            set [inserted v] to [╔]\n        end\n        repeat (((x2) - (x)) + (-1))\n            set [inserted v] to (join (inserted) [═])\n        end\n        if <not <(x2) = [52]>> then\n            set [inserted v] to (join (inserted) [╗])\n        end\n        Insert (inserted) at line (y) pos (x)\n        set [inserted v] to []\n        if <not <(x) = [0]>> then\n            set [inserted v] to [║]\n        end\n        repeat (((x2) - (x)) + (-1))\n            set [inserted v] to (join (inserted) (char))\n        end\n        if <not <(x2) = [52]>> then\n            set [inserted v] to (join (inserted) [║])\n        end\n        set [fill:y v] to ((y) + (1))\n        repeat (((y2) - (y)) + (-1))\n            Insert (inserted) at line (fill:y) pos (x)\n            change [fill:y v] by (1)\n        end\n        set [inserted v] to []\n        if <not <(x) = [0]>> then\n            set [inserted v] to [╚]\n        end\n        repeat (((x2) - (x)) + (-1))\n            set [inserted v] to (join (inserted) [═])\n        end\n        if <not <(x2) = [51]>> then\n            set [inserted v] to (join (inserted) [╝])\n        end\n        Insert (inserted) at line (y2) pos (x)\n    end\nelse\n    set [inserted v] to []\n    repeat (((x2) - (x)) + (1))\n        set [inserted v] to (join (inserted) (char))\n    end\n    set [fill:y v] to (y)\n    repeat (((y2) - (y)) + (1))\n        Insert (inserted) at line (fill:y) pos (x)\n        change [fill:y v] by (1)\n    end\nend\n\ndefine create rect (x) (y) (x2) (y2) (type)\nif <(x2) > (x)> then\n    add (x) to [x v]\n    add (x2) to [x2 v]\nelse\n    add (x2) to [x v]\n    add (x) to [x2 v]\nend\nif <(y2) > (y)> then\n    add (y) to [y v]\n    add (y2) to [y2 v]\nelse\n    add (y2) to [y v]\n    add (y) to [y2 v]\nend\nadd (type) to [type v]\n\ndefine Fill (x) (y) (x2) (y2) (char) <border?>\nif <(x) > (x2)> then\n    Fill (x2) (y) (x) (y2) (char) <border?>\nelse\n    if <(y) > (y2)> then\n        Fill (x) (y2) (x2) (y) (char) <border?>\n    else\n        if <(x) < [0]> then\n            if <(x2) > [52]> then\n                Internal || fill [0] (y) [52] (y2) (char) <border?>\n            else\n                if <not <(x2) < [0]>> then\n                    Internal || fill [0] (y) (x2) (y2) (char) <border?>\n                end\n            end\n        else\n            if <not <(x) > [52]>> then\n                if <(x2) > [52]> then\n                    Internal || fill (x) (y) [52] (y2) (char) <border?>\n                else\n                    if <not <(x2) < [0]>> then\n                        Internal || fill (x) (y) (x2) (y2) (char) <border?>\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [characters v] to [█▓▒░]\nClear all\n\ndefine Clear all\ndelete all of [game v]\nrepeat (13)\n    add [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] to [game v]\nend\n\ndefine Insert (text) at line (line #) pos (position)\nset [temp v] to []\nset [my variable v] to [0]\nrepeat (position)\n    change [my variable v] by (1)\n    set [temp v] to (join (temp) (letter (my variable) of (item (line #) of [game v])))\nend\nset [temp v] to (join (temp) (text))\nchange [my variable v] by (length of (text))\nrepeat until <<(my variable) = [51]> or <(my variable) > [51]>>\n    change [my variable v] by (1)\n    set [temp v] to (join (temp) (letter (my variable) of (item (line #) of [game v])))\nend\nreplace item (line #) of [game v] with (temp)\n\nwhen flag clicked\nset [eye v] to [1]\nset [camx v] to [0]\nset [camy v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset [level v] to [1]\nset [follow camera v] to [1]\nset [skipppeedddd v] to [0]\nforever\n    Get level\n    render\n    physics\n    if <(Follow camera) = [0]> then\n        change [camx v] by (((x) - (camx)) / (10))\n        change [camy v] by (((y) - (camy)) / (10))\n    else\n        change [camx v] by (((x) - (camx)) / (1))\n        change [camy v] by (((y) - (camy)) / (1))\n    end\n    if <(camx) > ((level end) - (30))> then\n        set [camx v] to ((level end) - (30))\n    end\n    Insert [ ] at line [1] pos [51]\n    Insert [ ] at line [2] pos [51]\n    Insert [ ] at line [3] pos [51]\n    Insert [ ] at line [4] pos [51]\n    Insert [ ] at line [5] pos [51]\n    Insert [ ] at line [6] pos [51]\n    Insert [ ] at line [7] pos [51]\n    Insert [ ] at line [8] pos [51]\n    Insert [ ] at line [9] pos [51]\n    Insert [ ] at line [10] pos [0]\n    Insert [ ] at line [11] pos [0]\n    Insert [ ] at line [12] pos [0]\n    Insert [ ] at line [13] pos [0]\n    wait (0.03) seconds\nend\n\ndefine up-down movement\nchange [yv v] by (-0.1)\nchange [y v] by (yv)\nget collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\nrepeat (5)\n    if <[collisions v] contains [1]?> then\n        change [x v] by (2)\n        get collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\n        if <[collisions v] contains [1]?> then\n            change [x v] by (-3)\n            get collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\n            if <[collisions v] contains [1]?> then\n                change [y v] by ((() - (yv)) * (1))\n                set [yv v] to [0]\n            end\n            change [x v] by (3)\n        end\n        change [x v] by (-2)\n    end\nend\nchange [y v] by (-0.25)\nget collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\nrepeat (5)\n    if <[collisions v] contains [1]?> then\n        change [x v] by (2)\n        get collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\n        if <[collisions v] contains [1]?> then\n            change [x v] by (-3)\n            get collision ((x) - (6)) ((y) - (1)) ((x) + (0)) ((y) + (1))\n            if <[collisions v] contains [1]?> then\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    set [yv v] to [1.5]\n                end\n            end\n            change [x v] by (3)\n        end\n        change [x v] by (-2)\n    end\nend\nchange [y v] by (0.25)\nset [yv v] to ((yv) * (0.9))\n\ndefine left and right movement\nset [xv v] to ((xv) * (0.5))\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <[0] > (mouse x)>>> then\n    change [xv v] by (-0.8)\nend\nif  then\n    change [xv v] by (0.8)\nend\nchange [x v] by (xv)\n\ndefine Get level\nchange [move v] by (1)\ndelete all of [type v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [x2 v]\ndelete all of [y2 v]\nif <(level) = [1]> then\n    level 1\nend\nif <(level) = [2]> then\n    Level 2\nend\nif <(level) = [3]> then\n    Level 3\nend\nif <(level) = [4]> then\n    level 4\nend\nif <(level) = [5]> then\n    broadcast (win v)\nend\n\ndefine Spike at (x) (y)\ncreate rect ((x) - (2)) (y) ((x) + (2)) (y) [2]\ncreate rect ((x) - (1)) ((y) + (1)) ((x) + (1)) ((y) + (1)) [2]\ncreate rect (x) ((y) + (2)) (x) ((y) + (2)) [2]\n\nwhen I receive [next level v]\nset [camx v] to [0]\nset [camy v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nchange [level v] by (1)\nGet level\n\ndefine Set level end to (x)\nset [level end v] to (x)\n\ndefine spring (x) (y)\ncreate rect ((x) - (2)) (y) ((x) + (2)) ((y) + (1)) [3]\n\ndefine Level 3\ncreate rect [-10] [-7] [5] [-5] [1]\ncreate rect [5] (([abs v] of ((((move) * (0.1)) mod (20)) - (10)) ) + (-7)) [17] (([abs v] of ((((move) * (0.1)) mod (20)) - (10)) ) + (-5)) [1]\nSpike at [14] (([abs v] of ((((move) * (0.1)) mod (20)) - (10)) ) + (-5))\ncreate rect [20] [6] [40] [8] [1]\nSpike at [36] [8]\ncreate rect [45] [6] [50] [8] [1]\nspring [47] [8]\ncreate rect [20] [15] [40] [17] [1]\nSpike at [23] [17]\ncreate rect [5] (([abs v] of ((((move) * (0.1)) mod (20)) - (10)) ) + (15)) [17] (([abs v] of ((((move) * (0.1)) mod (20)) - (10)) ) + (17)) [1]\ncreate rect [20] [30] [100] [32] [1]\nSpike at [40] [32]\nSpike at [70] [32]\nSpike at [76] [32]\ncreate rect (([abs v] of ((((move) * (0.5)) mod (100)) - (50)) ) + (100)) [30] (([abs v] of ((((move) * (0.5)) mod (100)) - (50)) ) + (120)) [32] [1]\ncreate rect [170] [30] [300] [32] [1]\nSet level end to [300]\nSpike at [200] [32]\nSpike at [230] [32]\nSpike at [260] [32]\nSpike at [266] [32]\nSpike at [272] [32]\n\nwhen [s v] key pressed\nset [skipppeedddd v] to [1]\nbroadcast (next level v)\n\nwhen [r v] key pressed\nbroadcast (death v)\n\ndefine Level 2\ncreate rect [5] [-6] [10] [3] [1]\ncreate rect [20] [-2] [26] [6] [1]\nSpike at [23] [6]\ncreate rect [35] [-6] [40] [3] [1]\ncreate rect [50] [-2] [56] [6] [1]\nSpike at [53] [6]\ncreate rect [65] [-6] [70] [3] [1]\ncreate rect [80] [-2] [86] [6] [1]\nSpike at [83] [6]\ncreate rect [-10] [-7] [200] [-5] [1]\nSpike at [100] [-5]\nSpike at [130] [-5]\nSpike at [160] [-5]\nSpike at [166] [-5]\nSet level end to [200]\n\nwhen [c v] key pressed\nset [follow camera v] to ((1) - (Follow camera))\n\ndefine level 4\ncreate rect [-10] [-7] [110] [-5] [1]\ncreate rect [-10] [5] [100] [7] [1]\nspring [5] [-5]\nspring [26] [-5]\nspring [47] [-5]\nspring [68] [-5]\nspring [105] [-5]\nset [loops v] to [-5]\nrepeat (17)\n    Upside down spike at (loops) [3]\n    change [loops v] by (6)\nend\nset [loops v] to [-5]\nrepeat (3)\n    change [loops v] by (30)\n    Spike at (loops) [7]\nend\ncreate rect [-20] (([abs v] of ((((move) * (0.1)) mod (30)) - (15)) ) + (5)) [-10] (([abs v] of ((((move) * (0.1)) mod (30)) - (15)) ) + (7)) [1]\ncreate rect [-10] [20] [300] [22] [1]\nSpike at [20] [22]\nSpike at [50] [22]\nSpike at [80] [22]\nSpike at [110] [22]\nSpike at [116] [22]\nSpike at [150] [22]\nSpike at [180] [22]\nSpike at [186] [22]\nSpike at [192] [22]\nSpike at [230] [22]\nSpike at [260] [22]\nSet level end to [300]\n\ndefine Upside down spike at (x) (y)\ncreate rect ((x) - ()) (y) ((x) + ()) (y) [2]\ncreate rect ((x) - (1)) ((y) + (1)) ((x) + (1)) ((y) + (1)) [2]\ncreate rect ((x) - (2)) ((y) + (2)) ((x) + (2)) ((y) + (2)) [2]\n\nUpside down spike at [5] [3]\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\ndelete all of [game v]\nadd [List Scrolling Platformer] to [game v]\nadd [by @I8D] to [game v]\nadd [] to [game v]\nadd [] to [game v]\nadd [You Win!] to [game v]\nadd [Congratulations On Completing This Game!] to [game v]\nadd [Hope You Enjoyed =\)] to [game v]\nadd [Sorry if this was a bit hard. ] to [game v]\nadd [Please Love, Favorite, And Follow!!] to [game v]\nadd [] to [game v]\nif <(Skipppeedddd) = [0]> then\n    add [Comment "I WON WITHOUT SKIPS UWU!!!!!"] to [game v]\n    change [☁ finished without skips v] by (1)\nelse\n    add [] to [game v]\nend\nadd [] to [game v]\nadd [] to [game v]\n\nwhen flag clicked\nforever\n\nwhen [e v] key pressed\nset [eye v] to ((1) - (eye))\n\nplay sound [Marshmello - Alone \(Official Music Video\).mp3 v] until done\n\n