Natural -A Scrolling Platformer

Instructions: Hey ! Welcome to Natural - A Scrolling Platformer Mobile Friendly\n___________________________________________\nClick on the green flag =)\nPress the arrows to move !\nNo advertising !\n\nThis game is my first attempt to scrolling plateformer, this game is short, please like and fave this project, follow me!!!!\n\nCredits :\n\nThanks to @griffpatch for the scrolling platformer\nThanks to @Kodiak77-77 for the "Play" sprite!!\nThanks to @stanevan and @JojoLeVrai !!!\n\n@LOLele_54 love my project!!!\n@Twin138956Scratch love my project!!!\n\nTags :\n\n#Rolibdan32  #Natural #Games #Art #Explore #Platformer #Scratch #Music #JojoLeVrai and stanevan #Popular #Recent #Love #Favorite #Follow

@Stage\n\n@Sprite\n\nwhen I receive [greenflah v]\ngo to [front v] layer\nhide\n\nwhen I receive [play game 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) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [A win win]> then\n        GameWinYOO\n    else\n        Game - die boi boi I’m fed\n    end\nend\n\ndefine Game on\nswitch costume to (1 v)\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [78]\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (50) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <(Speedy) > [-20]> then\n    change [speedy v] by (-1.5)\nend\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (15)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nPosition\nif <(SCROLL Y) < [-30]> then\n    set [exit v] to [Die]\nend\nif <touching (trampoline  v)?> then\n    if <(In air) < [4]> then\n        set [speedy v] to [30]\n    end\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (sprite2 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 [speedy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (sprite2 v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (sprite2 v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (sprite2 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 boi boi I’m fed\nset [ghost v] effect to (0)\n\ndefine Die? I think so\nif <touching (sprite4 v)?> then\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine GameWinYOO\nrepeat (20)\n    point towards (collectibles2 v)\n    turn right (65) degrees\n    move ((distance to [collectibles2 v]) / (2)) steps\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (0)\nset size to (100) %\nchange [level v] by (1)\nwait (0.5) seconds\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen I receive [begin  v]\nshow\nbroadcast (Greenflah v) and wait\nbroadcast (Play game v) and wait\n\nwhen flag clicked\nhide\n\nstart sound [Bonk v]\nset rotation style [all around v]\nset [y v v] to [15]\nrepeat until <(y position) < [-90]>\n    switch costume to (1 v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nrepeat until <(y position) < [-90]>\n    switch costume to (die v)\n    change [ghost v] effect by (11)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\n\n@Sprite2\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nend\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\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nwait until <(LEVEL) = [5]>\nbroadcast (Costume v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo [backward v] (1) layers\n\n@Sprite4\n\nwhen I receive [greenflah v]\nshow\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nswitch costume to (costume1 v)\nif <(LEVEL) = [1]> then\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\n    Position x: [450] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (lvl 2 1 v)\n        Position x: [450] y: [0]\n        Position x: [1000] y: [-30]\n        Position x: [1000] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (lvl 3 1 v)\n            Position x: [450] y: [0]\n            Position x: [700] y: [0]\n            Position x: [450] y: []\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (lvl 3 5 v)\n                Position x: [150] y: [100]\n                Position x: [300] y: [100]\n                Position x: [500] y: [-130]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (lvl 2 v)\n                    Position x: [200] y: [-14]\n                    Position x: [400] y: [100]\n                    Position x: [530] y: [100]\n                end\n            end\n        end\n    end\nend\n\nPosition x: [0] y: [100]\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\ndefine Position x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nhide\n\nPosition x: [300] y: [100]\n\nPosition x: [500] y: [-130]\n\n@Home\n\nwhen flag clicked\nhide\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nswitch costume to (name2 v)\ncreate clone of (_myself_ v)\nswitch costume to (button 1 v)\ncreate clone of (_myself_ v)\nswitch costume to (button 2 v)\ncreate clone of (_myself_ v)\nswitch costume to (collab v)\ncreate clone of (_myself_ v)\nswitch costume to (background v)\ncreate clone of (_myself_ v)\n\ndefine Smooth Glide to x (x) y (y) Speed (s)\nrepeat until <<(round (x position)) = (x)> and <(round (y position)) = (y)>>\n    change x by (((x) - (x position)) / (s))\n    change y by (((y) - (y position)) / (s))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\n\nwhen I start as a clone\nif <(costume [name v]) = [Name]> then\n    set [ghost v] effect to (100)\n    go to x: (0) y: (120)\n    show\n    repeat (10)\n        change [ghost v] effect by (-9)\n    end\n    set [sine v] to [0]\n    forever\n        point in direction ((([sin v] of (sine) ) * (6)) + (90))\n        change [sine v] by (10)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Name]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Name2]> then\n    set [ghost v] effect to (100)\n    go to x: (-7) y: (50)\n    show\n    point in direction (90)\n    repeat (25)\n        change [ghost v] effect by (-3.5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Background]> then\n    set [ghost v] effect to (40)\n    go to [back v] layer\n    go to x: (10) y: (-30)\n    show\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 1]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 1]> then\n    set size to (85) %\n    show\n    point in direction (90)\n    go to x: (300) y: (-70)\n    Smooth Glide to x [92] y [-70] Speed [6]\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (Button 1 in v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Collab]> then\n    set size to (70) %\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-145)\n    show\n    point in direction (90)\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 2]> then\n    set size to (80) %\n    show\n    point in direction (90)\n    go to x: (-300) y: (-70)\n    Smooth Glide to x [0] y [-70] Speed [6]\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (Begin  v)\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Button 2]> then\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (5)\n            change size by (((110) - (size)) / (4))\n        else\n            set [ghost v] effect to (0)\n            change size by (((100) - (size)) / (4))\n        end\n    end\nend\n\nbroadcast (Begin  v)\n\nwhen I receive [begin  v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nforever\n    start sound [Xenogenesis v]\n    wait (230) seconds\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        stop all sounds\n        forever\n            start sound [Marshmello - Alone  v]\n            wait (199) seconds\n        end\n    end\nend\n\n@Tn\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (36) y: (-24)\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n