grey cube a platformer | mobile friendly v1.9

Instructions: new game https://scratch.mit.edu/projects/643652676/\n\n                         pls love and fave and follow\n\n\n\n\nMove with arrows or wsad or by touching the screen. This is the basic version. More stuff to come soon. 

@Stage\n\nwhen flag clicked\nhide variable [☁ best time v]\nhide variable [time v]\nswitch backdrop to (level1 v)\nforever\n    play sound [Nebula v] until done\nend\n\nwhen I receive [next level v]\nnext backdrop\n\n@Player2\n\nwhen flag clicked\nset [xyz v] to [0]\nset [time v] to [0]\nhide\ngo to x: (-220) y: (-90)\nsetup\nset [level2 v] to [1]\nforever\n    Tick\nend\n\ndefine setup\nset [x2 v] to [0]\nset [x2 v] to [0]\nset size to (85) %\nshow\n\ndefine Tick\ngo to [front v] layer\ncreate clone of (_myself_ v)\nset rotation style [left-right v]\nif <<<mouse down?> and <((x position) - (5)) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    create clone of (_myself_ v)\n    change [x2 v] by (-1)\nend\nif <<<mouse down?> and <((x position) + (5)) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    create clone of (_myself_ v)\n    change [x2 v] by (1)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n    create clone of (_myself_ v)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    create clone of (_myself_ v)\nend\nset [x2 v] to ((X2) * (0.9))\nchange x by (X2)\nif <touching (ground2 v)?> then\n    change y by (1)\n    if <touching (ground2 v)?> then\n        change y by (1)\n        if <touching (ground2 v)?> then\n            change y by (1)\n            if <touching (ground2 v)?> then\n                change y by (1)\n                if <touching (ground2 v)?> then\n                    change y by (1)\n                    if <touching (ground2 v)?> then\n                        change x by ((X2) * (-1))\n                        change y by (-5)\n                        if <<<mouse down?> and <((y position) + (-20)) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            if <(X2) > [0]> then\n                                set [x2 v] to [-7]\n                            else\n                                set [x2 v] to [7]\n                            end\n                            set [y2 v] to [14]\n                        else\n                            set [x2 v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (-1)\nif <touching (ground2 v)?> then\n    if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [y2 v] to [14]\n        point in direction ((Y2) * (0.5))\n    end\nend\nchange y by (1)\nchange [y2 v] by (-1)\nchange y by (Y2)\nif <touching (ground2 v)?> then\n    change y by ((Y2) * (-1))\n    set [y2 v] to [0]\nend\nhide variable [x2 v]\nif <<(x position) > [230]> and <(Level2) < [12]>> then\n    repeat (15)\n        delete this clone\n    end\n    broadcast (next level v)\n    change [level2 v] by (1)\nend\nif <<touching (lava2 v)?> or <<(y position) < [-174]> or <<touching (spikes2 v)?> or <touching (saw2 v)?>>>> then\n    set [x2 v] to [0]\n    set [y2 v] to [0]\n    go to x: (-220) y: (-90)\nend\nif <touching (bouncy2 v)?> then\n    set [y2 v] to [20]\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-10)\n    if <(size) < [15]> then\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\ngo to x: (-220) y: (-90)\nset [x2 v] to [0]\nset [y2 v] to [0]\n\ndefine time (value)\nset [time v] to (value)\n\nwhen [any v] key pressed\nchange [xyz v] by (1)\nif <(xyz) < [2]> then\n    reset timer\n    forever\n        if <(Level2) < [12]> then\n            time (timer)\n        else\n            if <not <(space) = [0]>> then\n                if <(time) < (☁ best time)> then\n                    set [☁ best time v] to (time)\n                    show variable [☁ best time v]\n                    show variable [time v]\n                end\n            end\n        end\n    end\nend\n\n@ground2\n\nwhen flag clicked\nset [space v] to [0]\nhide\nswitch costume to (level1 v)\ngo to x: (0) y: (-160)\nshow\n\nwhen I receive [next level v]\nnext costume\n\nwhen [space v] key pressed\nchange [space v] by (1)\nbroadcast (next level v)\n\n@lava2\n\nwhen flag clicked\nhide\nswitch costume to (level1 v)\nshow\nforever\n    repeat (20)\n        change y by (0.2)\n    end\n    repeat (20)\n        change y by (-0.2)\n    end\nend\n\nwhen I receive [next level v]\nnext costume\ngo to x: (0) y: (0)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\nend\n\n@BG2\n\nwhen flag clicked\nhide\n\n@spikes2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nswitch costume to (level1 v)\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\ngo to x: (0) y: (0)\nnext costume\n\n@Bouncy2\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (8) layers\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (player2 v)?> then\n        switch costume to (costume1 v)\n        repeat until <(costume [number v]) = [5]>\n            next costume\n        end\n        repeat until <(costume [number v]) = [1]>\n            switch costume to ((costume [number v]) - (1))\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    go [backward v] (8) layers\nend\n\ndefine Clone at x: (x) y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (8) layers\nhide\nif <(Level2) = [8]> then\n    Clone at x: [-153] y: [-93]\nelse\n    hide\n    delete this clone\nend\n\nwhen I receive [next level v]\nif <(Level2) = [8]> then\n    Clone at x: [-153] y: [-93]\nelse\n    hide\n    delete this clone\nend\n\n@Saw2\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (9) layers\nforever\n    set size to (90) %\n    hide\n    go to [front v] layer\n    go [backward v] (9) layers\n    go to x: (0) y: (0)\nend\n\nwhen I receive [next level v]\nif <(Level2) = [9]> then\n    Clone at x: [0] y: [-110]\nelse\n    hide\n    delete this clone\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (8) layers\nhide\n\ndefine Clone at x: (x) y: (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo [backward v] (8) layers\nshow\nforever\n    go to [back v] layer\n    turn right (10) degrees\nend\n\nwhen I receive [next level v]\ndelete this clone\n\n@Fireworks2\n\nwhen flag clicked\nhide\nforever\n    set [ghost v] effect to (20)\n    set [clone id v] to [Launcher]\n    create clone of (_myself_ v)\n    wait (pick random (1) to (3)) seconds\nend\n\nwhen I start as a clone\nshow\nif <(Clone Id) = [Launcher]> then\n    go to x: (pick random (-240) to (240)) y: (-1000)\n    set [i2 v] to (pick random (20) to (23))\n    set [color v] effect to (pick random (-150) to (150))\n    repeat until <(i2) < [3]>\n        change [i2 v] by (-1)\n        change y by (i2)\n    end\n    Firework\n    delete this clone\nend\n\ndefine Firework\nrepeat (pick random (12) to (18))\n    set [clone id v] to [Firework]\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nif <(Clone Id) = [Firework]> then\n    set [i1 v] to (pick random (-7) to (7))\n    change [i2 v] by (pick random (5) to (15))\n    repeat until <<<(y position) < [-175]> or <(x position) < [-235]>> or <(x position) > [235]>>\n        change [i2 v] by (-1)\n        change y by (i2)\n        change x by (i1)\n        change [ghost v] effect by (1)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\n