zombie Platformer // Scrolling Platformer 
@Stage\n\nwhen I receive [start v]\nforever\n    play sound [Eerie Forest Night Ambience Effect v] until done\nend\n\nwhen I receive [start v]\nforever\n    set volume to (🔊 volume) %\nend\n\n@Intro\n\nwhen flag clicked\nhide\nclear graphic effects\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nwait (0.8) seconds\nswitch costume to (text games v)\ncreate clone of (_myself_ v)\nwait (2) seconds\nbroadcast (start v)\n\nwhen I start as a clone\nif <(costume [name v]) = [bg]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    show\nend\nif <(costume [name v]) = [logo]> then\n    point in direction (0)\n    go to x: (0) y: (0)\n    set size to (0) %\n    show\n    repeat (20)\n        change size by (((100) - (size)) / (3))\n        turn right (((90) - (direction)) / (3)) degrees\n    end\n    wait (0.1) seconds\n    repeat (30)\n        change x by (((-110) - (x position)) / (3))\n    end\n    wait (0.2) seconds\nend\nif < (costume [name v]) contains [text]?> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    go [backward v] (1) layers\n    show\n    repeat (30)\n        change x by (((40) - (x position)) / (3))\n    end\nend\n\nwhen I receive [start v]\nif <(costume [name v]) = [bg]> then\n    wait (0.5) seconds\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Home Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (0.5) seconds\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\nswitch costume to (campfire v)\ncreate clone of (_myself_ v)\nswitch costume to (overlay v)\ncreate clone of (_myself_ v)\nswitch costume to (player idle v)\ncreate clone of (_myself_ v)\nswitch costume to (title v)\ncreate clone of (_myself_ v)\nswitch costume to (button1 v)\ncreate clone of (_myself_ v)\nswitch costume to (button2 v)\ncreate clone of (_myself_ v)\nswitch costume to (button3 v)\ncreate clone of (_myself_ v)\nswitch costume to (particle1 v)\nforever\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [bg]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    show\nend\nif <(costume [name v]) = [campfire]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\nif <(costume [name v]) = [overlay]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    set [🔒 animate v] to [0]\n    set [ghost v] effect to (60)\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        set [ghost v] effect to ((60) + (([sin v] of ((🔒 animate) * (100)) ) * (10)))\n        change [🔒 animate v] by ((1) / (30))\n    end\nend\nif < (costume [name v]) contains [particle]?> then\n    go to x: ((-60) + (pick random (-5) to (5))) y: (-92)\n    set size to (pick random (30) to (40)) %\n    show\n    switch costume to (particle3 v)\n    repeat (20)\n        change x by (pick random (-1) to (1))\n        change y by (2)\n        change size by (1)\n    end\n    switch costume to (particle2 v)\n    repeat (20)\n        change x by (pick random (-1) to (1))\n        change y by (2)\n        change size by (1)\n    end\n    switch costume to (particle1 v)\n    repeat (40)\n        change x by (pick random (-1) to (1))\n        change y by (2)\n        change size by (1)\n    end\n    repeat until <(size) < [10]>\n        change x by (pick random (-1) to (1))\n        change y by (2)\n        change size by (((0) - (size)) / (3))\n    end\n    delete this clone\nend\nif <(costume [name v]) = [title]> then\n    go to x: (-80) y: (140)\n    set size to (80) %\n    go to [front v] layer\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n    end\nend\nif <(costume [name v]) = [button1]> then\n    go to x: (-137) y: (-75)\n    set size to (100) %\n    go to [front v] layer\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        switch costume to (hitbox v)\n        if <touching (mouse-pointer v)?> then\n            change x by (((-120) - (x position)) / (3))\n            switch costume to (button1 select v)\n            if <mouse down?> then\n                broadcast (game v)\n                \n            end\n        else\n            change x by (((-137) - (x position)) / (3))\n            switch costume to (button1 v)\n        end\n    end\nend\nif <(costume [name v]) = [button2]> then\n    go to x: (-137) y: (-110)\n    set size to (100) %\n    go to [front v] layer\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        switch costume to (hitbox v)\n        if <touching (mouse-pointer v)?> then\n            change x by (((-120) - (x position)) / (3))\n            switch costume to (button2 select v)\n            if <mouse down?> then\n                switch costume to (instructions v)\n                create clone of (_myself_ v)\n                switch costume to (button2 select v)\n                wait until <not <mouse down?>>\n            end\n        else\n            change x by (((-137) - (x position)) / (3))\n            switch costume to (button2 v)\n        end\n    end\nend\nif <(costume [name v]) = [button3]> then\n    go to x: (-137) y: (-145)\n    set size to (100) %\n    go to [front v] layer\n    set [🔊 volume v] to [100]\n    set [🔒 animate v] to [1]\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        switch costume to (hitbox v)\n        if <touching (mouse-pointer v)?> then\n            change x by (((-120) - (x position)) / (3))\n            switch costume to (button3 select v)\n            if <mouse down?> then\n                change [🔒 animate v] by (1)\n                if <(🔒 animate) > [1]> then\n                    set [🔒 animate v] to [0]\n                end\n                wait until <not <mouse down?>>\n            end\n        else\n            change x by (((-137) - (x position)) / (3))\n            switch costume to (button3 v)\n        end\n        if <(🔒 animate) = [1]> then\n            set [ghost v] effect to (0)\n        else\n            set [ghost v] effect to (50)\n        end\n        set [🔊 volume v] to ((🔒 animate) * (100))\n    end\nend\nif <(costume [name v]) = [instructions]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        go to [front v] layer\n        change [ghost v] effect by (-10)\n    end\n    wait until <not <mouse down?>>\n    repeat until <mouse down?>\n        go to [front v] layer\n    end\n    repeat (10)\n        go to [front v] layer\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [player idle]> then\n    set [🔒 target x v] to [0]\n    forever\n        set [🔒 target x v] to (pick random (-180) to (180))\n        wait (pick random (1) to (5)) seconds\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [player idle]> then\n    go to x: (-50) y: (-70)\n    set size to (60) %\n    set rotation style [left-right v]\n    show\n    wait (0.3) seconds\n    forever\n        go to [front v] layer\n        if <([abs v] of ((🔒 target x) - (x position)) ) > [3]> then\n            change x by ((3) * (<(🔒 target x) > (x position)> - <(🔒 target x) < (x position)>))\n            point in direction ((90) * (<(🔒 target x) > (x position)> - <(🔒 target x) < (x position)>))\n            next costume\n            if <(costume [name v]) = [title]> then\n                switch costume to (player1 v)\n            end\n        else\n            switch costume to (player idle v)\n        end\n    end\nend\n\nwhen I receive [game v]\nstop [other scripts in sprite v]\nwait (0.5) seconds\ndelete this clone\n\nwhen I receive [start v]\nwait (0.5) seconds\nforever\n    play sound [Crackling Fireplace Sound Effect HQ v] until done\nend\n\nwhen I receive [start v]\nwait (0.5) seconds\nforever\n    set volume to (🔊 volume) %\nend\n\n@Transition\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\ngo to x: (0) y: (0)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Overlay\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\ngo to x: (0) y: (0)\nset size to (100) %\nset [ghost v] effect to (40)\nswitch costume to (overlay v)\nshow\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\n@Map\n\ndefine split (input)\nset [🔒 i v] to [0]\nset [🔒 x v] to []\nrepeat until <(letter (🔒 i) of (input)) = [.]>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = [.]>> then\n        set [🔒 x v] to (join (🔒 x) (letter (🔒 i) of (input)))\n    end\nend\nset [🔒 y v] to []\nrepeat until <(letter (🔒 i) of (input)) = []>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = []>> then\n        set [🔒 y v] to (join (🔒 y) (letter (🔒 i) of (input)))\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\ngenerate\n\nwhen I start as a clone\nset size to (100) %\nforever\n    position\nend\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (fill v)\ngo to x: ((🔒 x) - (🎥 cam x)) y: ((🔒 y) - (🎥 cam y))\nswitch costume to (🔒 costume)\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\ndefine generate\nswitch costume to (join [0] [])\nrepeat (costume [number v])\n    next costume\n    if <not <<(costume [name v]) = [dummy]> or <(costume [name v]) = [fill]>>> then\n        split (costume [name v])\n        set [🔒 x v] to ((🔒 x) * (480))\n        set [🔒 y v] to ((🔒 y) * (360))\n        create clone of (_myself_ v)\n    end\nend\n\n@Map Hitbox\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\ngenerate\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (100)\nforever\n    position\nend\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (fill v)\ngo to x: ((🔒 x) - (🎥 cam x)) y: ((🔒 y) - (🎥 cam y))\nswitch costume to (🔒 costume)\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\ndefine split (input)\nset [🔒 i v] to [0]\nset [🔒 x v] to []\nrepeat until <(letter (🔒 i) of (input)) = [.]>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = [.]>> then\n        set [🔒 x v] to (join (🔒 x) (letter (🔒 i) of (input)))\n    end\nend\nset [🔒 y v] to []\nrepeat until <(letter (🔒 i) of (input)) = []>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = []>> then\n        set [🔒 y v] to (join (🔒 y) (letter (🔒 i) of (input)))\n    end\nend\n\ndefine generate\nswitch costume to (join [0] [])\nrepeat (costume [number v])\n    next costume\n    if <not <<(costume [name v]) = [dummy]> or <(costume [name v]) = [fill]>>> then\n        split (costume [name v])\n        set [🔒 x v] to ((🔒 x) * (480))\n        set [🔒 y v] to ((🔒 y) * (360))\n        create clone of (_myself_ v)\n    end\nend\n\n@Player Gun\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\nset size to (60) %\nforever\n    if <([🔒 hp v] of [player v]) > [0]> then\n        set [🔒 x v] to ([🔒 x v] of [player v])\n        set [🔒 y v] to (([🔒 y v] of [player v]) + (7))\n        if <(player can move?) = [true]> then\n            point towards (mouse-pointer v)\n            if <(mouse x) > ([x position v] of [player v])> then\n                switch costume to (gun right v)\n            else\n                switch costume to (gun left v)\n            end\n        else\n            turn right (((90) - (direction)) / (3)) degrees\n            if <(direction) > [0]> then\n                switch costume to (gun right v)\n            else\n                switch costume to (gun left v)\n            end\n        end\n        position\n    else\n        hide\n    end\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [player fire v]\nif <(mouse x) > ([x position v] of [player v])> then\n    switch costume to (gun right fire v)\nelse\n    switch costume to (gun left fire v)\nend\n\n@Player\n\ndefine physics\nif <key (space v) pressed?> then\n    set [🔒 xv v] to ((🔒 xv) * (0.9))\nelse\n    set [🔒 xv v] to ((🔒 xv) * (0.85))\nend\nchange [🔒 x v] by (🔒 xv)\nposition\nset [🔒 slope v] to [1]\nrepeat until <<(🔒 slope) > [5]> or <not <<touching (map hitbox v)?> or <touching (pulley hitbox v)?>>>>\n    change [🔒 slope v] by (1)\n    change [🔒 y v] by (1)\n    position\nend\nif <(🔒 slope) > [5]> then\n    change [🔒 y v] by (-5)\n    repeat until <not <<touching (map hitbox v)?> or <touching (pulley hitbox v)?>>>\n        change [🔒 x v] by ((([abs v] of (🔒 xv) ) / (🔒 xv)) * (-2.5))\n        position\n    end\n    set [🔒 xv v] to [0]\nend\nif <not <<touching (map hitbox v)?> or <touching (pulley hitbox v)?>>> then\n    change [🔒 yv v] by (-1)\nend\nchange [🔒 y v] by (🔒 yv)\nposition\nif <<touching (map hitbox v)?> or <touching (pulley hitbox v)?>> then\n    repeat until <not <<touching (map hitbox v)?> or <touching (pulley hitbox v)?>>>\n        change [🔒 y v] by ((([abs v] of (🔒 yv) ) / (🔒 yv)) * (-1))\n        position\n    end\n    set [🔒 yv v] to [0]\nend\n\nwhen flag clicked\nhide\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [game v]\nwait (0.5) seconds\nset [🎥 cam x v] to [0]\nset [🎥 cam y v] to [0]\nset size to (60) %\nshow\nforever\n    set rotation style [left-right v]\n    set [🔒 x v] to (🔒 checkpoint x)\n    set [🔒 y v] to (🔒 checkpoint y)\n    set [🔒 xv v] to [0]\n    set [🔒 yv v] to [0]\n    set [🔒 slope v] to [0]\n    set [🔒 reload v] to [0]\n    set [player bullets v] to [60]\n    set [🔒 hp v] to [30]\n    position\n    clear graphic effects\n    repeat until <(🔒 hp) < [1]>\n        set [🔒 costume v] to (costume [name v])\n        switch costume to (hitbox v)\n        position\n        if <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n            physics\n        end\n        if <(player can move?) = [true]> then\n            change [🔒 xv v] by (<<key (d v) pressed?> or <key (right arrow v) pressed?>> - <<key (a v) pressed?> or <key (left arrow v) pressed?>>)\n        end\n        change [🔒 y v] by (-1)\n        position\n        if <(player can move?) = [true]> then\n            if <<<touching (map hitbox v)?> or <touching (pulley hitbox v)?>> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                if <key (space v) pressed?> then\n                    set [🔒 yv v] to [18]\n                else\n                    set [🔒 yv v] to [16]\n                end\n            end\n        end\n        change [🔒 y v] by (1)\n        if <(🔒 x) > [4560]> then\n            set [🔒 x v] to [4560]\n        end\n        if <(🔒 x) < [-220]> then\n            set [🔒 x v] to [-220]\n        end\n        if <(player can move?) = [true]> then\n            change [🎥 cam x v] by (round (((🔒 x) - (🎥 cam x)) / (5)))\n            change [🎥 cam y v] by (round (((🔒 y) - (🎥 cam y)) / (5)))\n        end\n        if <(🎥 cam x) < [0]> then\n            set [🎥 cam x v] to [0]\n        end\n        if <(🎥 cam x) > [3840]> then\n            set [🎥 cam x v] to [3840]\n        end\n        if <(🎥 cam y) < [0]> then\n            set [🎥 cam y v] to [0]\n        end\n        position\n        switch costume to (🔒 costume)\n        change [🔒 y v] by (-9)\n        position\n        if <<<touching (map hitbox v)?> or <touching (pulley hitbox v)?>> and <<([floor v] of ([abs v] of (🔒 xv) ) ) > [0]> and <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>>>> then\n            change [🔒 costume # v] by (1)\n            if <(🔒 costume #) > [9]> then\n                set [🔒 costume # v] to [1]\n            end\n            switch costume to (join [walk] (🔒 costume #))\n        else\n            switch costume to (idle v)\n            set [🔒 costume # v] to [0]\n        end\n        change [🔒 y v] by (9)\n        position\n        point in direction ((([abs v] of (🔒 xv) ) / (🔒 xv)) * (90))\n        if <(player can move?) = [true]> then\n            if <<mouse down?> and <<(🔒 reload) = [0]> and <(player bullets) > [0]>>> then\n                change [🔒 reload v] by (1)\n                change [player bullets v] by (-1)\n                create clone of (player bullets v)\n                start sound [M4 Assault Rifle Firing Reloading Pack Sound Effects2 v]\n                if <((mouse x) + (🎥 cam x)) > (🔒 x)> then\n                    change [🔒 xv v] by (-0.3)\n                else\n                    change [🔒 xv v] by (0.3)\n                end\n                broadcast (player fire v)\n            end\n            if <<(🔒 reload) = [0]> or <(🔒 reload) > [2]>> then\n                set [🔒 reload v] to [0]\n            else\n                change [🔒 reload v] by (1)\n            end\n        end\n        if <<(🔒 y) < [-300]> or <touching (danger v)?>> then\n            set [🔒 hp v] to [0]\n        end\n    end\n    if <(direction) = [90]> then\n        switch costume to (die right v)\n        set [🔒 tv v] to [-5]\n    else\n        switch costume to (die left v)\n        set [🔒 tv v] to [5]\n    end\n    set rotation style [all around v]\n    point in direction (90)\n    add (🔒 x) to [blood particle x v]\n    add (🔒 y) to [blood particle y v]\n    add [0] to [blood particle direction v]\n    if <(costume [name v]) = [die right]> then\n        repeat until <(direction) < [0]>\n            turn right (🔒 tv) degrees\n            change [🔒 tv v] by (-1)\n            physics\n        end\n    else\n        repeat until <<(direction) > [-180]> and <(direction) < [90]>>\n            turn right (🔒 tv) degrees\n            change [🔒 tv v] by (1)\n            physics\n        end\n    end\nend\n\nwhen I receive [game v]\nwait (0.5) seconds\nset [player can move? v] to [true]\nwait until <(🔒 x) > [1250]>\nset [player can move? v] to [false]\nset [🔒 xv v] to [0]\nset [🔒 yv v] to [0]\nrepeat until <<([abs v] of ((🎥 cam x) - (1430)) ) < [6]> and <([abs v] of ((🎥 cam y) - (70)) ) < [6]>>\n    change [🎥 cam x v] by (round (((1430) - (🎥 cam x)) / (10)))\n    change [🎥 cam y v] by (round (((70) - (🎥 cam y)) / (10)))\nend\nbroadcast (scene: break bridge v)\n\nwhen I receive [end scene: break bridge v]\nset [player can move? v] to [true]\nwait until <(🔒 x) > [2230]>\nset [player can move? v] to [false]\nset [🔒 xv v] to [0]\nset [🔒 yv v] to [0]\nrepeat until <<([abs v] of ((🎥 cam x) - (2400)) ) < [6]> and <([abs v] of ((🎥 cam y) - (70)) ) < [6]>>\n    change [🎥 cam x v] by (round (((2400) - (🎥 cam x)) / (10)))\n    change [🎥 cam y v] by (round (((70) - (🎥 cam y)) / (10)))\nend\nbroadcast (scene: zombies v)\n\nwhen I receive [end scene: zombies v]\nset [player can move? v] to [true]\n\nwhen I receive [start v]\nforever\n    set volume to (🔊 volume) %\nend\n\nwhen I receive [game v]\nset [🔒 checkpoint x v] to [0]\nset [🔒 checkpoint y v] to [0]\nwait (0.5) seconds\nwait until <(🔒 x) > [2710]>\nset [🔒 checkpoint x v] to [2710]\nset [🔒 checkpoint y v] to [50]\nbroadcast (save v)\n\nwhen I receive [damage player v]\nchange [🔒 hp v] by (-1)\n\nwhen I receive [scene: pulley v]\nset [player can move? v] to [false]\nset [🔒 xv v] to [0]\nset [🔒 yv v] to [0]\nwait (0.2) seconds\nrepeat (20)\n    change [🎥 cam x v] by (round (((3450) - (🎥 cam x)) / (10)))\n    change [🎥 cam y v] by (round (((-65) - (🎥 cam y)) / (10)))\nend\nwait (1) seconds\nset [player can move? v] to [true]\n\n@Stars\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nerase all\nset pen color to (#ffffff)\nset pen size to (5)\nrender\n\ndefine render\nrepeat (40)\n    go to x: (pick random (-240) to (240)) y: (pick random (-180) to (180))\n    pen down\n    pen up\nend\n\n@Bridge\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\nswitch costume to (handle1 v)\ncreate clone of (_myself_ v)\nswitch costume to (handle2 v)\ncreate clone of (_myself_ v)\nswitch costume to (bridge1 v)\ncreate clone of (_myself_ v)\nswitch costume to (bridge2 v)\ncreate clone of (_myself_ v)\nswitch costume to (dummy v)\n\nwhen I start as a clone\npoint in direction (90)\nif <(costume [name v]) = [handle1]> then\n    set [🔒 x v] to [1312]\n    set [🔒 y v] to [78]\n    set size to (100) %\n    forever\n        position\n    end\nend\nif <(costume [name v]) = [handle2]> then\n    set [🔒 x v] to [1596]\n    set [🔒 y v] to [78]\n    set size to (100) %\n    forever\n        position\n    end\nend\nif <(costume [name v]) = [bridge1]> then\n    set [🔒 x v] to [1303]\n    set [🔒 y v] to [10]\n    set size to (100) %\n    forever\n        position\n    end\nend\nif <(costume [name v]) = [bridge2]> then\n    set [🔒 x v] to [1604]\n    set [🔒 y v] to [10]\n    set size to (100) %\n    forever\n        position\n    end\nend\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (fill v)\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nswitch costume to (🔒 costume)\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [scene: break bridge v]\nwait (1.5) seconds\nset volume to (🔊 volume) %\nif <(costume [name v]) = [bridge1]> then\n    start sound [Sound Effect- Crash v]\n    set [🔒 tv v] to [0]\n    repeat until <(direction) > [160]>\n        change [🔒 tv v] by (1)\n        turn right (🔒 tv) degrees\n        change [🔒 x v] by (((1314) - (🔒 x)) / (3))\n        position\n    end\n    point in direction (160)\nend\nif <(costume [name v]) = [bridge2]> then\n    wait (0.1) seconds\n    start sound [Sound Effect- Crash v]\n    set [🔒 tv v] to [0]\n    repeat until <(direction) < [0]>\n        change [🔒 tv v] by (-1)\n        turn right (🔒 tv) degrees\n        change [🔒 x v] by (((1580) - (🔒 x)) / (3))\n        position\n    end\n    point in direction (0)\nend\nif <(costume [name v]) = [handle1]> then\n    wait (0.2) seconds\n    start sound [Sound Effect- Crash v]\n    set [🔒 tv v] to [0]\n    repeat until <(direction) > [165]>\n        change [🔒 tv v] by (1)\n        turn right (🔒 tv) degrees\n        position\n    end\n    repeat (10)\n        turn right (((170) - (direction)) / (3)) degrees\n    end\nend\nif <(costume [name v]) = [handle2]> then\n    wait (0.1) seconds\n    start sound [Sound Effect- Crash v]\n    set [🔒 tv v] to [0]\n    repeat until <(direction) < [15]>\n        change [🔒 tv v] by (-1)\n        turn right (🔒 tv) degrees\n        position\n    end\n    point in direction (15)\nend\n\n@Zombies\n\nwhen flag clicked\nhide\n\nwhen I receive [scene: break bridge v]\nset [🔒 clone id v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(🔒 clone id) = [1]> then\n    set [🔒 x v] to [1690]\n    set [🔒 y v] to [45]\n    set [🔒 hp v] to [5]\n    set rotation style [left-right v]\n    point in direction (-90)\n    set size to (60) %\n    set [🔒 costume # v] to [1]\n    repeat (25)\n        change [🔒 x v] by (-3)\n        position\n        change [🔒 costume # v] by (1)\n        if <(🔒 costume #) > [9]> then\n            set [🔒 costume # v] to [1]\n        end\n        switch costume to (join [walk] (🔒 costume #))\n    end\n    set [🔒 y v] to [55]\n    repeat (25)\n        change [🔒 x v] by (-3)\n        position\n        change [🔒 costume # v] by (1)\n        if <(🔒 costume #) > [9]> then\n            set [🔒 costume # v] to [1]\n        end\n        switch costume to (join [walk] (🔒 costume #))\n    end\n    point in direction (90)\n    set rotation style [all around v]\n    switch costume to (fall v)\n    set [🔒 yv v] to [0]\n    repeat until <(🔒 y) < [-300]>\n        change [🔒 yv v] by (-1)\n        change [🔒 x v] by (-3)\n        change [🔒 y v] by (🔒 yv)\n        turn left (3) degrees\n        position\n    end\n    broadcast (end scene: break bridge v)\n    delete this clone\nend\nif <(🔒 clone id) = [2]> then\n    set [🔒 x v] to [2700]\n    set [🔒 y v] to [46]\n    set rotation style [left-right v]\n    point in direction (-90)\n    set size to (60) %\n    set [brightness v] effect to (pick random (0) to (-10))\n    set [🔒 costume # v] to [1]\n    set [🔒 xv v] to [0]\n    set [🔒 yv v] to [0]\n    set [🔒 hp v] to [5]\n    repeat until <(🔒 hp) < [1]>\n        switch costume to (hitbox v)\n        change [🔒 xv v] by (<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>)\n        point in direction ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (90))\n        physics\n        if <touching (player v)?> then\n            add ([🔒 x v] of [player v]) to [blood particle x v]\n            add (([🔒 y v] of [player v]) - (10)) to [blood particle y v]\n            add ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (-90)) to [blood particle direction v]\n            set [🔒 xv v] to (((0) - (🔒 xv)) * (5))\n            broadcast (damage player v)\n        end\n        change [🔒 costume # v] by (0.5)\n        if <(🔒 costume #) > [9]> then\n            set [🔒 costume # v] to [1]\n        end\n        switch costume to (join [walk] ([floor v] of (🔒 costume #) ))\n        if <<touching (player bullets v)?> and <(🔒 hp) > [0]>> then\n            change [🔒 hp v] by (-1)\n            if <(direction) = [90]> then\n                switch costume to (hit right v)\n                set [🔒 xv v] to [-5]\n                point in direction (60)\n            else\n                switch costume to (hit left v)\n                set [🔒 xv v] to [5]\n                point in direction (120)\n            end\n            set rotation style [all around v]\n            repeat until <([abs v] of ((90) - (direction)) ) < [3]>\n                turn right (((90) - (direction)) / (3)) degrees\n                physics\n            end\n            point in direction (90)\n        end\n        set rotation style [left-right v]\n    end\n    point in direction ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (90))\n    if <(direction) = [90]> then\n        switch costume to (hit right v)\n        set [🔒 xv v] to [-5]\n        set [🔒 tv v] to [-5]\n    else\n        switch costume to (hit left v)\n        set [🔒 xv v] to [5]\n        set [🔒 tv v] to [5]\n    end\n    point in direction (90)\n    set rotation style [all around v]\n    if <(costume [name v]) = [hit right]> then\n        repeat until <(direction) < [0]>\n            change [🔒 tv v] by (-1)\n            turn right (🔒 tv) degrees\n            physics\n        end\n        switch costume to (die right v)\n        point in direction (0)\n    else\n        repeat until <<(direction) > [-180]> and <(direction) < [90]>>\n            change [🔒 tv v] by (1)\n            turn right (🔒 tv) degrees\n            physics\n        end\n        switch costume to (die left v)\n        point in direction (180)\n    end\n    repeat (30)\n        physics\n    end\n    repeat (10)\n        position\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\nif <(🔒 clone id) = [3]> then\n    set [🔒 x v] to [4100]\n    set [🔒 y v] to [-67]\n    set rotation style [left-right v]\n    point in direction (-90)\n    set size to (60) %\n    set [brightness v] effect to (pick random (0) to (-10))\n    set [🔒 costume # v] to [1]\n    set [🔒 xv v] to [0]\n    set [🔒 yv v] to [0]\n    set [🔒 hp v] to [5]\n    repeat until <(🔒 hp) < [1]>\n        switch costume to (hitbox v)\n        change [🔒 xv v] by (<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>)\n        point in direction ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (90))\n        physics\n        if <touching (player v)?> then\n            add ([🔒 x v] of [player v]) to [blood particle x v]\n            add (([🔒 y v] of [player v]) - (10)) to [blood particle y v]\n            add ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (-90)) to [blood particle direction v]\n            set [🔒 xv v] to (((0) - (🔒 xv)) * (5))\n            broadcast (damage player v)\n        end\n        change [🔒 costume # v] by (0.5)\n        if <(🔒 costume #) > [9]> then\n            set [🔒 costume # v] to [1]\n        end\n        switch costume to (join [walk] ([floor v] of (🔒 costume #) ))\n        if <<touching (player bullets v)?> and <(🔒 hp) > [0]>> then\n            change [🔒 hp v] by (-1)\n            if <(direction) = [90]> then\n                switch costume to (hit right v)\n                set [🔒 xv v] to [-5]\n                point in direction (60)\n            else\n                switch costume to (hit left v)\n                set [🔒 xv v] to [5]\n                point in direction (120)\n            end\n            set rotation style [all around v]\n            repeat until <([abs v] of ((90) - (direction)) ) < [3]>\n                turn right (((90) - (direction)) / (3)) degrees\n                physics\n            end\n            point in direction (90)\n        end\n        set rotation style [left-right v]\n    end\n    point in direction ((<(🔒 x) < ([🔒 x v] of [player v])> - <(🔒 x) > ([🔒 x v] of [player v])>) * (90))\n    if <(direction) = [90]> then\n        switch costume to (hit right v)\n        set [🔒 xv v] to [-5]\n        set [🔒 tv v] to [-5]\n    else\n        switch costume to (hit left v)\n        set [🔒 xv v] to [5]\n        set [🔒 tv v] to [5]\n    end\n    point in direction (90)\n    set rotation style [all around v]\n    if <(costume [name v]) = [hit right]> then\n        repeat until <(direction) < [0]>\n            change [🔒 tv v] by (-1)\n            turn right (🔒 tv) degrees\n            physics\n        end\n        switch costume to (die right v)\n        point in direction (0)\n    else\n        repeat until <<(direction) > [-180]> and <(direction) < [90]>>\n            change [🔒 tv v] by (1)\n            turn right (🔒 tv) degrees\n            physics\n        end\n        switch costume to (die left v)\n        point in direction (180)\n    end\n    repeat (30)\n        physics\n    end\n    repeat (10)\n        position\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nset volume to (🔊 volume) %\nrepeat until <(🔒 hp) < [1]>\n    play sound (pick random (1) to (3)) until done\n    wait (pick random (0.5) to (1)) seconds\nend\n\nwhen I receive [scene: zombies v]\nset [🔒 clone id v] to [2]\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (2) seconds\nbroadcast (end scene: zombies v)\nwait until <([🔒 x v] of [player v]) > [3610]>\nset [🔒 clone id v] to [3]\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\nwait (1) seconds\ncreate clone of (_myself_ v)\n\ndefine physics\nset [🔒 xv v] to ((🔒 xv) * (0.6))\nchange [🔒 x v] by (🔒 xv)\nposition\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    set [🔒 slope v] to [1]\n    repeat until <<(🔒 slope) > [5]> or <not <touching (map hitbox v)?>>>\n        change [🔒 slope v] by (1)\n        change [🔒 y v] by (1)\n        position\n    end\n    if <(🔒 slope) > [5]> then\n        change [🔒 y v] by (-5)\n        repeat until <not <touching (map hitbox v)?>>\n            change [🔒 x v] by ((([abs v] of (🔒 xv) ) / (🔒 xv)) * (-2.5))\n            position\n        end\n        set [🔒 xv v] to [0]\n    end\n    if <not <touching (map hitbox v)?>> then\n        change [🔒 yv v] by (-1)\n    end\n    change [🔒 y v] by (🔒 yv)\n    position\n    if <touching (map hitbox v)?> then\n        repeat until <not <touching (map hitbox v)?>>\n            change [🔒 y v] by (1)\n            position\n        end\n        set [🔒 yv v] to [0]\n    end\nelse\n    if <(🔒 clone id) = [2]> then\n        set [🔒 y v] to [46]\n    end\n    if <(🔒 clone id) = [3]> then\n        set [🔒 y v] to [-67]\n    end\n    set [🔒 yv v] to [0]\n    position\nend\n\n@Tip\n\nwhen flag clicked\nhide\n\nwhen I receive [end scene: break bridge v]\nset [🔒 x v] to [1300]\nset [🔒 y v] to [140]\nset size to (100) %\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    position\nend\nforever\n    position\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\n@Danger\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\ngenerate\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (100)\nforever\n    position\nend\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (fill v)\ngo to x: ((🔒 x) - (🎥 cam x)) y: ((🔒 y) - (🎥 cam y))\nswitch costume to (🔒 costume)\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\ndefine split (input)\nset [🔒 i v] to [0]\nset [🔒 x v] to []\nrepeat until <(letter (🔒 i) of (input)) = [.]>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = [.]>> then\n        set [🔒 x v] to (join (🔒 x) (letter (🔒 i) of (input)))\n    end\nend\nset [🔒 y v] to []\nrepeat until <(letter (🔒 i) of (input)) = []>\n    change [🔒 i v] by (1)\n    if <not <(letter (🔒 i) of (input)) = []>> then\n        set [🔒 y v] to (join (🔒 y) (letter (🔒 i) of (input)))\n    end\nend\n\ndefine generate\nswitch costume to (join [0] [])\nrepeat (costume [number v])\n    next costume\n    if <not <<(costume [name v]) = [dummy]> or <(costume [name v]) = [fill]>>> then\n        split (costume [name v])\n        set [🔒 x v] to ((🔒 x) * (480))\n        set [🔒 y v] to ((🔒 y) * (360))\n        create clone of (_myself_ v)\n    end\nend\n\n@Player Bullets\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\npoint in direction ([direction v] of [player gun v])\nif <(direction) > [0]> then\n    set [🔒 x v] to (([🔒 x v] of [player gun v]) + (([sin v] of ((direction) + (90)) ) * (10)))\n    set [🔒 y v] to (([🔒 y v] of [player gun v]) + (([cos v] of ((direction) + (90)) ) * (10)))\nelse\n    set [🔒 x v] to (([🔒 x v] of [player gun v]) + (([sin v] of ((direction) + (-90)) ) * (10)))\n    set [🔒 y v] to (([🔒 y v] of [player gun v]) + (([cos v] of ((direction) + (-90)) ) * (10)))\nend\nchange [🔒 x v] by (([sin v] of (direction) ) * (30))\nchange [🔒 y v] by (([cos v] of (direction) ) * (30))\nturn right (pick random (-5) to (5)) degrees\nswitch costume to (dummy v)\nset size to (20) %\nswitch costume to (bullet v)\nset [🔒 travel v] to [0]\nrepeat until <<touching (map hitbox v)?> or <<touching (zombies v)?> or <<touching (pulley v)?> or <(🔒 travel) > [8]>>>>\n    change [🔒 travel v] by (1)\n    change [🔒 x v] by (([sin v] of (direction) ) * (30))\n    change [🔒 y v] by (([cos v] of (direction) ) * (30))\n    position\nend\nif <touching (zombies v)?> then\n    add (🔒 x) to [blood particle x v]\n    add (🔒 y) to [blood particle y v]\n    add ((direction) + (180)) to [blood particle direction v]\nend\nif <(🔒 travel) > [8]> then\n    repeat (10)\n        change [🔒 x v] by (([sin v] of (direction) ) * (5))\n        change [🔒 y v] by (([cos v] of (direction) ) * (5))\n        position\n        change [ghost v] effect by (10)\n        change size by (1)\n    end\nelse\n    switch costume to (bullet die v)\n    set [🔒 xv v] to (([sin v] of (direction) ) * (-20))\n    set [🔒 yv v] to (([cos v] of (direction) ) * (-20))\n    repeat (10)\n        set [🔒 xv v] to ((🔒 xv) * (0.9))\n        change [🔒 yv v] by (-1)\n        change [🔒 x v] by (🔒 xv)\n        change [🔒 y v] by (🔒 yv)\n        ground\n        change [ghost v] effect by (10)\n    end\nend\ndelete this clone\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) / (4)) %\nswitch costume to (🔒 costume)\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\ndefine ground\nposition\nif <touching (map hitbox v)?> then\n    repeat until <not <touching (map hitbox v)?>>\n        change [🔒 y v] by (1)\n        position\n    end\n    point in direction ((([abs v] of (direction) ) / (direction)) * (90))\n    set [🔒 yv v] to [0]\nend\n\n@Blood Particles\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\ndelete all of [blood particle x v]\ndelete all of [blood particle y v]\ndelete all of [blood particle direction v]\nforever\n    if <(length of [blood particle x v]) > [0]> then\n        set [🔒 x v] to (item (1) of [blood particle x v])\n        set [🔒 y v] to (item (1) of [blood particle y v])\n        point in direction (item (1) of [blood particle direction v])\n        delete (1) of [blood particle x v]\n        delete (1) of [blood particle y v]\n        delete (1) of [blood particle direction v]\n        clone [5]\n    end\nend\n\ndefine clone (clones)\nrepeat (clones)\n    create clone of (_myself_ v)\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nset size to (pick random (10) to (20)) %\nturn right (pick random (-20) to (20)) degrees\nset [🔒vel v] to (pick random (4) to (6))\nrepeat (10)\n    change [🔒 x v] by (([sin v] of (direction) ) * (🔒vel))\n    change [🔒 y v] by (([cos v] of (direction) ) * (🔒vel))\n    position\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Score\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (2) seconds\nswitch costume to (icon v)\ncreate clone of (_myself_ v)\nswitch costume to (0 v)\nset [🔒 clone id v] to [0]\nrepeat (3)\n    change [🔒 clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [brightness v] effect to (100)\nif <(costume [name v]) = [icon]> then\n    go to x: (-215) y: (152)\n    switch costume to (dummy v)\n    set size to (40) %\n    switch costume to (icon v)\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        go to [front v] layer\n        change [ghost v] effect by (-10)\n    end\n    forever\n        go to [front v] layer\n    end\nelse\n    go to x: ((-215) + ((🔒 clone id) * (20))) y: (150)\n    switch costume to (dummy v)\n    set size to (40) %\n    if <((🔒 clone id) - (1)) < (length of (player bullets))> then\n        switch costume to (letter (🔒 clone id) of (player bullets))\n        show\n    else\n        hide\n    end\n    set [ghost v] effect to (100)\n    repeat (10)\n        go to [front v] layer\n        change [ghost v] effect by (-10)\n    end\n    forever\n        if <((🔒 clone id) - (1)) < (length of (player bullets))> then\n            switch costume to (letter (🔒 clone id) of (player bullets))\n            show\n        else\n            hide\n        end\n        go to [front v] layer\n    end\nend\n\nwhen I receive [start v]\ndelete this clone\n\n@Ammo\n\nwhen flag clicked\nhide\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [game v]\nwait (0.5) seconds\nset [🔒 x v] to [2698]\nset [🔒 y v] to [15]\ncreate clone of (_myself_ v)\nset [🔒 x v] to [3642]\nset [🔒 y v] to [-100]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset size to (50) %\nclear graphic effects\nposition\nrepeat until <touching (player v)?>\n    position\nend\nchange [player bullets v] by (30)\nrepeat (10)\n    change [ghost v] effect by (10)\n    position\nend\ndelete this clone\n\n@Save\n\nwhen flag clicked\nhide\n\nwhen I receive [save v]\ngo to x: (0) y: (0)\nset size to (100) %\nset [brightness v] effect to (100)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (3) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\n\n@Player Hp Indicator\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nwait (0.5) seconds\ngo to x: (0) y: (0)\nset size to (100) %\nshow\nforever\n    go to [front v] layer\n    change [🔒 effect v] by (((([🔒 hp v] of [player v]) + (80)) - (🔒 effect)) / (3))\n    set [ghost v] effect to (🔒 effect)\nend\n\n@Pulley\n\nwhen flag clicked\nhide\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (🔒 costume)\ngo to x: (round ((🔒 x) - (🎥 cam x))) y: (round ((🔒 y) - (🎥 cam y)))\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [game v]\nwait (0.5) seconds\nclear graphic effects\nswitch costume to (rock1 v)\ncreate clone of (_myself_ v)\nswitch costume to (wood v)\ncreate clone of (_myself_ v)\nswitch costume to (crosshair v)\ncreate clone of (_myself_ v)\nswitch costume to (lift1 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [name v]) = [rock1]> then\n    set [🔒 x v] to [3420]\n    set [🔒 y v] to [370]\n    point in direction (90)\n    set size to (100) %\n    forever\n        position\n    end\nend\nif <(costume [name v]) = [wood]> then\n    set [🔒 x v] to [3372]\n    set [🔒 y v] to [366]\n    point in direction (55)\n    set size to (100) %\n    set [🔒 hp v] to [15]\n    repeat until <(🔒 hp) < [1]>\n        position\n        if <touching (player bullets v)?> then\n            change [🔒 hp v] by (-1)\n            turn right (pick random (-15) to (15)) degrees\n        end\n        turn right (((55) - (direction)) / (3)) degrees\n    end\n    set volume to (🔊 volume) %\n    start sound [Sound Effect- Crash v]\n    repeat (10)\n        change [ghost v] effect by (10)\n        position\n        turn right (((55) - (direction)) / (3)) degrees\n    end\n    broadcast (scene: pulley v)\n    delete this clone\nend\nif <(costume [name v]) = [crosshair]> then\n    set [🔒 x v] to [3400]\n    set [🔒 y v] to [330]\n    point in direction (-135)\n    set size to (70) %\n    forever\n        position\n    end\nend\nif <(costume [name v]) = [lift1]> then\n    set [🔒 x v] to [3459]\n    set [🔒 y v] to [145]\n    point in direction (90)\n    set size to (100) %\n    forever\n        position\n    end\nend\n\nwhen I receive [scene: pulley v]\nif <(costume [name v]) = [crosshair]> then\n    repeat (10)\n        change [ghost v] effect by (10)\n        position\n    end\n    delete this clone\nend\nif <(costume [name v]) = [rock1]> then\n    repeat (12)\n        change [🔒 y v] by (5)\n        position\n        if <(🔒 y) > [380]> then\n            switch costume to (rock2 v)\n        end\n        if <(🔒 y) > [390]> then\n            switch costume to (rock3 v)\n        end\n    end\nend\nif <(costume [name v]) = [lift1]> then\n    repeat (5)\n        change [🔒 y v] by (-5)\n        position\n    end\n    switch costume to (lift2 v)\n    repeat (16)\n        change [🔒 y v] by (-5)\n        position\n    end\nend\n\n@Pulley Hitbox\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nset [🔒 x v] to [3360]\nset [🔒 y v] to [0]\nset size to (100) %\nset [ghost v] effect to (100)\nswitch costume to (before v)\nforever\n    position\nend\n\ndefine position\nset [🔒 costume v] to (costume [name v])\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (fill v)\ngo to x: ((🔒 x) - (🎥 cam x)) y: ((🔒 y) - (🎥 cam y))\nswitch costume to (🔒 costume)\nset size to ((size) / (4)) %\nif <<(round (x position)) = (round ((🔒 x) - (🎥 cam x)))> and <(round (y position)) = (round ((🔒 y) - (🎥 cam y)))>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [scene: pulley v]\nswitch costume to (after v)\n\n@Thumb\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to x: (0) y: (0)\nswitch costume to (dummy v)\nset size to (100) %\nswitch costume to (thumb v)\ngo to [front v] layer\nshow\n\n
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀WARNING\n⠀⠀⠀⠀⠀⠀⠀⠀Mild cartoon violence and blood\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Rated 10+\n⠀⠀(It's not actually that violent I just don't want to get ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀reported)\n\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀INFO\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Scrolling platformer\n⠀⠀This game is unfinished because I lost motivation\n\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀INSTRUCTIONS\n⠀⠀⠀WASD / arrow keys to move | click to shoot\n\n⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀CREDITS\n⠀⠀⠀⠀⠀⠀⠀Some inspiration from Tomb Raider\n⠀⠀⠀⠀⠀Zombie inspiration from ZombsRoyale.io\n⠀⠀⠀⠀⠀⠀Zombie sound effects from Minecraft\n\n⠀⠀⠀⠀#games #scrolling #platformer #platformers