Get the Gold | Platformer
@Stage\n\nwhen flag clicked\nset [which song next v] to (pick random (1) to (4))\nplay sound (Which song next) until done\nforever\n    change [which song next v] by (1)\n    if <(Which song next) = [5]> then\n        set [which song next v] to [1]\n    end\n    play sound (Which song next) until done\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\nhide\nhide variable [☁  fastest time: v]\nhide variable [☁ least amount of deaths: v]\nhide variable [your deaths: v]\nhide variable [your time: v]\nswitch costume to (player v)\nset [death sound ready? v] to [0]\nset [level v] to [1]\nset [spawnx v] to [0]\nset [spawny v] to [0]\ngo to x: (0) y: (0)\nset [xspeed v] to [0]\nset [yspeed v] to [0]\nset [your deaths: v] to [0]\nset [your time: v] to [0]\nforever\n    if <(Death Sound Ready?) > [0]> then\n        wait (0.4) seconds\n        set [death sound ready? v] to [0]\n    end\nend\n\ndefine Special Blocks\nif <touching (levels v)?> then\n    if <touching color (#ff0000)?> then\n        if <(Death Sound Ready?) = [0]> then\n            start sound [Death v]\n            set [death sound ready? v] to [1]\n            change [your deaths: v] by (1)\n        end\n        go to x: (spawnX) y: (spawnY)\n        set [xspeed v] to [0]\n        set [yspeed v] to [0]\n    end\n    if <touching color (#68ff68)?> then\n        if <([sqrt v] of ((((x position) - (spawnX)) * ((x position) - (spawnX))) + (((y position) - (spawnY)) * ((y position) - (spawnY)))) ) > [20]> then\n            Checkpoint Position\n            start sound [Checkpoint v]\n        end\n    end\n    if <touching color (#ff00ff)?> then\n        set [yspeed v] to [15]\n        start sound [Bounce v]\n    end\n    if <touching color (#00e1ff)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yspeed v] to [15]\n            start sound [Bounce v]\n        end\n    end\n    if <touching color (#ffd900)?> then\n        if <not <<(Level) > [8]> and <(Level) < [33]>>> then\n            start sound [win v]\n        end\n        change [level v] by (1)\n        Reset Level\n        broadcast (Next v)\n        set [xspeed v] to [0]\n        set [yspeed v] to [0]\n    end\n    if <touching color (#ffa600)?> then\n        set [level v] to [9]\n        Reset Level\n        broadcast (Next v)\n        set [xspeed v] to [0]\n        set [yspeed v] to [0]\n    end\nend\n\ndefine Reset Level\nif <(Level) = [1]> then\n    set [spawnx v] to [0]\n    set [spawny v] to [0]\nend\nif <(Level) = [2]> then\n    set [spawnx v] to [-225]\n    set [spawny v] to [-125]\nend\nif <(Level) = [3]> then\n    set [spawnx v] to [225]\n    set [spawny v] to [125]\nend\nif <(Level) = [4]> then\n    set [spawnx v] to [222]\n    set [spawny v] to [-160]\nend\nif <(Level) = [5]> then\n    set [spawnx v] to [-213]\n    set [spawny v] to [-120]\nend\nif <(Level) = [6]> then\n    set [spawnx v] to [-224]\n    set [spawny v] to [150]\nend\nif <(Level) = [7]> then\n    set [spawnx v] to [-224]\n    set [spawny v] to [-161]\nend\nif <(Level) = [8]> then\n    set [spawnx v] to [-224]\n    set [spawny v] to [154]\n    switch costume to (maze v)\nend\nif <<(Level) > [8]> and <(Level) < [33]>> then\n    set [spawnx v] to [205]\n    set [spawny v] to [125]\n    switch costume to (player v)\nend\nif <(Level) = [33]> then\n    set [spawnx v] to [-213]\n    set [spawny v] to [-160]\nend\nif <(Level) = [34]> then\n    set [spawnx v] to [-213]\n    set [spawny v] to [-160]\nend\nif <(Level) = [35]> then\n    set [spawnx v] to [213]\n    set [spawny v] to [-160]\nend\nif <(Level) = [36]> then\n    set [spawnx v] to [213]\n    set [spawny v] to [-160]\nend\nif <(Level) = [37]> then\n    set [spawnx v] to [-213]\n    set [spawny v] to [-160]\nend\nif <(Level) = [38]> then\n    set [spawnx v] to [-225]\n    set [spawny v] to [-165]\nend\nif <(Level) = [39]> then\n    set [spawnx v] to [0]\n    set [spawny v] to [-160]\nend\nif <(Level) = [40]> then\n    set [spawnx v] to [-213]\n    set [spawny v] to [-160]\n    hide variable [☁  fastest time: v]\n    hide variable [☁ least amount of deaths: v]\n    hide variable [your deaths: v]\n    hide variable [your time: v]\nend\nif <(Level) = [41]> then\n    set [spawnx v] to [0]\n    set [spawny v] to [-160]\nend\ngo to x: (spawnX) y: (spawnY)\nset [xspeed v] to [0]\nset [yspeed v] to [0]\n\ndefine Fix Y\nif <touching color (#000000)?> then\n    if <(ySpeed) > [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change y by (-1)\n        end\n    end\n    if <(ySpeed) < [0]> then\n        if <(ySpeed) < [-1]> then\n            if <(ySpeed) < [-7]> then\n                start sound [Land 1 v]\n            else\n                start sound [Land 2 v]\n            end\n        end\n        repeat until <not <touching color (#000000)?>>\n            change y by (1)\n        end\n    end\nend\n\ndefine Fix X\nif <touching color (#000000)?> then\n    if <(xSpeed) > [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change x by (-1)\n        end\n    end\n    if <(xSpeed) < [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change x by (1)\n        end\n    end\nend\n\ndefine Checkpoint Position\nset [x v] to (x position)\nset [y v] to (y position)\nchange x by (-30)\nrepeat until <touching color (#68ff68)?>\n    change x by (1)\nend\nset [1 v] to (x position)\nrepeat until <not <touching color (#68ff68)?>>\n    change x by (1)\nend\nset [2 v] to ((x position) - (1))\nset [spawnx v] to (((1) + (2)) / (2))\nchange x by (-10)\nchange y by (-30)\nrepeat until <touching color (#68ff68)?>\n    change y by (1)\nend\nset [1 v] to (y position)\nrepeat until <not <touching color (#68ff68)?>>\n    change y by (1)\nend\nset [2 v] to ((y position) - (1))\nset [spawny v] to (((1) + (2)) / (2))\ngo to x: (x) y: (y)\n\nwhen I receive [play v]\nshow\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xspeed v] by (1.3)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xspeed v] by (-1.3)\n    end\n    change x by (xSpeed)\n    if <touching color (#000000)?> then\n        Fix X\n        set [xspeed v] to [0]\n    else\n        set [xspeed v] to ((xSpeed) * (0.7))\n        if <<(xSpeed) > [-0.1]> and <(xSpeed) < [0.1]>> then\n            set [xspeed v] to [0]\n        end\n    end\n    change y by (ySpeed)\n    if <touching color (#000000)?> then\n        Fix Y\n        set [yspeed v] to [0]\n        if <(Can Jump) = [0]> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yspeed v] to [8]\n                set [can jump v] to [1]\n            end\n        end\n    else\n        change [yspeed v] by (-1)\n        if <(ySpeed) < [-15]> then\n            set [yspeed v] to [-15]\n        end\n        set [can jump v] to [0]\n    end\n    Special Blocks\n    if <key (r v) pressed?> then\n        go to x: (spawnX) y: (spawnY)\n        set [xspeed v] to [0]\n        set [yspeed v] to [0]\n        if <(Death Sound Ready?) = [0]> then\n            start sound [Death v]\n            set [death sound ready? v] to [1]\n            change [your deaths: v] by (1)\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    wait (1) seconds\n    if <(Level) = [39]> then\n        if <(Your time:) < (☁ Fastest time:)> then\n            set [☁ fastest time: v] to (Your time:)\n        end\n        if <(Your deaths:) < (☁ Least amount of deaths:)> then\n            set [☁ least amount of deaths: v] to (Your deaths:)\n        end\n        set [☁  fastest time: v] to (☁ Fastest time:)\n        set [your time: v] to (join (join ([floor v] of ((Your time:) / (3600)) ) [ : ]) (join (([floor v] of ((Your time:) / (60)) ) mod (60)) (join [ : ] ((Your time:) mod (60)))))\n        set [☁  fastest time: v] to (join (join ([floor v] of ((☁  Fastest time:) / (3600)) ) [ : ]) (join (([floor v] of ((☁  Fastest time:) / (60)) ) mod (60)) (join [ : ] ((☁  Fastest time:) mod (60)))))\n        show variable [☁  fastest time: v]\n        show variable [your deaths: v]\n        show variable [☁ least amount of deaths: v]\n        show variable [your time: v]\n        stop [this script v]\n    else\n        change [your time: v] by (1)\n    end\nend\n\n@Levels\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nhide\n\nwhen I receive [next v]\nswitch costume to (Level)\n\nwhen I receive [play v]\nshow\n\n@Thumbnail\n\nwhen [m v] key pressed\nif <<key (a v) pressed?> and <<key (n v) pressed?> and <key (t v) pressed?>>> then\n    show\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\n@Menu\n\nwhen flag clicked\nset [game v] to [false]\nshow\n\nwhen this sprite clicked\nif <(mouse y) < [-61]> then\n    start sound [Pop v]\n    hide\n    broadcast (Play v) and wait\nend\n\n
Everything is explained in the game.\n❤, ⭐ for a sequel that has a bonus feature! Follow me to know when it comes out!\n\nFor your information every level is possible, don't stop believing!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#scratch #game #games #fun #platformer #gold #cloud #highscore #all #trending #games #art #music #stories \n #nongeneric #get-the-gold #contest #--MantaRay-- @--MantaRay-- #prequel #gameseries #enjoy