Rotateº - Platformer (Mobile Friendly!)                               #games #art #all 
@Stage\n\nwhen flag clicked\nset [❤ v] to [100]\nforever\n    play sound [Soul_and_Mind 48000 loop v] until done\n    set volume to (❤) %\nend\n\nwhen flag clicked\nforever\n    if <key (m v) pressed?> then\n        show variable [❤ v]\n    else\n        hide variable [❤ v]\n    end\nend\n\n@.\n\nwhen I receive [tick v]\ngo to (eeeeeeeeeeee v)\nset [ghost v] effect to (5)\nset [brightness v] effect to (0)\ngo to [back v] layer\nset size to ((([sin v] of ((timer) * (300)) ) * (5)) + (90)) %\n\n@Thats a beeg level\n\ndefine Position\ngo to x: ((0) - (Scroll X)) y: ((0) - (Scroll Y))\npoint in direction ((0) - (Rotation))\n\nwhen I receive [tick v]\nPosition\n\n@SpriteyMcSprite\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow list [☁️ leaderboard \(press w to hide/show\) v]\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@detector\n\nwhen flag clicked\n\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to [front v] layer\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nset volume to (100) %\nhide\n\nwhen I receive [youbeatit v]\nset [eeeeeeeeeeeeeeeeeeeeeeeeeee v] to [1]\nstart sound [Win v]\nset [ghost v] effect to (30)\nshow\nrepeat (70)\n    change [ghost v] effect by (1)\nend\nstop [this script v]\n\n@EEEEEEEEEEEE2\n\ndefine Get Direction (dx) (dy)\nif <(dy) = [0]> then\n    if <(dx) > [0]> then\n        set [get direction? v] to [90]\n    else\n        set [get direction? v] to [-90]\n    end\nelse\n    set [get direction? v] to ([atan v] of ((dx) / (dy)) )\n    if <(dy) < [0]> then\n        if <(dx) > [0]> then\n            change [get direction? v] by (180)\n        else\n            if <(dx) < [0]> then\n                change [get direction? v] by (-180)\n            else\n                set [get direction? v] to [180]\n            end\n        end\n    end\nend\n\ndefine Move (sx) (sy)\nchange [position x v] by (sx)\nchange [position y v] by (sy)\nPosition\nif <touching color (#8eff86)?> then\n    repeat (6)\n        change [position x v] by ((1) * ([sin v] of ((Rotation) + (0)) ))\n        change [position y v] by ((1) * ([cos v] of ((Rotation) + (0)) ))\n        Position\n        if <not <touching color (#8eff86)?>> then\n            set [collided? v] to [1]\n            set [can jump? v] to [5]\n            stop [this script v]\n        end\n    end\n    change [position x v] by (((-6) * ([sin v] of ((Rotation) + (0)) )) - (sx))\n    change [position y v] by (((-6) * ([cos v] of ((Rotation) + (0)) )) - (sy))\n    Position\n    set [collided? v] to [2]\nelse\n    set [collided? v] to [0]\nend\n\ndefine Position\nset [tx v] to (((Position X) * ([cos v] of (Rotation) )) - ((Position Y) * ([sin v] of (Rotation) )))\nset [ty v] to (((Position X) * ([sin v] of (Rotation) )) + ((Position Y) * ([cos v] of (Rotation) )))\ngo to x: ((tx) - (Scroll X)) y: ((ty) - (Scroll Y))\n\ndefine Tick\nif <touching color (#ffab7e)?> then\n    set [speed x v] to ((15) * ([sin v] of ((Rotation) + (0)) ))\n    set [speed y v] to ((15) * ([cos v] of ((Rotation) + (0)) ))\nend\nset [new speed x v] to [0]\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [0]>>> then\n    set [new speed x v] to [-5]\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <[0] < (mouse x)>>> then\n    set [new speed x v] to [5]\nend\nif <(Can Jump?) > [0]> then\n    change [can jump? v] by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <[-50] < (mouse y)>>> then\n        if <touching color (#ffab7e)?> then\n            set [speed x v] to ((15) * ([sin v] of ((Rotation) + (0)) ))\n            set [speed y v] to ((15) * ([cos v] of ((Rotation) + (0)) ))\n        else\n            set [speed x v] to ((10) * ([sin v] of ((Rotation) + (0)) ))\n            set [speed y v] to ((10) * ([cos v] of ((Rotation) + (0)) ))\n        end\n    end\nend\nchange [speed x v] by ((1) * ([sin v] of ((Rotation) + (180)) ))\nchange [speed y v] by ((1) * ([cos v] of ((Rotation) + (180)) ))\nMove (Speed X) (Speed Y)\nif <(collided?) > [0]> then\n    set [speed x v] to [0]\n    set [speed y v] to [0]\nend\nif <not <(New Speed X) = [0]>> then\n    set [new speed y v] to ((New Speed X) * ([cos v] of ((Rotation) + (90)) ))\n    set [new speed x v] to ((New Speed X) * ([sin v] of ((Rotation) + (90)) ))\n    Move (New Speed X) (New Speed Y)\nend\nGet Direction (Position X) (Position Y)\nset [rotation v] to (Get Direction?)\nset [scroll x v] to (((Position X) * ([cos v] of (Rotation) )) - ((Position Y) * ([sin v] of (Rotation) )))\nset [scroll y v] to (((Position X) * ([sin v] of (Rotation) )) + ((Position Y) * ([cos v] of (Rotation) )))\nPosition\n\nwait (0.02) seconds\n\nMove ((Speed X) + (New Speed X)) ((Speed Y) + (New Speed Y))\n\nwhen flag clicked\nset [position x v] to [-200]\nset [position y v] to [350]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [rotation v] to [0]\nset [can jump? v] to [0]\nGet Direction (Position X) (Position Y)\nset [rotation v] to (Get Direction?)\nset [scroll x v] to (((Position X) * ([cos v] of (Rotation) )) - ((Position Y) * ([sin v] of (Rotation) )))\nset [scroll y v] to (((Position X) * ([sin v] of (Rotation) )) + ((Position Y) * ([cos v] of (Rotation) )))\nPosition\nbroadcast (tick v) and wait\nforever\n    Tick\n    broadcast (tick v) and wait\n    if <touching color (#e62e2e)?> then\n        set [position x v] to [-200]\n        set [position y v] to [350]\n    end\n    if <key (r v) pressed?> then\n        set [position x v] to [-200]\n        set [position y v] to [350]\n    end\nend\n\nset [speed x v] to [0]\nset [speed y v] to [0]\n\nwhen flag clicked\n\nwhen I receive [tick v]\nif <(eeeeeeeeeeeeeeeeeeeeeeeeeee) = [0]> then\n    if <touching color (#ff953d)?> then\n        show variable [time!!! v]\n        set [time!!! v] to (timer)\n        broadcast (youbeatit v)\n        stop [this script v]\n    end\nend\n\nforever\n\nwhen flag clicked\nset [eeeeeeeeeeeeeeeeeeeeeeeeeee v] to [0]\nhide variable [time!!! v]\n\nchange [☁ leaderboard_1 v] by (1)\n\nset [☁ leaderboard_1 v] to [0]\n\n