Cubez Platformer #games #all

Instructions: Up Arrow Key or W = Jump\nLeft Arrow Key or A = Left Movement\nRight Arrow Key or D= Right Movement\nSpacebar = Reset Character (if you get stuck)\n\n¯\_(ツ)_/¯ 

@Stage\n\nwhen flag clicked\nforever\n    if <(X) = [1]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [2]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [3]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [4]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [5]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [6]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [7]> then\n        switch backdrop to (background3 v)\n    end\n    if <(X) = [8]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [9]> then\n        switch backdrop to (background v)\n    end\n    if <(X) = [10]> then\n        switch backdrop to (background2 v)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (background v)\n\nwhen flag clicked\nforever\n    play sound [Tobu - Candyland v] until done\nend\n\nswitch backdrop to (X)\n\n@Cube\n\nwhen flag clicked\nswitch costume to (cube v)\ngo to x: (-200) y: (-110)\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)?> then\n    repeat until <not <touching (level 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: (-110)\n    end\nend\n\nwhen [space v] key pressed\nglide (.5) secs to x: (-200) y: (-110)\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?> then\n        point in direction (90)\n    end\n    if <key (left arrow 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 (.5) secs to x: (-200) y: (-110)\n    end\nend\n\nwhen flag clicked\nwait (5) seconds\ngo to x: (-200) y: (-110)\n\nwhen flag clicked\nforever\n    if <<(X Velocity) > [1]> or <(Y Velocity) > [1]>> then\n        create clone of (_myself_ v)\n    end\n    if <<(X Velocity) > [-1]> or <(Y Velocity) > [-1]>> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\nswitch costume to (trailz v)\nrepeat (5)\n    change [ghost v] effect by (35)\nend\ndelete this clone\n\n@Level\n\nwhen flag clicked\nforever\n    if <([costume # v] of [level v]) = ([costume # v] of [cube v])> then\n        next costume\n    end\nend\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 (1000)\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\n@Sprite1\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@Sprite2\n\nwhen flag clicked\nhide\n\nshow\ngo to [front v] layer\n\n