Rubiks Cube Platformer
@Stage\n\nwhen I receive [hi v]\n\n@button\n\nwhen flag clicked\nswitch backdrop to (title v)\nshow\nset size to (70) %\npoint in direction (90)\ngo to x: (0) y: (-85)\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        hide\n        switch backdrop to (backdrop1 v)\n    end\n    if <key (space v) pressed?> then\n        switch backdrop to (backdrop2 v)\n        broadcast (hi v)\n        stop [this script v]\n    end\nend\n\n@the cube\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 color (#666666)?> or <touching color (#00cc44)?>>>>\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 [11]\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\nwhen I receive [hi v]\nswitch costume to (costume1 v)\nshow\nset [speed y v] to [0]\nset [falling v] to [10]\nforever\n    change [speed y v] by (-1)\n    change y by (speed y)\n    Touch Ground <(speed y) > [0]>\n    if <key (left arrow v) pressed?> then\n        Walk (-90) (-8)\n        switch costume to (costume2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        Walk (90) (8)\n        switch costume to (costume1 v)\n    end\n    if <<key (up arrow v) pressed?> and <(falling) < [3]>> then\n        set [speed y v] to [12]\n    end\n    if <touching color (#ff9400)?> then\n        go to x: (-205) y: (-113)\n        switch costume to (costume1 v)\n    end\n    if <(x position) > [239]> then\n        broadcast (banana v)\n    end\n    if <key (r v) pressed?> then\n        go to x: (-205) y: (-113)\n        switch costume to (costume1 v)\n    end\n    if <(slope) = [8  ]> then\n        set [falling v] to [0]\n    end\nend\n\nwhen flag clicked\ngo to x: (-205) y: (-113)\nset size to (13) %\nhide\n\ndefine Touch Ground <up?>\nchange [falling v] by (1)\nrepeat until <not <<touching color (#666666)?> or <touching color (#00cc44)?>>>\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 backdrop switches to [win v]\ngo to x: (0) y: (48)\nbroadcast (Link v)\n\nwhen flag clicked\nforever\n    if <touching (goal v)?> then\n        go to x: (-205) y: (-113)\n        switch costume to (costume1 v)\n        switch backdrop to (next backdrop v)\n        change [backdrop v] by (1)\n    end\n    if <(Backdrop) = [12]> then\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nset [backdrop v] to [0]\nforever\n    if <<(Backdrop) = [12]> and <key (space v) pressed?>> then\n        switch backdrop to (backdrop9 v)\n    end\nend\n\n@GOAL\n\nwhen I receive [banana v]\nswitch costume to (costume1 v)\nshow\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (142) y: (0)\nhide\n\nwhen I receive [link v]\nstop [other scripts in sprite v]\n\n
Instructions are in game. \n\nEvery level is possible.\n\n