Mobile Friendly Platformer

Instructions: =========================================\nMobile Friendly!\nControls\nWASD or Joystick\n=========================================

@Stage\n\nwhen flag clicked\nset volume to (100) %\nswitch backdrop to (backdrop2 v)\nforever\n    play sound [\[no copyright music\] cute background music _ funny _ cosmic star candy—Daystar v] until done\nend\n\nstop [all v]\n\nwhen flag clicked\n\nwhen I receive [hit v]\nset volume to (50) %\nwait (0.3) seconds\nset volume to (100) %\nwait (1) seconds\n\n@Mover\n\ndefine Touch ground\nchange [falling? v] by (1)\nrepeat until <not <<touching color (#108b00)?> or <touching color (#1adc00)?>>>\n    set [falling? v] to [0]\n    set [gravity v] to [0]\n    change y by (1)\nend\n\ndefine Walk (direction) (speed)\nchange x by (speed)\npoint in direction (direction)\nset [slope v] to [0]\nrepeat until <<(Slope) = [8]> or <not <<touching color (#108b00)?> or <touching color (#1adc00)?>>>>\n    change [slope v] by (1)\n    change y by (1)\nend\nif <(Slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (Slope))\nend\n\nwhen flag clicked\nforever\n    wait (0.01) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nnext costume\nset size to (95) %\nrepeat (20)\n    change size by (-5)\nend\nchange [ghost v] effect by (5)\ndelete this clone\n\n\n\nwhen flag clicked\nset [slide v] to [1]\nforever\n    if <(start) = [1]> then\n        if <<<touching color (#777777)?> or > or <touching color (#ff9f00)?>> then\n            change [health v] by (-1)\n            start sound (pick random (1) to (5))\n            change [gravity v] by (10)\n            repeat (10)\n                broadcast (hit v)\n                move (-8) steps\n            end\n            if <(health) < [1]> then\n                go to x: (-200) y: (-20)\n                set [slide v] to [1]\n                set [health v] to (max health)\n            end\n            if <(y position) < [-130]> then\n                set [health v] to (() - (max health))\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (-200) y: (-20)\nforever\n    if <(x position) = [248]> then\n        go to x: (-200) y: (-20)\n        broadcast (message1 v)\n        change [slide v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nbroadcast (st v)\nset [health v] to [10]\nset [max health v] to (health)\n\nchange [brightness v] effect by (100)\n\nset [brightness v] effect to (0)\n\nwhen I receive [st v]\nswitch costume to (costume1 v)\nset [gravity v] to [0]\ngo to x: (-185) y: (0)\nforever\n    set rotation style [left-right v]\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <(STICK X) < [-0.5]>> then\n        Walk [-90] [-6]\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <(STICK X) > [0.5]>> then\n        Walk [90] [6]\n    end\n    if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <(STICK Y) > [0.5]>> and <(Falling?) < [3]>> then\n        set [gravity v] to [12]\n    end\n    change [gravity v] by (-1)\n    change y by (Gravity)\n    Touch ground\n    Show Health (health) of (max health) offset y [30]\nend\n\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    if <touching (wall v)?> then\n        Walk (direction) [-6]\n    end\n    if <(slide) = [8]> then\n    end\nend\n\ndefine Show Health (health) of (max) offset y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\n@Control Stick\n\nwhen I start as a clone\nswitch costume to (stick v)\ngo [forward v] (1) layers\nset [ghost v] effect to (25)\nforever\n    set [stick power v] to []\n    set [stick x v] to [0]\n    set [stick y v] to [0]\n    repeat until <mouse down?>\n        go to (myself)\n    end\n    if <(distance to [mouse-pointer v]) < ((size) * (0.6))> then\n        Stick Drag\n    else\n        wait until <not <mouse down?>>\n    end\nend\n\ndefine Stick Drag\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    point towards (myself)\n    turn right (180) degrees\n    set [stick direction v] to (direction)\n    set [stick power v] to (distance to [(myself) v])\n    if <(STICK POWER) > (max stick)> then\n        move ((max stick) - (STICK POWER)) steps\n        set [stick power v] to (max stick)\n    end\n    set [stick power v] to ((STICK POWER) / (max stick))\n    set [stick x v] to ((STICK POWER) * ([sin v] of (STICK DIRECTION) ))\n    set [stick y v] to ((STICK POWER) * ([cos v] of (STICK DIRECTION) ))\nend\n\nwhen flag clicked\ngo to x: (161) y: (-110)\nshow\ngo to [front v] layer\nset [myself v] to [Control Stick]\nset [max stick v] to ((size) / (4))\nset size to (140) %\nswitch costume to (base v)\nset [ghost v] effect to (60)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\n\n@reminder\n\nwhen flag clicked\nhide\ngo to x: (147) y: (191)\nset [gravity v] to [10]\nforever\n    go to [front v] layer\n    wait (pick random (15) to (35)) seconds\n    show\n    repeat until <not <touching (_edge_ v)?>>\n        change y by (() - (grAVity))\n    end\n    switch costume to (costume1 v)\n    repeat (1)\n        change y by (3)\n    end\n    Do anim\n    repeat (5)\n        change y by (grAVity)\n    end\n    hide\nend\n\ndefine Do anim\nswitch costume to (costume1 v)\nrepeat (7)\n    next costume\n    wait (0.05) seconds\nend\nwait (1) seconds\n\n@level\n\nwhen flag clicked\ngo to x: (0) y: (-14)\nforever\n    switch costume to (slide)\n    go to [back v] layer\nend\n\nwhen I receive [message1 v]\nnext costume\n\n@Bubles\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\nhide\n\nwhen flag clicked\nforever\n    if <(slide) = [7]> then\n        repeat (5)\n            go to (sprite2 v)\n            change x by (pick random (30) to (-30))\n            set y to (-180)\n            create clone of (_myself_ v)\n            wait (0.3) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nshow\nrepeat until <(y position) = [180]>\n    change y by (5)\nend\ndelete this clone\n\nwhen flag clicked\nshow\nset [ghost v] effect to (10)\ngo to x: (0) y: (-180)\nhide\n\n@WALL\n\nwhen flag clicked\nstart sound [Every Platformer Ever v]\nhide\nforever\n    if <(slide) = [8]> then\n        start sound [Every Platformer Ever2 v]\n        show\n        wait (10000000000000000000000000000000000000) seconds\n    end\n    go to x: (3) y: (0)\nend\n\nset [ghost v] effect to (100)\n\n@Health Bar\n\nwhen flag clicked\nhide\ndelete all of [healths v]\n\nwhen I start as a clone\nset x to (item (1) of [healths v])\nset y to (item (2) of [healths v])\nswitch costume to ((10) * (item (3) of [healths v]))\ndelete (1) of [healths v]\ndelete (1) of [healths v]\ndelete (1) of [healths v]\nif <not <touching (_edge_ v)?>> then\n    go to [front v] layer\n    show\n    wait (0) seconds\nend\ndelete this clone\n\ndefine Show Health (health) of (max) offset y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\n