Solar Eclipse || A Platformer
@Stage\n\nwhen I receive [next level v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop15 v)\n\nwhen flag clicked\nset [time v] to [0]\nrepeat until <(The Level) = [14]>\n    wait (.01) seconds\n    change [time v] by (.1)\nend\n\nwhen flag clicked\nforever\n    if <<(Time) < (☁ World Record)> and <(The Level) = [14]>> then\n        set [☁ world record v] to (round (Time))\n        stop [this script v]\n    end\nend\n\nset [☁ world record v] to [60]\n\nset [☁ world record v] to [60]\n\nwhen flag clicked\nhide variable [☁ world record v]\nhide variable [time v]\nforever\n    if <(backdrop [number v]) = [14]> then\n        show variable [☁ world record v]\n        show variable [time v]\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Nebula v] until done\nend\n\n@Screenshot 2023-03-08 2\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nforever\n    go to [front v] layer\n    show list [copy & paste v]\nend\n\n@Player\n\nwhen I receive [next level v]\nbroadcast (Reset v)\n\nwhen flag clicked\nhide\nset [the level v] to [1]\nshow\nwait until <(Start?) = [1]>\nbroadcast (Next Level v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [x velocity v] by (-1.5)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [x velocity v] by (1.5)\n    end\n    set [x velocity v] to ((X Velocity) * (0.85))\n    change x by (X Velocity)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-10]\n            else\n                set [x velocity v] to [10]\n            end\n            set [y velocity v] to [15]\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            switch costume to (crouch v)\n        else\n            switch costume to (player v)\n        end\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y velocity v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [the level v] by (1)\n    end\n    if <touching (spikes v)?> then\n        broadcast (Reset v)\n        create clone of (_myself_ v)\n    else\n        if <touching (lava v)?> then\n            broadcast (Reset v)\n        end\n        if <touching (spikes v)?> then\n            broadcast (Reset v)\n        end\n    end\nend\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\ngo to x: (-216) y: (40)\n\nwhen flag clicked\nforever\n    if <touching (sprite1 v)?> then\n        go to x: (-216) y: (40)\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.001) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-10)\n    change [ghost v] effect by (10)\n    change [color v] effect by (10)\nend\ndelete this clone\n\nset [the level v] to [14]\n\nwhen flag clicked\nforever\n    if <touching color (#ff00f6)?> then\n        hide list [copy & paste v]\n    end\nend\n\nwhen flag clicked\nshow list [copy & paste v]\nforever\n    add (https://scratch.mit.edu/projects/818588350/) to [copy & paste v]\nend\n\nwhen flag clicked\nforever\n    set [https://scratch.mit.edu/projects/818588350/ v] to [https://scratch.mit.edu/projects/818588350/]\nend\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume15 v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [14]> then\n        forever\n            broadcast (outro v)\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nswitch costume to (costume15 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@solar-eclipse-7814457-6267531\n\nwhen flag clicked\nset [coins v] to [0]\nswitch costume to (solar-eclipse-7814457-15 v)\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        hide\n        change [coins v] by (1)\n    end\nend\n\nwhen I receive [next level v]\nnext costume\nshow\n\nswitch costume to (solar-eclipse-7814457-7 v)\n\nwhen flag clicked\nforever\n    if <(Coins) = [13]> then\n        set [time v] to ((Time) - (5))\n        stop [this script v]\n    end\nend\n\n@particles\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\n    go to (random position v)\n    set y to (-180)\n    create clone of (_myself_ v)\n    wait (0.05) seconds\nend\n\nwhen I start as a clone\nshow\nset size to (pick random (80) to (110)) %\nset [ghost v] effect to (pick random (50) to (70))\npoint in direction (pick random (45) to (-45))\nrepeat until <<<(y position) > [177]> or <(x position) > [237]>> or <(x position) < [-237]>>\n    move (10) steps\nend\ndelete this clone\n\n
This was for a science project, and I had to make a model of a solar eclipse. I decided to branch out and make a platformer. Yes, it may be generic, but it took over 2 hours and over 150 blocks. :p I hope you enjoy it!\n=============================================\nIf you like it please tell me. :D\n=============================================\nA solar eclipse happens when the sun is directly in front of you and the moon rotates to align perfectly with the sun and the Earth, and only part of the Earth can see it.\n=============================================\nTry to collect the little eclipse symbols! If you collect all of them, your time will get subtracted by five.\n=============================================