❖ Spirit Run! ❖  ||  Scrolling Platformer Game
@Stage\n\nwhen flag clicked\nset [mute v] to [0]\nforever\n    if <(round ((mute) / (2))) = ((mute) / (2))> then\n        play sound [Jumper v] until done\n    end\n    set volume to (30) %\nend\n\nwhen [m v] key pressed\nif <(round ((mute) / (2))) = ((mute) / (2))> then\n    stop all sounds\nend\nchange [mute v] by (1)\nwait until <not <key (m v) pressed?>>\n\n@Looks\n\nwhen flag clicked\nwait (0.1) seconds\nswitch backdrop to (poopy2 v)\nswitch costume to (costume1 v)\nhide\nforever\n    if <(Game) = [1]> then\n        if <<mouse down?> and <(Mouse?) = [1]>> then\n            switch costume to (costume1 v)\n            go to (drawer-thing v)\n            if <(Graphite) = [100]> then\n                hide\n            else\n                show\n            end\n        else\n            if <<key (space v) pressed?> and <(Mouse?) = [1]>> then\n                set volume to (100) %\n                set [graphite v] to [100]\n                show\n                switch costume to (costume2 v)\n                go to x: (-200) y: (150)\n                erase all\n                set pen color to (#5c5d5f)\n                repeat (7)\n                    glide (0.3) secs to x: ((x position) * (-1)) y: ((y position) - (60))\n                end\n                hide\n                set volume to (0) %\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [game v] to [0]\nset [level v] to [1]\nset volume to (0) %\npoint in direction (75)\nforever\n    repeat (10)\n        turn right (3) degrees\n    end\n    repeat (10)\n        turn left (3) degrees\n    end\n    go to [front v] layer\nend\n\nwhen I receive [moosic v]\nforever\n    if <(round ((mute) / (2))) = ((mute) / (2))> then\n        play sound [Eraser  v] until done\n    end\nend\n\n@Drawer-Thing\n\nwhen flag clicked\nwait (0.1) seconds\nset [not move? v] to [0]\npen up\nerase all\nset [ghost v] effect to (100)\nset [graphite v] to [0]\nforever\n    if <(Game) = [1]> then\n        if <<mouse down?> and <(Mouse?) = [1]>> then\n            if <[100] > (Graphite)> then\n                set [not move? v] to [1]\n                go to (mouse-pointer v)\n                set pen size to (3)\n                set pen color to (#5c5d5f)\n                change [graphite v] by (1)\n                repeat until <<<not <mouse down?>> or <not <[100] > (Graphite)>>> or <(Mouse?) = [0]>>\n                    if <touching (character v)?> then\n                        pen up\n                        say [Hello!]\n                    else\n                        pen down\n                        say []\n                    end\n                    if <not <touching (mouse-pointer v)?>> then\n                        point towards (mouse-pointer v)\n                        move (5) steps\n                        change [graphite v] by (1)\n                    end\n                end\n                set [not move? v] to [0]\n            end\n        else\n            pen up\n        end\n    end\nend\n\n@Sharpie\n\ndefine None\nchange [sharpie v] by (1)\ngo to x: (item ((Sharpie) - (1)) of [sharpie list v]) y: (item (Sharpie) of [sharpie list v])\nif <[1] = (#)> then\n    set volume to (100) %\n    show\nend\nset pen size to (10)\nset pen color to (#000000)\nerase all\nrepeat until <(item ((Sharpie) + (1)) of [sharpie list v]) = [X]>\n    change [mouse? v] by (2)\n    go to [front v] layer\n    if <(item ((Sharpie) + (1)) of [sharpie list v]) = [up]> then\n        change [sharpie v] by (1)\n        pen up\n    else\n        if <(item ((Sharpie) + (1)) of [sharpie list v]) = [down]> then\n            change [sharpie v] by (1)\n            pen down\n        else\n            if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E]> then\n                change [sharpie v] by (1)\n                pen up\n                switch costume to (pink-eraser.svg v)\n                hide\n                set size to (80) %\n                stamp\n                set size to (100) %\n                switch costume to (costume1 v)\n                if <[1] = (#)> then\n                    show\n                end\n            else\n                if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E2]> then\n                    change [sharpie v] by (1)\n                    pen up\n                    switch costume to (pink-eraser.svg v)\n                    hide\n                    set size to (500) %\n                    stamp\n                    set size to (100) %\n                    switch costume to (costume1 v)\n                    if <[1] = (#)> then\n                        show\n                    end\n                else\n                    if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E3]> then\n                        change [sharpie v] by (1)\n                        if <[1] = (#)> then\n                            pen up\n                            switch costume to (pink-eraser.svg v)\n                            hide\n                            set size to (500) %\n                            create clone of (_myself_ v)\n                            set size to (100) %\n                            switch costume to (costume1 v)\n                            show\n                        end\n                    else\n                        if <(item ((Sharpie) + (1)) of [sharpie list v]) = [b]> then\n                            change [sharpie v] by (1)\n                            set pen size to (10)\n                            set pen color to (#000000)\n                        else\n                            if <(item ((Sharpie) + (1)) of [sharpie list v]) = [g]> then\n                                change [sharpie v] by (1)\n                                set pen size to (40)\n                                set pen color to (#d9ded8)\n                            else\n                                if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E4]> then\n                                    change [sharpie v] by (1)\n                                    if <[1] = (#)> then\n                                        pen up\n                                        switch costume to (pink-eraser.svg v)\n                                        hide\n                                        set size to (80) %\n                                        create clone of (_myself_ v)\n                                        set size to (100) %\n                                        switch costume to (costume1 v)\n                                        show\n                                    end\n                                else\n                                    if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E5]> then\n                                        change [sharpie v] by (1)\n                                        if <[1] = (#)> then\n                                            pen up\n                                            switch costume to (pink-eraser.svg v)\n                                            hide\n                                            repeat (8)\n                                                create clone of (_myself_ v)\n                                            end\n                                            switch costume to (costume1 v)\n                                            show\n                                        end\n                                    else\n                                        if <(item ((Sharpie) + (1)) of [sharpie list v]) = [E6]> then\n                                            change [sharpie v] by (1)\n                                            if <[1] = (#)> then\n                                                pen up\n                                                switch costume to (pink-eraser.svg v)\n                                                hide\n                                                set size to (101) %\n                                                repeat (10)\n                                                    create clone of (_myself_ v)\n                                                end\n                                                set size to (100) %\n                                                switch costume to (costume1 v)\n                                                show\n                                            end\n                                        else\n                                            change [sharpie v] by (2)\n                                            go to x: (item ((Sharpie) - (1)) of [sharpie list v]) y: (item (Sharpie) of [sharpie list v])\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nset volume to (0) %\nhide\n\nwhen [space v] key pressed\nif <<(Game) = [1]> and <(Mouse?) = [1]>> then\n    set [sharpie v] to (previous)\n    show? (0)\n    set [graphite v] to [0]\n    broadcast (game v)\nend\n\nrepeat (4)\n    delete (last) of [level v]\nend\n\nset [sharpie v] to [0]\n\nerase all\n\nadd [X] to [sharpie list v]\n\nset [sharpie v] to (length of [sharpie list v])\nrepeat until <(item (Sharpie) of [sharpie list v]) = [X]>\n    delete (Sharpie) of [sharpie list v]\n    change [sharpie v] by (-1)\nend\n\nwhen flag clicked\nwait (0.1) seconds\nset [sharpie v] to [-1]\nset [previous v] to [-1]\npoint in direction (75)\nset volume to (0) %\nhide\npen up\nswitch costume to (costume1 v)\nwait until <(Game) = [1]>\nbroadcast (delete v)\nbroadcast (moosic v)\nforever\n    repeat (10)\n        turn right (3) degrees\n    end\n    repeat (10)\n        turn left (3) degrees\n    end\nend\n\ndelete (last) of [sharpie list v]\n\nwait (0.5) seconds\nwait until <mouse down?>\ngo to (mouse-pointer v)\nadd (x position) to [sharpie list v]\nadd (y position) to [sharpie list v]\nadd [E] to [sharpie list v]\nset pen size to (10)\nset pen color to (#bb42c3)\npen down\npen up\n\nwait (0.5) seconds\nwait until <mouse down?>\ngo to (mouse-pointer v)\nadd [b] to [sharpie list v]\nadd (x position) to [sharpie list v]\nadd (y position) to [sharpie list v]\nset pen size to (10)\nset pen color to (#000000)\npen down\nadd [down] to [sharpie list v]\nrepeat until <not <mouse down?>>\n    go to (mouse-pointer v)\n    add (x position) to [sharpie list v]\n    add (y position) to [sharpie list v]\nend\npen up\nadd [up] to [sharpie list v]\n\nwhen I start as a clone\nif <(size) = [80]> then\n    go to x: (x position) y: (180)\n    forever\n        hide\n        wait (pick random (0) to (2.5)) seconds\n        show\n        glide (pick random (3) to (2.5)) secs to x: (x position) y: (-180)\n        hide\n        go to x: (pick random (-160) to (225)) y: (180)\n    end\nelse\n    if <(size) = [100]> then\n        set size to (80) %\n        forever\n            hide\n            go to x: (x position) y: (180)\n            wait (pick random (0) to (2)) seconds\n            show\n            glide (pick random (2) to (2.5)) secs to x: (x position) y: (-180)\n        end\n    else\n        if <(size) = [101]> then\n            set size to (80) %\n            forever\n                hide\n                go to x: (-240) y: (pick random (-160) to (160))\n                wait (pick random (0) to (2)) seconds\n                show\n                glide (pick random (3) to (2.5)) secs to x: (240) y: (y position)\n            end\n        else\n            show\n            forever\n                turn left (4) degrees\n            end\n        end\n    end\nend\n\nwhen I receive [delete v]\nif <[1] = [1]> then\n    delete this clone\nend\nset size to (100) %\nset [graphite v] to [100]\nset [previous v] to (Sharpie)\nshow? (1)\nbroadcast (game v)\nset [graphite v] to [0]\n\nset [game v] to [0]\n\nwhen I receive [moosic v]\nforever\n    if <(round ((mute) / (2))) = ((mute) / (2))> then\n        play sound [Sharpie v] until done\n    end\nend\n\n@Bar\n\nwhen flag clicked\nwait (0.1) seconds\nhide\nwait until <(Game) = [1]>\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nforever\n    if <(draw) = [1]> then\n        set x to ((Graphite) - (220))\n        if <<not <(x position) = (Change?)>> and <<not <(Graphite) = [0]>> and <not <(Graphite) = [100]>>>> then\n            stamp\n        end\n        set [change? v] to (x position)\n    end\nend\n\nwhen [space v] key pressed\nif <(Game) = [1]> then\n    create clone of (_myself_ v)\nend\n\nwhen I receive [game v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [draw v] to [0]\ngo to x: (-220) y: (150)\nswitch costume to (costume1 v)\nrepeat (21)\n    stamp\n    change x by (5)\nend\nset [draw v] to [1]\ndelete this clone\n\n@Page\n\nwhen flag clicked\nwait (0.1) seconds\ngo to x: (0) y: (0)\nhide\nswitch costume to (poopy2 v)\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [mouse? v] to [1]\n    else\n        set [mouse? v] to [0]\n    end\nend\n\nwhen I start as a clone\nwait (0.1) seconds\nswitch costume to (poopy6 v)\ngo to [front v] layer\nshow\nif <(round ((mute) / (2))) = ((mute) / (2))> then\n    start sound [page v]\nend\nrepeat (5)\n    wait (0.01) seconds\n    switch costume to ((costume [number v]) - (1))\nend\nbroadcast (delete v)\nchange [level v] by (4)\ndelete this clone\n\n@End\n\nwhen flag clicked\nwait (0.1) seconds\nhide\nwait until <(Game) = [1]>\nbroadcast (next level v)\nshow\nset size to (40) %\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nnext costume\ngo to [front v] layer\nforever\n    if <(Game) = [1]> then\n        go to x: (item ((level) + (2)) of [level v]) y: (item ((level) + (3)) of [level v])\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<((y position) - (40)) < ([y position v] of [hitbox v])> and <touching (character v)?>> then\n        erase all\n        if <(level) = [65]> then\n            set [game v] to [0]\n            hide\n        else\n            create clone of (page v)\n            broadcast (hide v)\n        end\n    end\n    go to x: (item ((level) + (2)) of [level v]) y: (item ((level) + (3)) of [level v])\nend\n\nadd (x position) to [level v]\nadd (y position) to [level v]\n\n@Character\n\nwhen flag clicked\nwait (0.1) seconds\nhide\nset size to (25) %\n\nwhen I receive [game v]\ngo to (hitbox v)\nstop [other scripts in sprite v]\nshow\nforever\n    if <(Game) = [1 ]> then\n        show\n        go to [front v] layer\n        set [move x v] to (x position)\n        set [move y v] to (y position)\n        go to (hitbox v)\n        if <((move y) - (4)) < ([y position v] of [hitbox v])> then\n            if <(move x) = ([x position v] of [hitbox v])> then\n                switch costume to (stand v)\n            else\n                if <(costume [number v]) = [4]> then\n                    switch costume to (walk v)\n                else\n                    next costume\n                end\n            end\n        else\n            switch costume to (fall v)\n        end\n    else\n        hide\n    end\nend\n\nwhen [space v] key pressed\nif <<(Mouse?) = [1]> and <(Game) = [1]>> then\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [hide v]\nstop [other scripts in sprite v]\nhide\n\n@paperending\n\nwhen flag clicked\nhide\nwait (2) seconds\nwait until <(Game) = [0]>\nshow\nset size to (115) %\ngo to x: (0) y: (-25)\nswitch costume to (paperending-0 v)\nwait (1) seconds\nrepeat (12)\n    wait (0.05) seconds\n    next costume\nend\nswitch backdrop to (poopy3 v)\nwait (0.3) seconds\nhide\n\n@Hitbox\n\ndefine Touch Ground <>\nchange [falling? v] by (1)\nGet Touching <not <up?>>\nif <<(speed y) = [0]> and <(touch) = [1]>> then\n    set [in platforrm v] to [2]\nelse\n    if <(touch) = [0]> then\n        set [in platforrm v] to [1]\n    end\nend\nrepeat until <(touch) < (in platforrm)>\n    if <up?> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    set [speed y v] to [0]\n    Get Touching <not <up?>>\nend\n\ndefine Get Touching <>\nif <<touching color (#000000)?> or <touching color (#5c5d5f)?>> then\n    set [touch v] to [9]\nelse\n    set [touch v] to [0]\nend\n\ndefine None\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nGet Touching \nrepeat until <<(slope) = [8]> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    Get Touching \nend\nif <(slope) = [8]> then\n    change x by ((0) - (speed))\n    change y by ((0) - (slope))\n    if <(Full) > [11.1]> then\n        set [speed x v] to [0]\n    end\nend\nif <<(Title) > [0]> and <(Full) < [9.3]>> then\n    change [frame v] by (0.5)\nelse\n    if <(speed) < [0]> then\n        change [frame v] by ((speed) / (-8))\n    else\n        change [frame v] by ((speed) / (8))\n    end\nend\n\ndefine Reset Level\nset rotation style [left-right v]\ngo to x: (item (level) of [level v]) y: (item ((level) + (1)) of [level v])\nreset timer\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [falling? v] to [10]\nset [in platforrm v] to [1]\nset [frame v] to [0]\nset [wall jump v] to [0]\n\nwhen I receive [game v]\nset size to (25) %\nReset Level\nswitch costume to (hitbox v)\nset volume to (100) %\nforever\n    if <<<(Game) = [1]> and <(Mouse?) < [2]>> and <(not move?) = [0]>> then\n        if <<touching color (#a47179)?> or <<touching color (#b47791)?> or <touching color (#cb8da4)?>>> then\n            if <(round ((mute) / (2))) = ((mute) / (2))> then\n                start sound [toot v]\n            end\n            Reset Level\n        else\n            if <(speed y) < [4]> then\n                change [speed y v] by (-1)\n            else\n                change [speed y v] by (-2)\n            end\n            change y by (speed y)\n            switch costume to (hitbox v)\n            Touch Ground <(speed y) > [0]>\n            if <(y position) < [-189]> then\n                if <(round ((mute) / (2))) = ((mute) / (2))> then\n                    start sound [toot v]\n                end\n                Reset Level\n            end\n            if <<(Title) > [0]> and <(Full) < [9.2]>> then\n                if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                    Walk (-90) (-4)\n                else\n                    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                        Walk (90) (4)\n                    else\n                        set [frame v] to [0]\n                    end\n                end\n            else\n                if <(wall jump) > [0]> then\n                    change [wall jump v] by (-1)\n                else\n                    set [speed x v] to ((speed x) * (0.7))\n                    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                        change [speed x v] by (-1.5)\n                    end\n                    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                        change [speed x v] by (1.5)\n                    end\n                end\n                if <(speed x) < [-0.5]> then\n                    Walk (-90) (speed x)\n                else\n                    if <(speed x) > [0.5]> then\n                        Walk (90) (speed x)\n                    else\n                        set [frame v] to [0]\n                    end\n                end\n            end\n            set [jump key v] to [0]\n            if <key (down arrow v) pressed?> then\n                set [in platforrm v] to [2]\n            end\n            broadcast (tick v) and wait\n        end\n    end\nend\n\nwhen [space v] key pressed\nif <<(Mouse?) = [3]> and <(Game) = [1]>> then\n    stop [other scripts in sprite v]\n    set volume to (0) %\nend\n\nwhen I receive [hide v]\nstop [other scripts in sprite v]\nset volume to (0) %\n\nadd (x position) to [level v]\nadd (y position) to [level v]\n\nwhen flag clicked\nwait (1) seconds\nset [game v] to [1]\n\n
Hello! \n\nUse the arrow keys to move. \n\nThe light surrounding you will let you see. \n\n1000 loves and favs for part 2 :)