Cubez Platformer 2 (Christmas) #games #all
@Stage\n\nwhen flag clicked\nforever\n    if <(X) = [1]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [2]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [3]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [4]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [5]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [6]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [7]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [8]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [9]> then\n        switch backdrop to (background1 v)\n    end\n    if <(X) = [10]> then\n        switch backdrop to (background2 v)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (background1 v)\n\nwhen flag clicked\nforever\n    play sound [Hiphop Trap Beat Instrumental _ Sick Rap Instrumental 2020 \(prod2 v] until done\nend\n\nswitch backdrop to (X)\n\n@Cube\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        glide (.1) secs to x: (-200) y: (-85)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (1 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (2 v) pressed?> then\n        switch costume to (inverted red v)\n    end\n    if <key (3 v) pressed?> then\n        switch costume to (blue v)\n    end\n    if <key (4 v) pressed?> then\n        switch costume to (inverted blue v)\n    end\n    if <key (5 v) pressed?> then\n        switch costume to (rainbow v)\n    end\n    if <key (6 v) pressed?> then\n        switch costume to (glass v)\n    end\n    if <key (7 v) pressed?> then\n        switch costume to (glitch v)\n    end\n    if <key (8 v) pressed?> then\n        switch costume to (santa v)\n        if <key (9 v) pressed?> then\n            switch costume to (santa v)\n        end\n        if <key (0 v) pressed?> then\n            switch costume to (santa v)\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (red v)\nglide (.1) secs to x: (-200) y: (-85)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [x v] to [1]\nforever\n    Platform Gravity: [-1] Jump Height: [13] Side Movement Speed: [4] Friction: [.7] Slope: [8]\nend\n\ndefine Platform Gravity: (gravity) Jump Height: (jump height) Side Movement Speed: (side movement) Friction: (friction) Slope: (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <<touching (level v)?> or <touching (elevator v)?>> then\n    repeat until <not <<touching (level v)?> or <touching (elevator v)?>>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to (<<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X Velocity) + ((<<key (left arrow v) pressed?> or <key (a v) pressed?>> * ((side movement) * (-1))) + (<<key (right arrow v) pressed?> or <key (d v) pressed?>> * (side movement)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\n    if <touching (level v)?> then\n        change y by (Slope)\n        repeat until <not <touching (level v)?>>\n            change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (checkpoint v)?> then\n        change [x v] by (1)\n        glide (.3) secs to x: (-200) y: (-85)\n    end\nend\n\nwhen [space v] key pressed\nglide (.1) secs to x: (-200) y: (-85)\n\nwhen flag clicked\nset [ghost v] effect to (100)\nwait (5) seconds\nset [ghost v] effect to (0)\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\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\nend\n\nwhen flag clicked\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <(y position) < [-175]> then\n        glide (.1) secs to x: (-200) y: (-85)\n    end\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (level 1* v)\n\nwhen flag clicked\nhide\nwait (5) seconds\nshow\n\nwhen flag clicked\nforever\n    switch costume to (X)\nend\n\n@Checkpoint\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nhide\nwait (5) seconds\nshow\n\nwhen flag clicked\nforever\n    if <(X) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (225) y: (-100)\n\nwhen flag clicked\nforever\n    if <(X) = [7]> then\n        go to x: (-225) y: (90)\n    else\n        go to x: (225) y: (-100)\n    end\nend\n\n@Game Name\n\nwhen flag clicked\ngo to [front v] layer\nshow\nforever\n    go to x: (0) y: (([cos v] of (((timer) - (3)) * (200)) ) * (25))\nend\n\nwhen flag clicked\nwait (5) seconds\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n@Snow\n\nwhen I start as a clone\ngo to [back v] layer\nclear graphic effects\nset size to (100) %\nshow\ngo to x: (pick random (250) to (-250)) y: (200)\npoint in direction (90)\nrepeat (150)\n    change y by (-3)\n    change x by (pick random (-2) to (2))\n    change [ghost v] effect by (.9)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    hide\n    wait (.0001) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (snow v)\n    if <(X) = [10]> then\n        switch costume to (glitter v)\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\nwhen flag clicked\nhide\nwait (5) seconds\nshow\n\nwhen flag clicked\nforever\n    switch costume to (X)\nend\n\n@Elevator\n\nwhen flag clicked\nhide\nwait (5) seconds\nshow\n\nwhen flag clicked\nforever\n    if <(X) = [6]> then\n        switch costume to (level 6 v)\n    else\n        switch costume to (level 1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (cube v)?> then\n        glide (3) secs to x: (0) y: (150)\n        wait (1) seconds\n        glide (3) secs to x: (0) y: (0)\n    end\nend\n\n@Santas Hat\n\nwhen flag clicked\nswitch costume to (inverted red* v)\nforever\n    go to (cube v)\nend\n\nwhen flag clicked\nforever\n    if <key (8 v) pressed?> then\n        switch costume to (santa v)\n    end\n    if <key (1 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (2 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (3 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (4 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (5 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (6 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (7 v) pressed?> then\n        switch costume to (red v)\n    end\n    if <key (9 v) pressed?> then\n        switch costume to (santa v)\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nforever\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\nend\n\n
This is a sequel to Cubez Platformer!\nIf you haven't yet seen that one check it out!\n\nhttps://scratch.mit.edu/projects/398598772/\n\n| INSTRUCTIONS |\n- Use arrow keys and WASD for movement\n- Use keys 1-9 to change your character \n- Avoid falling and don't touch the spikes\n- Like, favorite & follow me @VeryBeary\n\n| Enjoy |