$1 Jetpack - platformer #games # all
@Stage\n\nwhen flag clicked\nswitch backdrop to (slopes v)\nforever\n    play sound [song v] until done\nend\n\nwhen I receive [next level v]\nif <(Level) = [4]> then\n    switch backdrop to (temple v)\nend\n\n@Guy\n\nwhen I start as a clone\nswitch costume to (trail1 v)\nclear graphic effects\nrepeat (8)\n    change size by (-4)\n    change [ghost v] effect by (10)\n    change [brightness v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nSetup\nbroadcast (Game Loop v)\n\ngo to x: (-190) y: (-24)\ngo to x: (-201) y: (14)\n\nwhen flag clicked\n\ndefine Fix Collisions in direction (dir)\nset [temporary dir v] to (direction)\nset [distance v] to [1]\npoint in direction (dir)\nrepeat (168)\n    Check Touching Solid\n    if <(touching) < [1]> then\n        point in direction (temporary dir)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\ndefine Check Touching Solid\nif <<touching (ground v)?> or <touching (sword button v)?>> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nhide variable [speed x v]\n\nwhen flag clicked\nforever\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Fix Collisions in direction [0]\n        Fix Collisions in direction [90]\n    end\nend\n\ndefine Setup\ngo to x: (-200) y: (50)\npoint in direction (90)\nshow\ngo to [front v] layer\nclear graphic effects\nset size to (45) %\nswitch costume to (middle v)\nset drag mode [not draggable v]\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [level v] to [1]\n\ndefine Left / Right Movement\nif <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [speed x v] by (-1)\n    point in direction (-90)\nend\nif <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [speed x v] by (1)\n    point in direction (90)\nend\nset [speed x v] to ((speed x) * (0.9))\nchange x by (speed x)\n\nwhen I receive [game loop v]\nset [dead? v] to [0]\nforever\n    create clone of (_myself_ v)\n    Set Costume\n    Left / Right Movement\n    Horizontal Collision and Wall Jump\n    Up / Down Movement\n    Check Death / Win\nend\n\ndefine Horizontal Collision and Wall Jump\nCheck Touching Solid\nif <(touching) = [1]> then\n    change y by (1)\n    Check Touching Solid\n    if <(touching) = [1]> then\n        change y by (1)\n        Check Touching Solid\n        if <(touching) = [1]> then\n            change y by (1)\n            Check Touching Solid\n            if <(touching) = [1]> then\n                change y by (1)\n                Check Touching Solid\n                if <(touching) = [1]> then\n                    change y by (1)\n                    Check Touching Solid\n                    if <(touching) = [1]> then\n                        change x by ((speed x) * (-1))\n                        change y by (-5)\n                        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                            if <(speed x) > [0]> then\n                                set [speed x v] to [-7]\n                            else\n                                set [speed x v] to [7]\n                            end\n                            set [speed y v] to [14]\n                        else\n                            set [speed x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (-3)\n\ndefine Up / Down Movement\nCheck Touching Solid\nif <(touching) = [1]> then\n    if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [speed y v] to [14]\n    end\nend\nchange y by (3)\nchange [speed y v] by (-1)\nchange y by (speed y)\nCheck Touching Solid\nif <(touching) = [1]> then\n    change y by ((speed y) * (-1))\n    set [speed y v] to [0]\nend\n\ndefine Check Death / Win\nif <(x position) > [230]> then\n    change [level v] by (1)\n    broadcast (next level v)\nend\nif <(y position) < [-170]> then\n    broadcast (Death v)\nend\nif <touching (spike v)?> then\n    broadcast (Death v)\nend\nif <touching (lava v)?> then\n    broadcast (Death v)\nend\nif <touching (saw v)?> then\n    broadcast (Death v)\nend\n\nwhen I receive [next level v]\nset [speed y v] to [0]\nset [speed x v] to [0]\nif <(Level) = [12]> then\n    go to x: (-235) y: (100)\nelse\n    go to x: (-245) y: (-50)\nend\n\nwhen I receive [death v]\nstop [other scripts in sprite v]\nset [dead? v] to [1]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nclear graphic effects\nif <(Level) = [12]> then\n    go to x: (-235) y: (100)\nelse\n    go to x: (-235) y: (-50)\nend\nset [speed y v] to [0]\nset [speed x v] to [0]\nshow\nbroadcast (Game Loop v)\ndelete this clone\n\ndefine Set Costume\nif <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n    switch costume to (right v)\nelse\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n        switch costume to (left v)\n    else\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (-20)) > (y position)> and <mouse down?>>> then\n            switch costume to (up v)\n        else\n            if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (-20)) > (x position)> and <mouse down?>>> then\n                switch costume to (right v)\n            else\n                if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (-20)) < (x position)> and <mouse down?>>> then\n                    switch costume to (left v)\n                else\n                    switch costume to (middle v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [death v]\n\nwhen I receive [game loop v]\ndelete this clone\n\nwhen I receive [game loop v]\n\nFix Collisions in direction [0]\nFix Collisions in direction [90]\n\nwhen I receive [next level v]\nwait (0.01) seconds\nFix Collisions in direction [0]\n\nwhen I receive [90 v]\nset [speed y v] to [20]\nchange y by (speed y)\n\nwhen I receive [-90 v]\nset [speed y v] to [-20]\nchange y by (speed y)\n\nstop [this script v]\n\nwhen I receive [180 v]\nset [speed x v] to [25]\n\nwhen I receive [next level v]\nFix Collisions in direction [0]\n\nwhen I receive [game loop v]\nFix Collisions in direction [0]\nforever\n    Check Touching Solid\n    if <(touching) > [0]> then\n        Fix Collisions in direction [0]\n        Fix Collisions in direction [90]\n    end\nend\n\nwhen I receive [bounce v]\nset [speed y v] to [10]\n\ngo to [back v] layer\n\n@ground\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\npoint in direction (90)\ngo to [front v] layer\ngo [backward v] (2) layers\nswitch costume to (join [Level] (Level))\n\nwhen I receive [next level v]\nswitch costume to (join [Level] (Level))\n\nswitch costume to (level1 v)\n\nnext costume\n\n@Lava\n\nwhen I receive [next level v]\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nif <(Level) = [4]> then\n    show\n    switch costume to (lava0 v)\n    forever\n        change [frame v] by (0.4)\n        set y to ((5) * ([sin v] of ((timer) * (150)) ))\n        switch costume to (join [lava] (([floor v] of (frame) ) mod (4)))\n    end\nend\nif <(Level) = [5]> then\n    show\n    switch costume to (lava2.0 v)\n    forever\n        change [frame v] by (0.4)\n        set y to ((5) * ([sin v] of ((timer) * (150)) ))\n        switch costume to (join [lava2.] (([floor v] of (frame) ) mod (4)))\n    end\nend\nif <(Level) = [7]> then\n    show\n    switch costume to (costume3 v)\n    forever\n        change [frame v] by (0.4)\n        set y to ((5) * ([sin v] of ((timer) * (150)) ))\n        switch costume to (join [lava3.] (([floor v] of (frame) ) mod (4)))\n    end\nend\nhide\n\nwhen flag clicked\nhide\n\nnext costume\n\n@Spike\n\nwhen flag clicked\nshow\nswitch costume to (1 v)\n\nwhen I receive [next level v]\ngo to [back v] layer\nclear graphic effects\ngo to [back v] layer\nif <(Level) = [4]> then\n    show\n    switch costume to (4 v)\n    stop [this script v]\nend\nif <(Level) = [6]> then\n    show\n    switch costume to (6 v)\n    forever\n        if <touching (guy v)?> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (100)\n        end\n    end\nend\nif <(Level) = [7]> then\n    show\n    switch costume to (7 v)\n    stop [this script v]\nend\nif <(Level) = [12]> then\n    show\n    switch costume to (12 v)\n    stop [this script v]\nend\nhide\n\nif <(Level) = [3]> then\nif <(Level) = [4]> then\n    hide\nend\n\nstop [this script v]\n\nif <(Level) = [14]> then\n    show\n    switch costume to (14 v)\n    stop [this script v]\nend\n\n@Trampoline\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0) seconds\ngo to [back v] layer\nClone at [-60] [-80] level [9] dir [90]\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    if <touching (guy v)?> then\n        switch costume to (costume1 v)\n        broadcast (direction)\n        wait (0.08) seconds\n        switch costume to (spring2 v)\n        wait (0.05) seconds\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nchange y by (50)\n\ndefine Clone at (x) (y) level (level) dir (dir)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    point in direction (dir)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [next level v]\nwait (0) seconds\n\ngo to x: (-60) y: (-60)\n\n@Saw\n\nwhen I receive [next level v]\ngo to [back v] layer\nwait (0) seconds\nClone at [131] [-118] size [120] level [2]\nClone at [-76] [-118] size [120] level [2]\nClone at [-8] [68] size [120] level [2]\nClone at [-240] [68] size [120] level [2]\nClone at [200] [68] size [120] level [2]\nClone at [-93] [-93] size [120] level [7]\nClone at [-72] [67] size [120] level [12]\nClone at [144] [21] size [120] level [13]\n\ngo to x: (30) y: (50)\nset size to (200) %\ncreate clone of (_myself_ v)\ngo to x: (166) y: (-112)\nset size to (100) %\ncreate clone of (_myself_ v)\ngo to x: (-120) y: (-106)\n\nif <(Level) = [10]> then\n    go to x: (-120) y: (-106)\n    set size to (150) %\n    create clone of (_myself_ v)\nend\nif <(Level) = [14]> then\n    set size to (80) %\n    go to x: (-23) y: (123)\n    create clone of (_myself_ v)\nend\nif <(Level) = [16]> then\n    set size to (120) %\n    go to x: (-71) y: (-118)\n    create clone of (_myself_ v)\n    go to x: (131) y: (-57)\n    create clone of (_myself_ v)\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    turn left (15) degrees\nend\n\nrepeat until <(Level) = [9]>\n\ndelete this clone\n\ngo to x: (26) y: (-33)\n\nwhen I receive [next level v]\ndelete this clone\n\ngo to x: (-23) y: (123)\n\ngo to x: (131) y: (-57)\nset size to (120) %\n\ndefine Clone at (x) (y) size (size) level (level)\nif <(Level) = (level)> then\n    go to x: (x) y: (y)\n    set size to (size) %\n    create clone of (_myself_ v)\nend\n\nset size to (140) %\n\nchange x by (-20)\n\nchange y by (-10)\n\n@Cloud\n\nwhen flag clicked\nhide\nset rotation style [left-right v]\nswitch costume to (big v)\nset x to (280)\nCreate Cloud\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (5))\nset [costume v] to (costume [number v])\nset [ghost v] effect to (pick random (30) to (70))\nset y to (pick random (80) to (180))\nset [sx v] to (pick random (3.) to (5.))\nrepeat ((600) / (sx))\n    go to [back v] layer\n    switch costume to (big v)\n    change x by ((-1) * (sx))\n    switch costume to (costume)\nend\ndelete this clone\n\nwhen I receive [next level v]\nif <(Level) = [4]> then\n    stop [other scripts in sprite v]\n    delete this clone\nend\n\nset [ghost v] effect to (20)\nshow\n\ndefine Create Cloud\nforever\n    switch costume to (big v)\n    create clone of (_myself_ v)\n    wait (pick random (1.) to (2.)) seconds\nend\n\nforever\n\n@Word\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nshow\nswitch costume to (join [Level] (Level))\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [next level v]\nswitch costume to (join [Level] (Level))\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\ngo to x: (0) y: (0)\npoint in direction (90)\ngo to [front v] layer\nshow\n\n@Enemy\n\ndefine Spawn (type) at (x) (y) level (level) dir (dir) size (size) with (weapon) size (weapon size)\nif <(type) = []> then\n    if <(level) = (Level)> then\n        switch costume to (type)\n        go to x: (x) y: (y)\n        point in direction (dir)\n        set size to (size) %\n        set [type v] to (type)\n        create clone of (_myself_ v)\n        if <(weapon) > []> then\n            switch costume to (weapon)\n            set [type v] to (weapon)\n            set size to (weapon size) %\n            create clone of (_myself_ v)\n        end\n        set [type v] to []\n    end\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\nset [frame v] to []\nif <(type) = [Slime]> then\n    Spawn Slime\nend\nif <(type) = [Tall]> then\n    Spawn Tall\nend\nif <(type) = [Spiky]> then\n    Spawn Spiky\nend\nif <(type) = [spear*]> then\n    set rotation style [all around v]\n    Spawn spear\nend\nif <(type) = [sword*]> then\n    spawn sword*\nend\nMove - Down\nforever\n    point towards (guy v)\nend\n\nwhen I receive [next level v]\nwait (0) seconds\nSpawn All Enemies\n\nwhen flag clicked\nset [frame v] to [0]\nset [type v] to []\nset rotation style [left-right v]\nhide\n\ndefine Move - Down\nchange [sy v] by (-1)\nchange y by (sy)\nrepeat until <not <touching (ground v)?>>\n    change y by (1)\n    set [sy v] to [0]\nend\n\ndefine Move - Left or Right\nmove (2) steps\nrepeat (4)\n    if <not <<touching (ground v)?> or <<touching (_edge_ v)?> or <touching (invisible enemy wall v)?>>>> then\n        stop [this script v]\n    end\n    change y by (1)\nend\nchange y by (-4)\nmove (-2) steps\nturn right (180) degrees\n\ndefine Touching Player?\nif <touching (guy v)?> then\n    if <(speed y) < [-2]> then\n        switch costume to (join (costume [name v]) [Squish])\n        broadcast (Bounce v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    else\n        if <(DEAD?) = [0]> then\n            broadcast (Death v)\n        end\n    end\nend\n\nwhen I receive [game loop v]\nwait (0) seconds\nSpawn All Enemies\n\nwhen I receive [game loop v]\ndelete this clone\n\ndefine Spawn Slime\nforever\n    if <(frame) = [20]> then\n        set [sy v] to [8]\n        set [frame v] to [0]\n    end\n    Move - Down\n    Move - Left or Right\n    Touching Player?\n    change [frame v] by (0.5)\nend\n\ndefine Spawn Tall\nforever\n    Move - Down\n    Move - Left or Right\n    Touching Player?\nend\n\nwhen I receive [next level v]\ndelete this clone\n\ndefine Spawn All Enemies\nSpawn [Tall] at [150] [10] level [3] dir [-90] size [60] with [] size []\nSpawn [Slime] at [30] [-60] level [3] dir [-90] size [60] with [] size []\nSpawn [Spiky] at [200] [-60] level [3] dir [-90] size [60] with [] size []\nSpawn [Spear] at [30] [-70] level [8] dir [-90] size [60] with [spear*] size [50]\nSpawn [Spear] at [-110] [-70] level [9] dir [-90] size [60] with [spear*] size [50]\nSpawn [Sword] at [100] [30] level [9] dir [-90] size [60] with [sword*] size [70]\nSpawn [Spear] at [-100] [-70] level [11] dir [-90] size [60] with [spear*] size [50]\nSpawn [Sword] at [0] [-70] level [11] dir [-90] size [60] with [sword*] size [70]\nSpawn [Spear] at [-140] [55] level [11] dir [-90] size [60] with [spear*] size [50]\nSpawn [Sword] at [-40] [55] level [11] dir [-90] size [60] with [sword*] size [70]\nSpawn [Spear] at [90] [55] level [11] dir [-90] size [60] with [spear*] size [70]\nSpawn [Spear] at [-103] [-62] level [13] dir [-90] size [60] with [spear*] size [70]\nSpawn [Sword] at [-23] [-22] level [13] dir [-90] size [60] with [sword*] size [70]\n\ndefine Spawn Spiky\nforever\n    if <(frame) = [20]> then\n        set [sy v] to [8]\n        set [frame v] to [0]\n    end\n    Move - Down\n    Move - Left or Right\n    if <<touching (guy v)?> and <(DEAD?) = [0]>> then\n        broadcast (Death v)\n    end\n    change [frame v] by (0.5)\nend\n\nbroadcast (next level v)\n\nSpawn [Slime] at [30] [-40] level [4] dir [-90] size [60] with [] size []\nSpawn [Slime] at [-50] [-60] level [4] dir [-90] size [60] with [] size []\nSpawn [Tall] at [140] [0] level [5] dir [90] size [60] with [] size []\nSpawn [Slime] at [70] [-20] level [5] dir [-90] size [60] with [] size []\nSpawn [Tall] at [0] [-30] level [5] dir [-90] size [60] with [] size []\nSpawn [Slime] at [-60] [-60] level [5] dir [90] size [60] with [] size []\nSpawn [Tall] at [-130] [-80] level [5] dir [90] size [60] with [] size []\nSpawn [Tall] at [20] [-40] level [11] dir [-90] size [60] with [] size []\nSpawn [Spiky] at [-60] [-70] level [13] dir [-90] size [60] with [] size []\nSpawn [Spiky] at [80] [-70] level [13] dir [-90] size [60] with [] size []\nSpawn [Spiky] at [210] [-70] level [13] dir [-90] size [60] with [] size []\nSpawn [Spiky] at [170] [0] level [14] dir [-90] size [60] with [] size []\n\ndefine Spawn spear\nforever\n    go to [back v] layer\n    point towards (guy v)\n    if <(distance to [guy v]) < [120]> then\n        Poke them\n    end\nend\n\ndefine Poke them\nrepeat (4)\n    move (2) steps\nend\nrepeat (4)\n    move (-2) steps\nend\n\ndelete this clone\n\nset [type v] to []\n\nwait (0.2) seconds\n\ndefine Check Death\nforever\n    if <<touching (guy v)?> and <(DEAD?) = [0]>> then\n        broadcast (Death v)\n    end\nend\n\nwhen I start as a clone\nif < (type) contains [*]?> then\n    set rotation style [all around v]\n    Check Death\nend\n\nSpawn spear\n\nbroadcast (next level v)\n\ndefine spawn sword*\nforever\n    go to [back v] layer\n    if <([x position v] of [guy v]) > (x position)> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\n    set rotation style [all around v]\n    if <(distance to [guy v]) < [120]> then\n        repeat (36)\n            turn right (10) degrees\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    end\nend\n\ngo to x: (100) y: (30)\n\n@Nothing\n\nwhen I receive [next level v]\nif <(Level) = [5]> then\n    show\n    stop [this script v]\nend\nhide\n\nforever\n    if <touching (guy v)?> then\n        change [ghost v] effect by (5)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nset [ghost v] effect to (60)\n\nwhen flag clicked\nhide\n\n@Glow\n\nwhen I receive [next level v]\nif <(Level) = [14]> then\n    set [ghost v] effect to (50)\n    show\nend\n\nwhen flag clicked\nhide\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\nend\n\nwhen I receive [next level v]\n\nif <(Level) = [11]> then\n    hide\n    switch backdrop to (slopes v)\nend\n\n@people\n\nwhen I receive [next level v]\nif <(Level) = [2]> then\n    go to x: (20) y: (-75)\n    show\n    forever\n        if <touching (guy v)?> then\n            say [Beware! A gang of bad guys had take over the temple for the ruby!]\n        else\n            say []\n        end\n    end\nend\nhide\n\nwhen flag clicked\nhide\n\n@Arrow and bow\n\nwhen I start as a clone\nshow\nif <(type) = [arrow]> then\n    set [type v] to []\n    switch costume to (arrow v)\n    repeat until <<touching (guy v)?> or <<touching (ground v)?> or <<touching (_edge_ v)?> or <touching (sword v)?>>>>\n        move (15) steps\n    end\n    if <touching (sword v)?> then\n        turn right (180) degrees\n        repeat until <<touching (guy v)?> or <<touching (ground v)?> or <touching (_edge_ v)?>>>\n            move (15) steps\n        end\n    end\n    if <touching (guy v)?> then\n        broadcast (Death v)\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [next level v]\nset [type v] to []\nif  then\n    delete this clone\nend\nif <(Level) = [7]> then\n    set [type v] to [bow]\n    go to x: (-187) y: (105)\n    create clone of (_myself_ v)\nend\nif <(Level) = [8]> then\n    set [type v] to [bow]\n    go to x: (180) y: (50)\n    create clone of (_myself_ v)\nend\nif <(Level) = [12]> then\n    set [type v] to [bow]\n    go to x: (-160) y: (-100)\n    create clone of (_myself_ v)\nend\n\ndefine Animation\nswitch costume to (bow 0 v)\nwait (1) seconds\nrepeat (10)\n    next costume\nend\nwait (1) seconds\nset [type v] to [arrow]\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [type v] to []\n\nwhen I start as a clone\nif <(type) = [bow]> then\n    forever\n        Animation\n    end\nend\n\nwhen I start as a clone\nif <(type) = [bow]> then\n    forever\n        point towards (guy v)\n    end\nend\n\nbroadcast (next level v)\n\nset [type v] to [bow]\ngo to x: (-180) y: (50)\ncreate clone of (_myself_ v)\n\n@Sword\n\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    show\n    point in direction (45)\n    go to x: (-24) y: (-29)\n    forever\n        if <touching (guy v)?> then\n            set [sword v] to [1]\n            hide\n            forever\n                go to (guy v)\n            end\n        end\n    end\nend\n\nwhen [space v] key pressed\nbroadcast (Swing Sword v)\n\nwhen flag clicked\nset [sword v] to [0]\nhide\n\nwhen I receive [next level v]\nif <(sword) = [1]> then\n    forever\n        go to (guy v)\n    end\nend\n\nhide\n\nrepeat (10)\n\nturn right (15) degrees\n\nwhen I receive [swing sword v]\nshow\nif <<(sword) = [1]> and <(using) = [0]>> then\n    if <([direction v] of [guy v]) > [0]> then\n        switch costume to (sword v)\n        point in direction (15)\n        repeat (10)\n            turn right (15) degrees\n        end\n    else\n        switch costume to (sword2 v)\n        point in direction (-15)\n        repeat (10)\n            turn left (15) degrees\n        end\n    end\nend\nhide\nset [using v] to [1]\nwait until <not <key (space v) pressed?>>\nset [using v] to [0]\n\n@Sword button\n\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    forever\n        if <([sword v] of [sword v]) = [1]> then\n            show\n            switch costume to (costume2 v)\n        end\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Swing Sword v)\n\nwhen flag clicked\ngo to x: (52) y: (-46)\nhide\n\nhide\n\ngo [backward v] (1) layers\n\nwhen [s v] key pressed\nif <([sword v] of [sword v]) = [1]> then\n    go to [front v] layer\n    next costume\nend\n\n
New game out!  https://scratch.mit.edu/projects/219448041/\nPixel Platformer 2.0 is out!  \nhttps://scratch.mit.edu/projects/204398021/\nHow to make a good platformer: (by MathisAnimations)\nhttps://scratch.mit.edu/projects/203497752/\nPLEASE READ ALL OF THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n1.  Arrow keys to move left/right and jump.\n2.  Click on the character to choose it.\n3  Once you do step 2 the game will start\nAll the other instructions you will find in-game.\nAll levels are possible.\nPlease remix and add your own levels!\nLove and fave if you enjoyed it!  And if you want to see more projects like this, follow me.\nPlease share any glitches in the comments and I will try to fix them.\nThanks for top loved!!!!!!!!!!!!!\nAnd top remixed!\n32.4k views!!!!!!!!!!!!!!!!!!\n2.9k loves!!!!!!!!!!!!!!!!!\nPlease don't advertise in the comments.