Green Land! // A platformer #all #games remix


@Stage\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 I receive [intro v]\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [hurt v]\nreset\n\nwhen I receive [intro v]\nforever\n    create clone of (_myself_ v)\nend\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\ndefine spin off screen\nchange [deaths v] by (1)\nset [y vel v] to [10]\nrepeat until <(y position) < [-179]>\n    switch costume to (dead v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y vel)\n    change [y vel v] by (-1)\nend\nhide\ngo to x: (-198) y: (-10)\nreset\n\ndefine reset\nswitch costume to (costume1 v)\nclear graphic effects\nshow\ngo to x: (-198) y: (10)\npoint in direction (90)\nset [y vel v] to [0]\nset [x vel v] to [0]\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        stop all sounds\n        show variable [timer v]\n        play sound [Coffin Dance \(Official Music Video HD\) v] until done\n    end\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [level v] to [1]\nset [deaths v] to [0]\nhide variable [deaths v]\nset [timer v] to [0]\nhide variable [timer v]\nset [x vel v] to [0]\nset [y vel v] to [0]\nswitch costume to (costume1 v)\nset size to (70) %\ngo to x: (-198) y: (-10)\npoint in direction (90)\nforever\n    Platformer Physics [1] [0.9] [16]\n    if <<<<touching (danger v)?> or <touching (smasher v)?>> or <touching (jelly v)?>> or <touching (big spike v)?>> then\n        spin off screen\n    end\n    if <touching (trampoline v)?> then\n        set [y vel v] to [23]\n    end\nend\n\nwhen flag clicked\nforever\n    repeat until <(level) = [14]>\n        change [timer v] by (1)\n        wait (1) seconds\n    end\nend\n\nforever\n    play sound [recording3 v] until done\nend\n\nwhen flag clicked\nforever\n    play sound [Allison & Vexento - Mango Breeze v] until done\nend\n\nwhen flag clicked\nforever\n    set [color v] effect to (39)\nend\n\n@level\n\nwhen flag clicked\nshow\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nchange [level v] by (1)\nnext costume\n\nwhen I receive [intro v]\n\nwhen flag clicked\nchange [color v] effect by (25)\n\n@end\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n    end\nend\n\nwhen I receive [defeat boss v]\nforever\n    show\nend\n\nwhen I receive [defeat boss v]\nshow\ngo to x: (136) y: (-4)\nforever\n    if <touching (player v)?> then\n        broadcast (end v)\n    end\nend\n\nwhen flag clicked\nshow\ngo to x: (136) y: (-4)\nforever\n    if <touching (player v)?> then\n        broadcast (end v)\n    end\nend\n\n@danger\n\nwhen flag clicked\nshow\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\ngo to [back v] layer\nforever\n    repeat (3)\n        change y by (-10)\n    end\n    wait (0.4) seconds\n    repeat (3)\n        change y by (10)\n    end\nend\n\nwhen I receive [end v]\nshow\ngo to [back v] layer\nnext costume\n\n@smasher\n\nwhen flag clicked\ngo to x: (-25) y: (76)\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [6]> then\n        show\n        repeat (10)\n            change y by (-10)\n        end\n        wait (2) seconds\n        repeat (10)\n            change y by (10)\n        end\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\nwhen flag clicked\nchange [color v] effect by (25)\n\n@Jelly\n\nwhen flag clicked\nforever\n    if <(level) = [9]> then\n        show\n        switch costume to (costume1 v)\n        go to x: (192) y: (-97)\n        glide (0.25) secs to x: (192) y: (-97)\n        glide (0.40) secs to x: (9) y: (-99)\n        glide (0.25) secs to x: (-91) y: (-13)\n        glide (0.20) secs to x: (-171) y: (-99)\n        switch costume to (costume2 v)\n        glide (0.25) secs to x: (-65) y: (-4)\n        glide (0.90) secs to x: (44) y: (-102)\n        glide (0.60) secs to x: (192) y: (-97)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\n@Thumb\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@big spike\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        go to [back v] layer\n        go [forward v] (1) layers\n        go to x: (-2) y: (-274)\n        show\n        wait (0.75) seconds\n        glide (1) secs to x: (-2) y: (-14)\n        wait (0.15) seconds\n        glide (1) secs to x: (-2) y: (-274)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        hide\n    end\nend\n\nchange y by (10)\n\n@yeet\n\nwhen I start as a clone\nshow\nforever\n    next costume\n    turn right (3) degrees\n    set [brightness v] effect to ((((size) * (-1)) + (100)) * (-1))\nend\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        hide\n        change [color v] effect by (50)\n        forever\n            set size to (pick random (120) to (50)) %\n            go to x: (pick random (240) to (-240)) y: (999)\n            create clone of (_myself_ v)\n            change [color v] effect by (75)\n            turn right (pick random (999) to (0)) degrees\n        end\n    end\nend\n\nwhen I start as a clone\nrepeat until <[-178] > (y position)>\n    change y by ((size) / (-20))\n    go to [front v] layer\n    change x by ([cos v] of ((y position) + ((size) * (10))) )\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@trampoline\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\ngo to x: (-74) y: (-116)\nforever\n    if <touching (player v)?> then\n        switch costume to (costume1 v)\n        wait (0.03) seconds\n        switch costume to (costume2 v)\n        wait (0.03) seconds\n        switch costume to (costume3 v)\n        wait (0.03) seconds\n        switch costume to (costume4 v)\n        wait (0.03) seconds\n        switch costume to (costume5 v)\n        wait (0.03) seconds\n        switch costume to (costume6 v)\n        wait (0.03) seconds\n        switch costume to (costume6 v)\n        wait (0.03) seconds\n        switch costume to (costume5 v)\n        wait (0.03) seconds\n        switch costume to (costume4 v)\n        wait (0.03) seconds\n        switch costume to (costume3 v)\n        wait (0.03) seconds\n        switch costume to (costume2 v)\n        wait (0.03) seconds\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [13]> then\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nchange [color v] effect by (25)\n\n@Boss coming soon!\n\nwhen flag clicked\nhide\ngo to x: (12) y: (-266)\ngo to [back v] layer\nset [ghost v] effect to (25)\n\nwhen flag clicked\nforever\n    if <(level) = [14]> then\n        switch costume to (costume1 v)\n        show\n        repeat (475)\n            change y by (0.5)\n        end\n        switch costume to (costume2 v)\n        forever\n            show\n        end\n    end\nend\n\n