BLUE CUBE PLATFORMER

Instructions:        ------This is my first game I hope you enjoy-----\n\n         -----I used griffpatch's tutorial for movement-----\n\n               -----use WASD/arrow keys to move-----\n\n                -----Click the green flag twice to start-----\n\n                          -----please share this-----

@Stage\n\nwhen flag clicked\n\n@Sprite1\n\nwhen flag clicked\nbroadcast (shadow v)\nset [level switch v] to [1]\nset [gravity v] to [-1]\nset [jump force v] to [12]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nset [speed y v] to (Gravity)\ngo to x: (-192) y: (-41)\nforever\n    if <(x position) = [242]> then\n        go to x: (-192) y: (-41)\n        change [level switch v] by (1)\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(falling) < [3]> then\n            set [speed y v] to (Jump Force)\n        end\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [speed x v] by ((0) - (acceleration))\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [speed x v] by (acceleration)\n    end\n    set [speed x v] to ((speed x) * (resistance))\n    change [speed y v] by (-1)\n    Move - in steps (([abs v] of (speed x) ) + ([abs v] of (Speed y) ))\nend\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    if <touching (levels v)?> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((Speed y) / (steps))\n    if <touching (levels v)?> then\n        set y to (last value)\n        if <(Speed y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#27d400)?> then\n        go to x: (-192) y: (-41)\n    end\nend\n\n@shadow\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\nend\n\nwhen I receive [shadow v]\nshow\n\nwhen I receive [shadow v]\nforever\n    go to (sprite1 v)\n    create clone of (_myself_ v)\n    set size to (100) %\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (10)\n    go to [back v] layer\n    change [ghost v] effect by (10)\n    change size by (-7)\nend\ndelete this clone\n\n@levels\n\nwhen flag clicked\nswitch costume to (level 1 v)\ngo to x: (46) y: (15)\ngo to [back v] layer\nforever\n    if <(level switch) = [2]> then\n        switch costume to (level 2 v)\n    end\n    if <(level switch) = [3]> then\n        switch costume to (level 3 v)\n    end\n    if <(level switch) = [4]> then\n        switch costume to (level 4 v)\n    end\n    if <(level switch) = [5]> then\n        switch costume to (level 5 v)\n    end\n    if <(level switch) = [6]> then\n        switch costume to (level 6 v)\n    end\n    if <(level switch) = [7]> then\n        switch costume to (level 7 v)\n    end\n    if <(level switch) = [8]> then\n        switch costume to (level 8 v)\n    end\n    if <(level switch) = [9]> then\n        switch costume to (level 9 v)\n    end\n    if <(level switch) = [10]> then\n        switch costume to (level 10 v)\n    end\n    if <(level switch) = [11]> then\n        switch costume to (level 11 v)\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    play sound [music v] until done\nend\n\nwhen backdrop switches to [download2 v]\n\n@cactus\n\nwhen flag clicked\ngo to x: (36) y: (28)\nswitch costume to (cactus v)\nforever\n    if <(level switch) = [2]> then\n        switch costume to (cactus2 v)\n    end\n    if <(level switch) = [3]> then\n        switch costume to (cactus3 v)\n    end\n    if <(level switch) = [4]> then\n        switch costume to (cactus4 v)\n    end\n    if <(level switch) = [5]> then\n        switch costume to (cactus5 v)\n    end\n    if <(level switch) = [6]> then\n        switch costume to (cactus6 v)\n    end\n    if <(level switch) = [7]> then\n        switch costume to (cactus7 v)\n    end\n    if <(level switch) = [8]> then\n        switch costume to (cactus8 v)\n    end\n    if <(level switch) = [9]> then\n        switch costume to (cactus9 v)\n    end\n    if <(level switch) = [10]> then\n        switch costume to (cactus10 v)\n    end\n    if <(level switch) = [11]> then\n        switch costume to (cactus11 v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (-214) y: (161)\n\nwhen this sprite clicked\nchange [level switch v] by (1)\n\n@Screenshot 2022-05-03 9\n\nwhen flag clicked\ngo to x: (70) y: (31)\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\nwait (0.5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n