Green world// a platformer game
@Stage\n\n@level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\n@player\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (speed)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((speed) * (-1))\n    switch costume to (costume2 v)\nend\nset [x vel v] to ((X vel) * (friction))\nchange x by (X vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X vel) ) / (X vel)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(X vel) > [0]> then\n            set [x vel v] to [-12]\n        else\n            set [x vel v] to [12]\n        end\n        set [y vel v] to [12]\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y vel) ) / (Y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\n\nwhen I receive [end v]\ngo to x: (-198) y: (-10)\n\nwhen flag clicked\nhide\n\nwhen I receive [hurt v]\ngo to x: (-198) y: (-10)\n\nwhen I start as a clone\nswitch costume to (effect v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [x vel v] to [0]\nset [y vel v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-198) y: (-10)\npoint in direction (90)\nforever\n    Platformer Physics [1] [0.9] [13]\n    if <<<<touching (danger v)?> or <touching (monsters v)?>> or <touching (snow monsters v)?>> or <touching (imposter v)?>> then\n        go to x: (-198) y: (-10)\n    end\n    if <touching ( ice trampoline v)?> then\n        set [y vel v] to [20]\n    end\n    if <touching ( ice trampoline v)?> then\n        broadcast (end v)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Video Game 1 v] until done\nend\n\n@end\n\nwhen flag clicked\nset [level v] to [1]\nhide\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (player v)?> then\n        repeat (5)\n            wait (0.02) seconds\n            next costume\n        end\n        broadcast (end v)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [1]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [2]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [3]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [4]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [5]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [6]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [7]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [8]> then\n        go to x: (-237) y: (220)\n    end\n    if <(level) = [9]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [10]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [11]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [12]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [13]> then\n        go to x: (150) y: (55)\n    end\n    if <(level) = [14]> then\n        go to x: (160) y: (216)\n    end\n    if <(level) = [15]> then\n        hide\n    end\nend\n\nwhen I receive [end v]\nchange [level v] by (1)\n\n@danger\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\n@monsters\n\nwhen flag clicked\ngo to x: (195) y: (-44)\nhide\nforever\n    if <(level) = [11]> then\n        show\n        glide (3) secs to x: (-21) y: (-43)\n        glide (3) secs to x: (195) y: (-44)\n    end\n    if <(level) = [14]> then\n        show\n        go to x: (219) y: (118)\n        glide (3) secs to x: (102) y: (118)\n        glide (3) secs to x: (214) y: (117)\n    end\nend\n\nwhen I receive [end v]\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        hide\n    end\n    if <(level) = [15]> then\n        hide\n    end\nend\n\n@TB\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n
Welcome to another platformer game !!!\nGREEN WORLD !!\n\n--Instructions--\n- Use arrow keys to move the player\n-Avoid spikes and monsters (blue colored cubes)\n-You can walljumping\n- 15 levels\n\n\nEverything in the green world is green !! LOL\n\n--Credits--\nSome codes were taken from my other platformer rush game originally from @amazingQ\nthis is the link to my game: platformer rush\nhttps://scratch.mit.edu/projects/494262454/\nArt-me\n\nFave and love this project!\nAnd if you like my projects follow me !!!\n\nHave fun!!!!!!!!!!!