Olympics || A Platformer #Games #Stories #All

Instructions: Go see my new game! https://scratch.mit.edu/projects/564874152\n-------------------------------------------------------------------------------\nSpam green flag for best results! If the red guy pops up when you start the game just clicked the green flag again\n---------------------------------------------------------------------------------\nuse arrow keys or w.a.s.d. to move and try to reach the end of the OLYMPICS!!\n--------------------------------------------------------------------------------- there are 11 levels to me level 10 is probably the hardest but for others it's level 3 XD 

@Stage\n\nwhen flag clicked\nrepeat until <(level) = [12]>\n    play sound [Waddle Dee Tank - Kirby's Return To Dreamland v] until done\nend\n\nwhen flag clicked\nif <(level) = [12]> then\n    stop all sounds\nend\n\n@Player\n\ndefine Walk (direction) (speed)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (ground v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <<key (up arrow v) pressed?> and <([abs v] of (speed) ) > [3]>> then\n        if <(wall jump) = [0]> then\n            set [speed x v] to ((-1.2) * (speed))\n            set [speed y v] to [10]\n            set [falling? v] to [6]\n            set [wall jump v] to [15]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nif <(speed) < [0]> then\n    change [frame v] by ((speed) / (-8))\nelse\n    change [frame v] by ((speed) / (8))\nend\n\ndefine Touch Ground <up?>\nchange [falling? v] by (1)\nrepeat until <not <touching (ground v)?>>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\nend\n\nwhen flag clicked\nswitch costume to (right v)\nset size to (100) %\nset rotation style [left-right v]\ngo to x: (-200) y: (0)\npoint in direction (90)\nshow\nset [speed y v] to [0]\nset [falling? v] to [10]\nforever\n    if <<(speed y) < [4]> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        change [speed y v] by (-1)\n    else\n        change [speed y v] by (-2)\n    end\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <(wall jump) > [0]> then\n        change [wall jump v] by (-1)\n    else\n        set [speed x v] to ((speed x) * (0.7))\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [speed x v] by (-2)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [speed x v] by (2)\n        end\n    end\n    if <(speed x) < [-0.5]> then\n        Walk (-90) (speed x)\n    else\n        if <(speed x) > [0.5]> then\n            Walk (90) (speed x)\n        else\n            set [frame v] to [0]\n        end\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <<(jump key) = [0]> and <(falling?) < [3]>> then\n            set [speed y v] to [16]\n            set [falling? v] to [6]\n            set [jump key v] to [1]\n        end\n    else\n        set [jump key v] to [0]\n    end\n    if <<<key (up arrow v) pressed?> and <key (right arrow v) pressed?>> or <<key (w v) pressed?> and <key (d v) pressed?>>> then\n        switch costume to (right jump v)\n        if <<<key (up arrow v) pressed?> and <key (left arrow v) pressed?>> or <<key (w v) pressed?> and <key (a v) pressed?>>> then\n            switch costume to (left jump v)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            point in direction (90)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            point in direction (-90)\n        end\n    end\n    if <(y position) = [-81]> then\n        switch costume to (right v)\n    end\n    if <(y position) = [-82]> then\n        switch costume to (right v)\n    end\n    if <(y position) = [-83]> then\n        switch costume to (right v)\n    end\n    if <(y position) = [-52]> then\n        switch costume to (right v)\n    end\n    if <(y position) = [-80]> then\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\nforever\n    if <<touching (danger!!! v)?> or <touching (more danger!!! v)?>> then\n        go to x: (-200) y: (-50)\n    end\nend\n\nwhen flag clicked\nrepeat until <(level) = [12]>\n    if <touching color (#80ceff)?> then\n        go to x: (-200) y: (-50)\n        switch costume to (right v)\n        broadcast (next level v)\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\n\nwhen flag clicked\nforever\n    if <touching (even more danger!!! v)?> then\n        go to x: (-200) y: (-50)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-200) y: (-50)\n    end\nend\n\n@DANGER!!!\n\nwhen flag clicked\nswitch costume to (welcome v)\n\nwhen I receive [next level v]\nnext costume\n\n@more DANGER!!!\n\ndefine Animate Until costume: (number) Sec: (second)\nrepeat until <(costume [number v]) = (number)>\n    wait (second) seconds\n    next costume\nend\n\nwhen flag clicked\nhide\ngo to x: (-100) y: (-83)\nset rotation style [left-right v]\nwait until <(level) = [3]>\nshow\nrepeat until <(level) = [4]>\n    switch costume to (costume19 v)\n    repeat (30)\n        check\n        move (7) steps\n    end\n    check\n    switch costume to (costume20 v)\n    repeat (30)\n        check\n        move (-7) steps\n    end\nend\nhide\nwait until <(level) = [8]>\nshow\nrepeat until <(level) = [9]>\n    switch costume to (costume19 v)\n    repeat (25)\n        check2\n        move (6) steps\n    end\n    check2\n    switch costume to (costume20 v)\n    repeat (25)\n        check2\n        move (-6) steps\n    end\nend\nhide\n\nwhen flag clicked\nforever\n    wait (0.7) seconds\n    Animate Until costume: [10] Sec: []\nend\n\ndefine check\nif <(level) = [4]> then\n    hide\nend\n\ndefine check2\nif <(level) = [9]> then\n    hide\nend\n\n@even more DANGER!!!\n\ndefine check\nif <(level) = [11]> then\n    hide\nend\n\nwhen flag clicked\nrepeat until <(level) = [10]>\n    hide\nend\nshow\ngo to x: (221) y: (-83)\nrepeat until <(level) = [11]>\n    check\n    repeat (33)\n        check\n        move (-15) steps\n    end\n    check\n    go to x: (219) y: (-83)\nend\nhide\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (welcome v)\n\n@Words\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Sprite1\n\nwhen flag clicked\nhide\nwait until <(level) = [12]>\nstop all sounds\ngo to [front v] layer\nshow\nforever\n    play sound [Mario moosic v] until done\nend\n\n@referee\n\nwhen flag clicked\nshow\ngo to x: (-190) y: (130)\n\n@next\n\n@judge\n\nwhen flag clicked\nhide\nwait until <(level) = [11]>\nshow\nif <(level) = [12]> then\n    hide\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Block count\n\nwhen flag clicked\nhide variable [time v]\nset [time v] to [0]\nrepeat until <(level) = [12]>\n    wait (1) seconds\n    change [time v] by (1)\nend\nstop [this script v]\n\nwhen flag clicked\nwait until <(level) = [12]>\nset [☁ time v] to (time)\nforever\n    if <key (space v) pressed?> then\n        show variable [☁ time v]\n        wait (5) seconds\n        hide variable [☁ time v]\n    end\nend\n\n