Nature ll Multiplayer platformer ll
@Stage\n\n@Moving Platfom\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    glide (1) secs to x: (-192) y: (1)\n    wait (1) seconds\n    glide (1) secs to x: (91) y: (1)\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        show\n    else\n        hide\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Player\n\nwhen flag clicked\nswitch costume to (center v)\n\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <<not <key (up arrow v) pressed?>> and <<not <key (right arrow v) pressed?>> and <not >>> then\n        switch costume to (center v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (over right v)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (over left v)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nset size to (100) %\nReset player variables\nreset\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v v] by (.9)\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <<touching (level v)?> or <touching (moving platfom v)?>> then\n        change y by (1)\n        if <<touching (level v)?> or <touching (moving platfom v)?>> then\n            change y by (1)\n            if <<touching (level v)?> or <touching (moving platfom v)?>> then\n                change y by (1)\n                if <<touching (level v)?> or <touching (moving platfom v)?>> then\n                    change y by (1)\n                    if <<touching (level v)?> or <touching (moving platfom v)?>> then\n                        change y by (1)\n                        if <<touching (level v)?> or <touching (moving platfom v)?>> then\n                            change x by ((X v) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [15]\n                            else\n                                set [x v v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-1)\n    change y by (Y v)\n    if <<touching (level v)?> or <touching (moving platfom v)?>> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <<touching (level v)?> or <touching (moving platfom v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n            set [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <touching (spikes v)?> then\n        start sound [Pew v]\n        reset\n    end\n    if <touching (killer wheel v)?> then\n        start sound [Pew v]\n        reset\n    end\n    if <touching (lava v)?> then\n        start sound [Pew v]\n        reset\n    end\n    if <touching (jump pad v)?> then\n        set [y v v] to [25]\n    end\nend\n\ndefine Reset player variables\nset [x v v] to [0]\nset [y v v] to [0]\n\ndefine reset\nclear graphic effects\nset size to (100) %\nshow\ngo to x: (-200) y: (0)\npoint in direction (90)\nReset player variables\n\nwhen flag clicked\nswitch costume to (center v)\nforever\n    set [direction v] to (direction)\nend\n\nwhen flag clicked\nforever\n    if <(x position) = [241]> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [next level v]\nreset\nReset player variables\n\nwhen [timer v] > (0.01)\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(y position) = [-179]> then\n        switch costume to (die v)\n        reset\n    end\nend\n\nwhen flag clicked\n\nwhen [r v] key pressed\nswitch costume to (center v)\ngo to x: (-200) y: (0)\n\nwhen [r v] key pressed\nbroadcast (NEXT LEVEL v)\nchange [level v] by (1)\n\nwhen flag clicked\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (setups v) and wait\nbroadcast (joining v)\nbroadcast (Join game v) and wait\nif <(My Player #) > [0]> then\n    start sound [Connect v]\n    broadcast (joined v)\nelse\n    start sound [Disconnect v]\n    broadcast (full v)\nend\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                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter# v] to [1]\nrepeat (length of (val))\n    set [encodied v] to (join (encodied) (item # of (letter (letter#) of (val)) in [code v]))\n    change [letter# v] by (1)\nend\nset [encodied v] to (join (encodied) [00])\n\ndefine send cloud data\nset [encodied v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (Level) to encoded\nwrite (direction) to encoded\nset cloud# (My Player #) to (encodied)\n\ndefine write (number or text) <to encoded>\n\nwhen flag clicked\nforever\n\nbroadcast (setups v)\n\nwhen flag clicked\nforever\n    if <(My Player #) > [0]> then\n        send cloud data\n    end\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@Sprite1\n\ngo to x: (-4) y: (1)\n\nwhen I receive [next level v]\ngo [forward v] (7) layers\nshow\nrepeat (20)\n    change x by (((0) - (x position)) / (4))\nend\nwait (0.8) seconds\nrepeat (20)\n    change x by (((-490) - (x position)) / (4))\nend\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (-476) y: (1)\n\nchange [color v] effect by (-25)\n\nforever\n    change [color v] effect by (5)\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    show\n    change [ghost v] effect by (100)\nend\n\nhide\n\n@Jump Pad\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\nset size to (39) %\nforever\n    if <(Level) = [5]> then\n        show\n    end\n    if <touching (player v)?> then\n        start sound [smw_spring_jump v]\n        repeat (10)\n            change y by (-3)\n        end\n        repeat (10)\n            change y by (3)\n        end\n    end\nend\n\nhide\n\ngo to x: (-48) y: (-46)\n\nshow\n\nplay sound [smw_spring_jump v] until done\n\nwhen I receive [next level v]\nnext costume\n\n@opponent\n\nwhen flag clicked\nforever\n    tick\nend\n\ndefine value=cloud#\n\ndefine value=cloud# (number or text)\n\ndefine begin decode (number or text)\n\ndefine value=read from encode\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter#) of (encodied)) (letter ((letter#) + (1)) of (encodied)))\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\ndefine Value=cloud# (number or text)\n\nwhen flag clicked\nset [names v] to [1]\nforever\n    if <(names) = [1]> then\n        wait until <not <key (n v) pressed?>>\n        set [names v] to [0]\n    else\n        wait until <not <key (n v) pressed?>>\n        set [names v] to [1]\n    end\nend\n\nbegin decode [encode]\n\ndefine Begin decode of (encode)\nset [encodied v] to (encode)\nset [letter# v] to [1]\n\nwhen I receive [setups v]\nsetup players\n\ndefine setup players\nset [color v] effect to (0)\nset [offline v] to [100]\nhide\nset [player v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <(My Player #) = (player)> then\n        hide\n        set [offline v] to [100]\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\nBegin decode of (value)\nvalue=read from encode\nif <(names) = [1]> then\n    say (join (player) (join [:] (value)))\nelse\n    say []\nend\nvalue=read from encode\nvalue=read from encode\nset x to (value)\nvalue=read from encode\nset y to (value)\nvalue=read from encode\nif <(value) = (Level)> then\n    set [ghost v] effect to (0)\nelse\n    say []\n    set [ghost v] effect to (100)\nend\nvalue=read from encode\npoint in direction (value)\n\ndefine value=cloud (player)\nif <(player) = [1]> then\n    set [value v] to [0]\nelse\n    if <(player) = [2]> then\n        set [value v] to [0]\n    else\n        if <(player) = [3]> then\n            set [value v] to [0]\n        else\n            if <(player) = [4]> then\n                set [value v] to [0]\n            else\n                if <(player) = [5]> then\n                    set [value v] to [0]\n                else\n                    if <(player) = [6]> then\n                        set [value v] to [0]\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to [0]\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nif  then\n    broadcast (Decode chat v)\nend\n\n@joining\n\nwhen flag clicked\ngo to [front v] layer\nset size to (135) %\ngo to x: (-1) y: (35)\nwait (3.5) seconds\nhide\n\nwhen I receive [full v]\nswitch costume to (full v)\nshow\n\nwhen I receive [joined v]\nswitch costume to (joined v)\nhide\n\nshow\n\nwhen I receive [joining v]\nswitch costume to (join v)\nshow\n\ngo to [front v] layer\n\n@Loading\n\nwhen flag clicked\ngo [forward v] (213) layers\nset size to (100) %\nhide\npoint in direction (90)\nclear graphic effects\ngo to x: (0) y: (-80)\n\nwhen I receive [joining v]\nrepeat (11)\n    create clone of (_myself_ v)\n    turn right (40) degrees\nend\n\nwhen I receive [joined v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (-6)\n        change size by (1)\n    end\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (6)\n        change size by (-1)\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nshow\nwait (4) seconds\nhide\n\n@Sprite5\n\nwhen flag clicked\ngo to [back v] layer\n\n@Sprite4\n\n@Sprite6\n\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo to [back v] layer\ngo [backward v] (98) layers\nforever\nend\n\nwhen flag clicked\n\nhide\n\n@Sprite8\n\nwhen I receive [next level v]\nnext costume\n\nset size to (85) %\n\ngo to x: (31) y: (39)\n\nwhen I receive [joined v]\n\nshow\n\nwhen flag clicked\nswitch costume to (box red \(1\) v)\ngo to [back v] layer\n\nhide\n\n@Boncing\n\nwhen flag clicked\nhide\nswitch costume to (?? v)\nforever\n    wait (pick random (15) to (22)) seconds\n    repeat (45)\n        show\n        change [ghost v] effect by (-10)\n        set [i_2 v] to (((I_2) * (0.8)) + (((-214) - (y position)) / (5)))\n        change y by (I_2)\n    end\n    wait (1) seconds\n    repeat (10)\n        change [ghost v] effect by (25)\n        change y by (((0) - (y position)) / (-9))\n    end\n    go to x: (71) y: (-350)\nend\n\nset [i_2 v] to [0]\n\nchange y by (I_2)\n\nwhen flag clicked\ngo to x: (71) y: (-260)\n\n@Sprite9\n\n@lava\n\nwhen flag clicked\nforever\n    repeat (10)\n        change y by (((15) - (y position)) / (4))\n    end\n    wait (0.2) seconds\n    repeat (10)\n        change y by (((-10) - (y position)) / (4))\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\n\nwhen I receive [next level v]\nnext costume\n\n@Sprite10\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((30) - ((size) / (4)))\n    else\n        change size by ((25) - ((size) / (4)))\n    end\nend\n\nwhen flag clicked\n\ngo to x: (170) y: (156)\n\nwhen this sprite clicked\nnext costume\nstart sound [Wood Tap v]\nif <(costume [number v]) = [2]> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\n\nwhen flag clicked\nforever\n    play sound [tobu candyland v] until done\n    go to x: (-219) y: (156)\nend\n\n@Sprite11\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((30) - ((size) / (4)))\n    else\n        change size by ((25) - ((size) / (4)))\n    end\nend\n\nwhen flag clicked\ngo to x: (170) y: (156)\n\nwhen this sprite clicked\n\nstart sound [Wood Tap v]\n\nwhen flag clicked\nforever\n    go to x: (-178) y: (156)\nend\n\n@Sprite12\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        change size by ((30) - ((size) / (4)))\n    else\n        change size by ((25) - ((size) / (4)))\n    end\nend\n\nwhen flag clicked\n\ngo to x: (170) y: (156)\n\nwhen this sprite clicked\nstart sound [Wood Tap v]\nbroadcast (NEXT LEVEL v)\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    go to x: (-134) y: (156)\nend\n\n
After a 3 weeks development I present to you Nature a multiplayer platformer!!\nAnd this my first multiplayer platformer..\n\nNote :\nFor better performance and reduce lag press green flag twice!\n\nI spent many times so please love,fave and follow me : @-Space2-\n\nInstructions :\n1. Press skip button to skip level\n2. Press N to toggle names\n3.Arrow keys to move\n3.Dodge the dangers\n4.Touch Trampoline to bounce\n\nanother note:\nIf you're a new scratcher you can't play.\n\nCredits:\n1.@Stlcards422 and @Griffpatch for multiplayer engine\n2.@-SapphireDemon- for platforming engine (modified by me)\n3.@StratfordJames for BG costume and buttons art and cloud art and some thumbnail art\n4.@timmccool for Ground art,Soo much Inspiration Bouncing effect inspiration,Trampoline art and insporation to the player \n5.@EdisonBoy for some bouncing effect code.\n6.@JTHEJET for loading circle\n7.@Toadfanschool for some sounds\n8.Google for letters\n9.Textfx.co for thumbnail letters\n10.@Suhalo_351 for some inspiration\nmusic : Tobu - candyland from @timmccool\n\n\nThanks to the scratchers who pointed me bugs!\nPlease let me know if i didn't credit anyone!\nHave a nice day