Day and Night || A Platformer
@Stage\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nswitch costume to (costume1 v)\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nforever\n    play sound [Inferno v] until done\nend\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to x: (0) y: (0)\nend\n\n@light\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    point towards (player v)\n    move ((distance to [player v]) / (2)) steps\nend\n\nwhen flag clicked\nforever\n    set size to (((8) * ([cos v] of ((timer) * (150)) )) + (65)) %\nend\n\n@player\n\ndefine Run Engine\nchange [y v] by (-0.5)\nif <<key (left arrow v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>> then\n    point in direction (-90)\n    change [x v] by (-0.7)\nend\nif <<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    point in direction (90)\n    change [x v] by (0.7)\nend\nset [x v] to ((x) * (0.9))\nchange x by (x)\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (-6)\n                            change x by ((x) * (-1))\n                            if <<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>> then\n                                set [y v] to [9]\n                                if <(x) > [0]> then\n                                    set [x v] to [-8]\n                                else\n                                    set [x v] to [8]\n                                end\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (y)\nif <touching (level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-0.5)\nif <<<touching (level v)?> and <key (up arrow v) pressed?>> or <<touching (level v)?> and <<(mouse y) > (y position)> and <mouse down?>>>> then\n    set [y v] to [9]\nend\nchange y by (0.5)\nif <touching (death v)?> then\n    go to x: (X position) y: (Y Position)\n    set [x v] to [0]\n    set [y v] to [0]\nend\nif <touching (trampoline v)?> then\n    set [y v] to [14]\nend\nif <touching (speed boost v)?> then\n    set [x v] to [20]\nend\nif <(x position) > [233]> then\n    go to x: (X position) y: (Y Position)\n    set [x v] to [0]\n    set [y v] to [0]\n    change [level v] by (1)\nend\n\nwhen flag clicked\nset [y position v] to [-50]\nset [x position v] to [-218]\nset rotation style [left-right v]\ngo to x: (X position) y: (Y Position)\nset [level v] to [1]\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    Run Engine\nend\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to x: (0) y: (0)\n    switch costume to (level)\nend\n\n@death\n\nwhen flag clicked\ngo to x: (36) y: (28)\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@speed boost\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    switch costume to (level)\nend\n\n@trampoline\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nswitch costume to (costume1 v)\nforever\n    switch costume to (level)\nend\n\n
Instructions:\nArrow keys to move, trampolines make you jump higher, speed boosts make you faster.\n_________________________________________________\nStory:\nYou are an ordinary cube, but you want to be unique. So you take this challenge, where you have to overcome obstacles. You take day and night to do it.\n\n_________________________________________________\nSequel is out!\nhttps://scratch.mit.edu/projects/440175048/