scrolling platformer v3.2

Instructions: lukt het jou om het spel uitte spelen?\n100 fav @foxyscratcher2009\n\nbekijk ook mijn andere projecten :)\nlook at my other projects :)\nhttps://scratch.mit.edu/projects/384905829 https://scratch.mit.edu/projects/379257465\nhttps://scratch.mit.edu/projects/379256038\nhttps://scratch.mit.edu/projects/379094893\nhttps://scratch.mit.edu/projects/380676571\nhttps://scratch.mit.edu/projects/379504645\n\nen kijk ook naar die van andere scratchers die ik volg\nand look too other projects from other scratchers\n\nhttps://scratch.mit.edu/projects/379225009\n\nscroll niet naar beneden!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#sans #hello #no #way #when #there #is #no #doritos\n#music #muziek #games #game #spel #spelletje #spelletjes #undertale #pokemon #pokémon #digimon #dragon ball \n?mode=trending #story #verhalen #animations #animaties\n#lol #:)

@Stage\n\nwhen flag clicked\nswitch backdrop to (achtergrond1 v)\n\nchange [color v] effect by (1)\nchange [brightness v] effect by (pick random (1.1) to (-1))\nchange [color v] effect by (1)\nchange [brightness v] effect by (pick random (1) to (-1))\n\n@player\n\nwhen I start as a clone\ngo to [back v] layer\nset [brightness v] effect to (2)\nset [ghost v] effect to (5)\nrepeat (9)\n    change size by (-5)\n    change [ghost v] effect by (5)\n    change y by (((sy) - ((sy) * (2))) - (2))\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change x by (4)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change x by (-4)\n    end\nend\ndelete this clone\n\nwhen flag clicked\nswitch backdrop to (achtergrond1 v)\nset [deaths v] to [0]\nbroadcast (play name v) and wait\nbroadcast (green flag v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play name v]\nset [level v] to [1]\nforever\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    game on\n    repeat until <(exit) = [die]>\n        tick\n        broadcast (tick v) and wait\n    end\n    game die\nend\n\ndefine game on\nset [s v] to [16]\nset [x v] to [0]\nset [y v] to [0]\nset [in air v] to [0]\nset [sy v] to [0]\nset [exit v] to []\nshow\n\ndefine tick\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    chance player x by [10]\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    chance player x by [-10]\nend\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    if <(in air) < [4]> then\n        set [sy v] to (s)\n    end\nend\nchange [sy v] by (-2)\nchance player y by (sy)\nposition\nset [scrol x v] to (x)\nif <(scrol x) < [0]> then\n    set [scrol x v] to [0]\nend\nset [scrol y v] to (y)\nposition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine chance player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\ntest die\nrepeat until <not <touching (sprite1 v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\ndefine position\ngo to x: ((x) - (scrol x)) y: ((y) - (scrol y))\n\ndefine chance player x by (sx)\nchange [x v] by (sx)\nposition\ntest die\nif <touching (sprite1 v)?> then\n    repeat (20)\n        change [y v] by (1)\n        position\n        if <not <touching (sprite1 v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-20)\n    repeat until <not <touching (sprite1 v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        position\n    end\nend\n\ndefine game die\nbroadcast (dood v)\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\nchange [deaths v] by (1)\n\ndefine test die\nif <touching color (#ff0000)?> then\n    set [exit v] to [die]\nend\nif <touching color (#00ffff)?> then\n    if <not <[mensen die het spel gehaalt hebben club v] contains (username)?>> then\n        add (username) to [mensen die het spel gehaalt hebben club v]\n    end\n    broadcast (je zit bij de club v)\nend\n\nwhen flag clicked\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\ngo to x: (0) y: (0)\n\ngo to x: (0) y: (0)\n\ngo to x: (0) y: (0)\n\nhide\n\nwhen [timer v] > (0.1)\nhide\n\ngo to x: (0) y: (0)\n\nwhen I receive [je zit bij de club v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [setup v]\nswitch costume to (pick random (1) to (4))\n\nwhen I receive [skins v]\nswitch costume to (pick random (1) to (4))\n\nswitch costume to (4 v)\n\nturn left (15) degrees\n\n@Sprite1\n\nwhen flag clicked\nshow\n\nwhen I receive [tick v]\nposition ((X) - (scrol x)) ((Y) - (scrol y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (uiterlijk1 v)\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (300)\nchange [y v] by (200)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (360)\nchange [y v] by (100)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (-500)\nchange [y v] by (100)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (-500)\nchange [y v] by (100)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (-500)\nchange [y v] by (100)\nnext costume\ncreate clone of (_myself_ v)\nchange [x v] by (-300)\nnext costume\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [dood v]\nchange x by (((scrol x) / (20)) * (-1))\nchange y by (((scrol y) / (20)) * (-1))\n\nwhen I receive [je zit bij de club v]\nforever\n    hide\n    stop [other scripts in sprite v]\n    delete this clone\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: ((xx) - (scrol x)) y: ((yy) - (scrol y))\n\nwhen I receive [setup v]\nset [coins v] to [0]\nset [xx v] to [360]\nset [yy v] to [60]\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nchange [yy v] by (-20)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nchange [yy v] by (50)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nchange [yy v] by (-40)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nchange [yy v] by (100)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nchange [yy v] by (40)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\ncreate clone of (_myself_ v)\nchange [xx v] by (360)\nnext costume\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nhide variable [☁ user name v]\nposition ((xx) - (scrol x)) ((yy) - (scrol y))\nif <(☁ record coins) < (coins)> then\n    set [☁ record coins v] to ((coins) + (☁ user name))\n    set [☁ user name v] to (username)\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <touching (player v)?> then\n    broadcast (got a coin v)\n    change [coins v] by (1)\n    delete this clone\nelse\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        show\n    else\n        hide\n    end\n    if <touching (sprite1 v)?> then\n        hide\n    else\n    end\nend\n\nwhen I receive [je zit bij de club v]\nhide\n\n@Sprite3\n\nwhen I receive [tick v]\nposition ((YY) - (scrol x)) ((XX) - (scrol y))\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <touching (player v)?> then\n    change [s v] by (4)\n    delete this clone\nelse\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [setup v]\nset [xx v] to [400]\nset [yy v] to [0]\ncreate clone of (_myself_ v)\nchange [xx v] by (400)\n\nwhen flag clicked\nshow\n\nhide\n\n@Sprite4\n\nwhen flag clicked\nmusic on\n\ndefine music on\n\ndefine music of\n\ndefine menu\n\nset [☁ record coins v] to [0]\n\nwhen flag clicked\nset [spel = v] to [niet gewonnen]\nrepeat until <(spel =) = [gewonnen]>\n    play sound [Alan Walker - Fade2 v] until done\nend\n\nif <<mouse down?> and <touching (mouse-pointer v)?>> then\n    music of\nend\n\n\n\nwhen this sprite clicked\nnext costume\n\nhide\n\nshow\n\nset [muziek aan/uit v] to [aan]\nswitch costume to (uiterlijk2 v)\nstart sound [Dance Celebrate v]\nwait (10) seconds\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        music of\n    else\n        music on\n    end\nend\n\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        music of\n    end\nend\n\nstop [other scripts in sprite v]\nswitch costume to (uiterlijk3 v)\nstop all sounds\nwait (1) seconds\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        music on\n    end\nend\n\nwhen I receive [je zit bij de club v]\nstop all sounds\nset [spel = v] to [gewonnen]\nforever\n    play sound [OMFG - Hello.mp3 v] until done\nend\n\nwhen [timer v] > (0.1)\nstop all sounds\nplay sound [OMFG - Hello.mp3 v] until done\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (-61) y: (23)\nswitch costume to (uiterlijk1 v)\nshow\n\nwhen [timer v] > (0.1)\nhide\n\nwhen this sprite clicked\nbroadcast (skins v)\n\nwhen I receive [je zit bij de club v]\nhide\n\n@thumbnail\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nhide\n\ngo to x: (0) y: (0)\n\nwhen [timer v] > (0.1)\nshow list [mensen die het spel gehaalt hebben club v]\nswitch backdrop to (achtergrond2 v)\nswitch costume to (achtergrond1 v)\nshow\n\n@enemy\n\nhide\n\nwhen I receive [green flag v]\n\n@text\n\nwhen I receive [reset v]\nset [brightness v] effect to (100)\npoint in direction (90)\ndelete text\nset [text v] to (join [deaths:] (deaths))\nmake text\n\ndefine make text\ngo to x: (-230) y: (160)\nset [nummer text v] to [1]\ncreate clone of (_myself_ v)\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nmove (12) steps\nswitch costume to (letter (nummer text) of (text))\nif <(nummer text) = (length of (text))> then\n    set [text = v] to [klaar]\nelse\n    change [nummer text v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine delete text\ndelete this clone\n\nwhen flag clicked\nhide\nshow list [mensen die het spel gehaalt hebben club v]\ndelete this clone\n\nwhen I receive [je zit bij de club v]\nset [brightness v] effect to (0)\nswitch backdrop to (achtergrond2 v)\ndelete text\nhide list [mensen die het spel gehaalt hebben club v]\nset [text v] to (join [je zit bij de club! ] [])\nmake text\n\ngo to x: (-230) y: (160)\n\ngo to x: (-230) y: (160)\n\ndefine maak eind test\nset [text = v] to [special]\nturn right (pick random (3) to (-3)) degrees\ngo to x: (-100) y: (140)\nset [nummer text v] to [1]\ncreate clone of (_myself_ v)\ndelete this clone\n\nif  then\nend\n\nwait (0.01) seconds\nset [text = v] to [special]\ndelete text\nmaak eind test\nif <(text =) = [special]> then\nelse\nend\n\nbroadcast (je zit bij de club v)\n\nbroadcast (je zit bij de club v)\n\nwhen [timer v] > (0.1)\nhide\n\n@text2\n\ndefine make text\ngo to x: (-230) y: (130)\nset [nummer text2 v] to [1]\ncreate clone of (_myself_ v)\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nset [brightness v] effect to (100)\nchange x by (12)\nswitch costume to (letter (nummer text2) of (text2))\nif <(nummer text2) = (length of (text2))> then\nelse\n    change [nummer text2 v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine delete text\ndelete this clone\n\nwhen flag clicked\ndelete text\nset [text2 v] to (join [coins:] (coins))\nmake text\n\nwhen I receive [got a coin v]\ndelete text\nset [text2 v] to (join [coins:] (coins))\nmake text\n\nwhen I receive [je zit bij de club v]\nswitch backdrop to (achtergrond2 v)\ndelete text\n\n@text3\n\ndefine make text\ngo to x: (-230) y: (100)\nset [nummer text3 v] to [1]\ncreate clone of (_myself_ v)\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to [front v] layer\nset [brightness v] effect to (100)\nchange x by (13)\nswitch costume to (letter (nummer text3) of (text3))\nif <(nummer text3) = (length of (text3))> then\n    set [text = v] to [klaar]\nelse\n    change [nummer text3 v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine delete text\ndelete this clone\n\nwhen flag clicked\ndelete text\nset [text3 v] to (join [record-coins:] (☁ record coins))\nmake text\n\nwhen I receive [je zit bij de club v]\nswitch backdrop to (achtergrond2 v)\ndelete text\n\n@Sprite6\n\nwhen I receive [je zit bij de club v]\ndraai\n\nwhen flag clicked\nhide\ndelete this clone\n\ndefine draai\nforever\n    turn right (15) degrees\nend\n\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-200) to (200)) y: (pick random (-200) to (200))\nrepeat (20)\n    glide (((x position) / (150)) + ((y position) / (150))) secs to (random position v)\nend\ndelete this clone\n\nwhen I receive [je zit bij de club v]\nforever\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\n\nbroadcast (je zit bij de club v)\n\n@Sprite7\n\n