✨ Earth ✨|| A platformer #games #all #game
@Stage\n\nwhen flag clicked\nforever\n    play sound [Xenogenesis v] until done\n    wait (3) seconds\n    play sound [TheFatRat - Time Lapse v] until done\nend\n\nwhen [m v] key pressed\nset [mouse x, y, v] to (join (mouse x) (join [, ] (mouse y)))\n\n@playerSprite1\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-200) y: (0)\n\ndefine Physics\nif <key (right arrow v) pressed?> then\n    change [x v] by (2)\nend\nif <key (left arrow v) pressed?> then\n    change [x v] by (-2)\nend\nchange x by (x)\nif <<touching (obstacles v)?> or <touching (level v)?>> then\n    change x by ((x) * (-1))\n    if <key (up arrow v) pressed?> then\n        if <(x) > [0]> then\n            set [x v] to [-10]\n            set [y v] to [10]\n        else\n            set [x v] to [0]\n            set [y v] to [0]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <<touching (obstacles v)?> or <touching (level v)?>> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <key (up arrow v) pressed?> then\n        if <(jumping) = [y]> then\n            if <(SuperJump) = [1]> then\n                set [y v] to [20]\n                set [jumping v] to [n]\n            else\n                set [y v] to [12]\n                set [jumping v] to [n]\n            end\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping v] to [y]\nend\nif <touching (enemy v)?> then\n    Restart\n    broadcast (Reset Enemy v)\nend\nif <touching (spikes v)?> then\n    Restart\n    broadcast (Reset Enemy v)\nend\nif <(x position) > [225]> then\n    change [level v] by (1)\n    Restart\nend\nif <touching (bad v)?> then\n    Restart\nend\n\nwhen flag clicked\nRestart\nshow\nset [level v] to [1]\nforever\n    Physics\nend\n\ndefine Slope detection\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <<touching (obstacles v)?> or <touching (level v)?>>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <<touching (obstacles v)?> or <touching (level v)?>> then\n    change y by (-8)\nend\n\nwhen flag clicked\nif <touching (next level v)?> then\n    change [level v] by (1)\n    Restart\nend\n\nwhen [timer v] > (0.3)\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to [front v] layer\n\nwhen [space v] key pressed\nbroadcast (ninjastar v)\nwait until <not <key (space v) pressed?>>\n\nwhen flag clicked\n\nif <touching (sprite2 v)?> then\n    broadcast (OPEN  v) and wait\nend\n\nwait until <not <key (down arrow v) pressed?>>\nset [y v] to [2]\nset size to (50) %\nset [y v] to [0]\n\nwhen I receive [rainbow v]\nswitch costume to (costume3 v)\nforever\n    change [color v] effect by (2)\nend\n\n@level\n\nwhen [timer v] > (0.3)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Level)\nend\n\n@Enemy\n\nwhen flag clicked\n\nforever\n    show\nend\n\nif <((Level) mod (2)) = [0]> then\nelse\n    hide\nend\n\nwhen [timer v] > (0.3)\nhide\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (200) y: (-15)\n\ndefine Physics\nif <(x position) < ([x position v] of [playersprite1 v])> then\n    change [x v] by (0.5)\nend\nif <([x position v] of [playersprite1 v]) < (x position)> then\n    change [x v] by (-0.5)\nend\nchange x by (x)\nif <touching (level v)?> then\n    change x by ((x) * (-1))\n    if <(y position) < ([y position v] of [playersprite1 v])> then\n        if <(x) > [0]> then\n            set [x v] to [-3]\n            set [y v] to [3]\n        else\n            set [x v] to [0]\n            set [y v] to [0]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <touching (level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <((y position) - (25)) < ([y position v] of [playersprite1 v])> then\n        if <(jumping) = [y]> then\n            set [y v] to [12]\n            set [jumping v] to [n]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping v] to [y]\nend\n\nwhen flag clicked\nRestart\nshow\nset [level v] to [1]\nforever\n    Physics\nend\n\ndefine Slope detection\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (level v)?> then\n    change y by (-8)\nend\n\nwhen I receive [reset enemy v]\nRestart\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (ninjastar v)?> then\n        hide\n        wait (3) seconds\n        show\n        Restart\n    end\nend\n\n@spikes\n\nwhen [timer v] > (0.3)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\n@random stuff\n\nwhen I start as a clone\ncreate clone of (_myself_ v)\ndelete this clone\n\ndefine CrAsH THE MAsS REPORTERS\nif <touching (mouse-pointer v)?> then\n    wait (0.2) seconds\n    if <touching (mouse-pointer v)?> then\n        create clone of (_myself_ v)\n    end\nelse\n    CrAsH THE MAsS REPORTERS\nend\n\nwhen flag clicked\nCrAsH THE MAsS REPORTERS\n\n@TB\n\nwhen flag clicked\nforever\n    hide\n    reset timer\nend\n\nwhen [timer v] > (0.3)\nshow\ngo to [front v] layer\n\n@GRAPHICS\n\nwhen [timer v] > (0.3)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\ngo to x: (36) y: (25)\n\n@NinjaStar\n\nwhen I receive [ninjastar v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo to (playersprite1 v)\nrepeat until <<touching (level v)?> or <<touching (_edge_ v)?> or <touching (enemy v)?>>>\n    glide (0.01) secs to x: ((x position) + (10)) y: (y position)\n    next costume\nend\nwait (1) seconds\nrepeat (5)\n    show\n    wait (0.1) seconds\n    hide\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Super Jump\n\nwhen flag clicked\nforever\n    if <((Level) mod (3)) = [0]> then\n        hide\n    else\n        hide\n    end\nend\n\nshow\n\nwhen [timer v] > (0.3)\nhide\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (200) y: (-15)\n\ndefine Physics\nif <(x position) < ([x position v] of [playersprite1 v])> then\n    change [x v] by (0.5)\nend\nif <([x position v] of [playersprite1 v]) < (x position)> then\n    change [x v] by (-0.5)\nend\nchange x by (x)\nif <touching (level v)?> then\n    change x by ((x) * (-1))\n    if <(y position) < ([y position v] of [playersprite1 v])> then\n        if <(x) > [0]> then\n            set [x v] to [-3]\n            set [y v] to [3]\n        else\n            set [x v] to [0]\n            set [y v] to [0]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <touching (level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <((y position) - (25)) < ([y position v] of [playersprite1 v])> then\n        if <(jumping) = [y]> then\n            set [y v] to [20]\n            set [jumping v] to [n]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping v] to [y]\nend\n\nwhen flag clicked\nRestart\nshow\nset [level v] to [1]\nforever\n    Physics\nend\n\ndefine Slope detection\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (level v)?> then\n    change y by (-8)\nend\n\nwhen I receive [reset enemy v]\nRestart\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (ninjastar v)?> then\n        hide\n        wait (3) seconds\n        show\n        Restart\n    end\nend\n\n@speed\n\nwhen flag clicked\nforever\n    if <((Level) mod (5)) = [0]> then\n        hide\n    else\n        hide\n    end\nend\n\nwhen [timer v] > (0.3)\nhide\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (200) y: (-15)\n\ndefine Physics\nif <(x position) < ([x position v] of [playersprite1 v])> then\n    change [x v] by (1.5)\nend\nif <([x position v] of [playersprite1 v]) < (x position)> then\n    change [x v] by (-1.5)\nend\nchange x by (x)\nif <touching (level v)?> then\n    change x by ((x) * (-1))\n    if <(y position) < ([y position v] of [playersprite1 v])> then\n        if <(x) > [0]> then\n            set [x v] to [20]\n            set [y v] to [-20]\n        else\n            set [x v] to [0]\n            set [y v] to [0]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <touching (level v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <((y position) - (25)) < ([y position v] of [playersprite1 v])> then\n        if <(jumping) = [y]> then\n            set [y v] to [12]\n            set [jumping v] to [n]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping v] to [y]\nend\n\nwhen flag clicked\nRestart\nshow\nset [level v] to [1]\nforever\n    Physics\nend\n\ndefine Slope detection\nset [slope v] to [0]\nrepeat until <<(slope) = [8]> or <not <touching (level v)?>>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <touching (level v)?> then\n    change y by (-8)\nend\n\nwhen I receive [reset enemy v]\nRestart\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (ninjastar v)?> then\n        hide\n        wait (3) seconds\n        show\n        Restart\n    end\nend\n\n@shop\n\nwhen flag clicked\nset [superjump v] to [0]\nset [minimode v] to [0]\ngo to x: (-215) y: (-147)\ngo to [front v] layer\nshow\nswitch costume to (shop v)\n\ndefine clone @ (x) (y) (c)\nswitch costume to (c)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\ngo to x: (-215) y: (-147)\ngo to [front v] layer\nswitch costume to (shop v)\n\nwhen this sprite clicked\nclone @ [0] [0] [3]\nclone @ [0] [0] [2]\nclone @ [0] [0] [4]\nclone @ [0] [0] [5]\n\nwhen I start as a clone\nif <[2] = (costume [number v])> then\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    broadcast (CloseShop v)\nend\nif <[4] = (costume [number v])> then\n    if <(coins) > [5]> then\n        wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n        set [superjump v] to [1]\n        change [coins v] by (-5)\n    end\nend\nif <[5] = (costume [number v])> then\n    if <(coins) > [1]> then\n        wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n        broadcast (Rainbow v)\n        change [coins v] by (-2)\n    end\nend\nif <[5] = (costume [number v])> then\n    forever\n        change [color v] effect by (2)\n    end\nend\n\nwhen I receive [closeshop v]\ndelete this clone\n\nset [minimode v] to [1]\n\n@Bad\n\nwhen flag clicked\ngo to [back v] layer\nhide\nwait until <(Level) = [6]>\nshow\nrepeat until <(Level) = [7]>\n    next costume\n    wait (3) seconds\nend\nhide\n\n@obstacles\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [open  v]\nhide\nset [levelsaved v] to ((Level) + (1))\nrepeat until <(Level) = (levelSaved)>\n    broadcast (reset v)\nend\nshow\n\n@Sprite2\n\nwhen flag clicked\nwait until <touching (playersprite1 v)?>\nswitch costume to (costume2 v)\nbroadcast (OPEN  v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [reset v]\nswitch costume to (costume1 v)\nif <(level) = [3]> then\n    go to x: (75) y: (50)\n    go to x: (121) y: (200)\nelse\n    go to x: (36) y: (28)\nend\nswitch costume to (costume1 v)\nwait until <touching (playersprite1 v)?>\nswitch costume to (costume2 v)\nbroadcast (OPEN  v)\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        go to x: (121) y: (230)\n    end\nend\n\n@Sprite1\n\n@Sprite8\n\nwhen flag clicked\nforever\n    show\n    switch costume to (letter (1) of (coins))\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Sprite7\n\nwhen flag clicked\nforever\n    if <<(coins) > [10]> or <(coins) = [10]>> then\n        show\n        switch costume to (letter (2) of (coins))\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [coins v] to [0]\nforever\n    go to [front v] layer\nend\n\n@Sprite3\n\nwhen flag clicked\nwait until <(Level) = [1]>\nif <(Level) = [1]> then\n    Clone @ [28] [45]\n    Clone @ [-151] [-23]\nend\nwait until <(Level) = [2]>\nif <(Level) = [2]> then\n    Clone @ [-65] [-5]\n    Clone @ [-192] [-93]\n    Clone @ [137] [91]\nend\nwait until <(Level) = [3]>\nif <(Level) = [3]> then\n    Clone @ [-114] [-99]\n    Clone @ [-76] [111]\n    Clone @ [5] [138]\nend\nhide\n\ndefine Clone @ (x) (y)\nshow\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\nhide\n\nClone @ [] []\nClone @ [] []\n\nClone @ [] []\nClone @ [] []\nClone @ [] []\nClone @ [] []\nClone @ [] []\n\nwhen I start as a clone\nwait until <touching (playersprite1 v)?>\nchange [coins v] by (1)\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset [levelsavedcoin v] to ((Level) + (1))\nwait until <(levelsavedCoin) = (level)>\ndelete this clone\n\n
Press the arrow keys to move\nFor @IAMibrahim contest\n#16 on trending!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n@IAMibrahim loved and faved :O\n\nInstructions.....\nNot Mobile\nHit space to launch ninja stars. Go right with the right arrow key. Go left with the left arrow key. and jump with the up arrow key. First go to the lever and touch it, then the wall will open go through it to go to the next level. Get coins and buy things from the shop.       