☾  PLATFORMER & PLATFORMER  ☽                             scrolling platformer   
@Stage\n\nwhen flag clicked\nshow variable [level v]\nforever\n    if <(Level) > [5]> then\n        if <(Level) > [10]> then\n            switch backdrop to (backdrop3 v)\n        else\n            switch backdrop to (backdrop2 v)\n        end\n    else\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Main Theme v] until done\nend\n\nwhen flag clicked\nset [music v] to [25]\nset [pitch v] effect to (music)\n\nwhen I receive [next level v]\nset [music v] to (() - (music))\nset [pitch v] effect to (music)\n\nwhen I receive [win! v]\nset [pitch v] effect to (0)\nhide variable [level v]\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [next level v]\nwait (1) seconds\nif <(costume [number v]) = [10]> then\n    broadcast (Win! v) and wait\n    set [level v] to [11]\nend\nnext costume\n\nwhen I receive [win! v]\nhide\n\nwhen I receive [previous level v]\nwait (1) seconds\nswitch costume to ((costume [number v]) - (1))\n\n@BG\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nforever\n    set [level v] to ([costume # v] of [ground v])\n    switch costume to ([costume # v] of [ground v])\n    if <touching (player v)?> then\n        set [ghost v] effect to (25)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [win! v]\nhide\nstop [other scripts in sprite v]\n\n@Tolls\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [front v] layer\n\nwhen I receive [die v]\nwait (1) seconds\nbroadcast (Set Trolls v)\n\nwhen I receive [set trolls v]\nclear graphic effects\nstop [other scripts in sprite v]\nhide\npoint in direction (90)\nwait (0.1) seconds\nif <(Level) = [2]> then\n    switch costume to (costume2 v)\n    go to x: (0) y: (180)\n    wait until <([x position v] of [player v]) > [0]>\n    show\n    repeat (25)\n        change y by (-15)\n    end\n    hide\n    stop [this script v]\nend\nif <<<(Level) = [3]> or <(Level) = [4]>> or <<(Level) = [9]> or <(Level) = [10]>>> then\n    go to x: (0) y: (0)\n    switch costume to ((Level) - (1))\n    show\n    set [ghost v] effect to (100)\n    wait until <touching (player v)?>\n    set [ghost v] effect to (0)\nend\nif <(Level) = [5]> then\n    go to x: (0) y: (0)\n    wait until <([x position v] of [player v]) > [0]>\n    switch costume to (costume5 v)\n    show\n    repeat (22)\n        change x by (20)\n    end\n    hide\n    wait (0.5) seconds\n    point in direction (-90)\n    show\n    repeat (22)\n        change x by (-20)\n    end\n    hide\n    stop [this script v]\nend\nif <(Level) = [6]> then\n    go to x: (0) y: (0)\n    switch costume to (costume6 v)\n    show\n    wait until <([x position v] of [player v]) > [-90]>\n    switch costume to (costume7 v)\nend\nif <(Level) = [8]> then\n    go to x: (0) y: (0)\n    wait (0.75) seconds\n    switch costume to (costume8 v)\n    show\n    repeat (30)\n        change x by (15)\n    end\n    hide\nend\n\nwhen I receive [win! v]\nstop [other scripts in sprite v]\nhide\n\n@Player\n\nwhen flag clicked\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nshow\nforever\n    switch costume to (costume1 v)\n    if <<<mouse down?> and <(mouse x) > [0]>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        change [xv v] by (1)\n    end\n    if <<<mouse down?> and <[0] > (mouse x)>> or <<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    change x by (round (Xv))\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by (round ((Xv) * (-1)))\n                            change y by (-5)\n                            if <<<mouse down?> and <(mouse y) > [0]>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> 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    \n        set [yv v] to [20]\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<mouse down?> and <(mouse y) > [0]>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n    end\n    if <<[-178] > (y position)> or <touching (tolls v)?>> then\n        switch costume to (costume2 v)\n        broadcast (Die v)\n        wait (1.1) seconds\n    end\nend\n\nwhen I receive [next level v]\nbroadcast (Die v)\n\nwhen I receive [die v]\nwait (1) seconds\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (0)\n\nwhen I receive [win! v]\nhide\n\n@thumbnail\n\nwhen flag clicked\nhide\n\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nhide variable [level v]\n\n@Sprite1\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <(Level) > [1]> then\n    broadcast (Die v)\n    broadcast (Previous Level v)\nend\n\n
NEW GAME! https://scratch.mit.edu/projects/561068877\n\nif you have a game idea go here! https://scratch.mit.edu/projects/442888407\n\nafter about a week of work trapped a 3d platformer!\nremember to love and fave if you enjoyed and follow to show support when you have loved and faved click x to skip a level\n\n---------------------------instructions-------------------------\nmouse to look around wasd to move and space to jump! 