Breakfast Battle! || Version 1.1 A Platformer #all #games #trending


@Stage\n\n@Thumbnail\n\nwhen flag clicked\nreset timer\nif <(username) = [_G-L-I-T-C-H_]> then\n    set [ghost v] effect to (100)\n    wait (0.1) seconds\n    go to [front v] layer\nelse\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [25]> then\n        show variable [boss timer v]\n        hide variable [time v]\n        repeat until <(Level) = [26]>\n            wait (1) seconds\n            change [boss timer v] by (0)\n        end\n        show variable [time v]\n        hide variable [boss timer v]\n        set [time v] to ((Time) + (Boss timer))\n    end\n    if <(Level) = [26]> then\n        if <(Time) < (☁ World record!)> then\n            set [☁ world record! v] to (Time)\n            show variable [time v]\n            hide variable [boss timer v]\n        else\n            show variable [time v]\n            hide variable [boss timer v]\n            reset timer\n        end\n    else\n        show variable [time v]\n        hide variable [boss timer v]\n        set [time v] to (timer)\n    end\nend\n\n@player\n\ndefine Player Script\ngo to x: (-206) y: (-95)\ngo to [front v] layer\nshow\ngo [forward v] (1) layers\nset [level v] to [1]\nset [dead v] to [0]\nset size to (16) %\nforever\n    set [player x v] to (x position)\n    set [player y v] to (y position)\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead) = [0]>> then\n        switch costume to (4 v)\n        change [xv v] by (-0.8)\n    else\n        switch costume to (1 v)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        switch costume to (3 v)\n        change [xv v] by (.8)\n    else\n        switch costume to (1 v)\n    end\n    set [xv v] to ((Xv) * (.9))\n    change x by (Xv)\n    if <<touching (platforms v)?> or <touching (locked v)?>> then\n        change y by (2)\n        if <<touching (platforms v)?> or <touching (locked v)?>> then\n            change y by (2)\n            if <<touching (platforms v)?> or <touching (locked v)?>> then\n                change y by (2)\n                if <<touching (platforms v)?> or <touching (locked v)?>> then\n                    change y by (2)\n                    if <<touching (platforms v)?> or <touching (locked v)?>> then\n                        change y by (2)\n                        if <<touching (platforms v)?> or <touching (locked v)?>> then\n                            change x by ((Xv) * (-2))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [13]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.8)\n    change y by (Yv)\n    if <<touching (platforms v)?> or <touching (platforms v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (platforms v)?> or <touching (platforms v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n            set [yv v] to [11]\n        end\n    end\n    change y by (1)\n    if <<(y position) = [-178]> or <<touching (danger v)?> or <<touching (saws v)?> or <<touching (liquids  v)?> or <touching (boss v)?>>>>> then\n        if <(Safe?) = [yes]> then\n    end\n    if <(y position) < [-178]> then\n        broadcast (Restart v)\n    end\n    if <<touching (toasters v)?> or <touching (tramps2 v)?>> then\n        set [yv v] to [17]\n    end\n    if <<touching (platforms v)?> or <touching (platforms v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <[230] < (x position)> then\n        broadcast (Restart v)\n        change [level v] by (1)\n        Setup\n    end\nend\n\ndefine Setup\nclear graphic effects\npoint in direction (90)\ngo to x: (-220) y: (-16)\nswitch costume to (1 v)\nset [dead v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (16) %\nshow\n\nwhen I receive [restart v]\ngo to x: (-212) y: (-81)\nset [ghost v] effect to (0)\nset [dead v] to [1]\nwait (0.5) seconds\nset [dead v] to [0]\n\nwhen I receive [start v]\nPlayer Script\n\nwhen flag clicked\nbroadcast (Start v)\nhide\n\nwhen flag clicked\nforever\n    play sound [TheFatRat & Phaera - Sunlight v] until done\nend\n\n@Boss\n\nwhen flag clicked\npoint in direction (90)\nswitch costume to (costume1 v)\nset [safe? v] to [no]\nset [boss is dead? v] to [no]\nset [boss hp v] to [3]\nset [start boss v] to [0]\ngo to x: (0) y: (219)\nhide\nwait (1) seconds\nforever\n    if <(Level) = [25]> then\n        broadcast (Bossfight v)\n        wait until <(start boss) = [1]>\n        show\n        forever\n            change [yv2 v] by (-0.8)\n            change y by (Yv2)\n            set [xv2 v] to ((Xv2) * (.9))\n            change x by (Xv2)\n            if <<touching (platforms v)?> or <touching (platforms v)?>> then\n                change y by ((Yv2) * (-1))\n                set [yv2 v] to [0]\n            end\n            if <(Boss hp) = [0]> then\n                repeat (20)\n                    change [ghost v] effect by (5)\n                end\n                set [boss is dead? v] to [yes]\n                broadcast (Le boss is dead v)\n                hide\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [jump attack v]\nif <(x position) > [0]> then\n    repeat until <(x position) < [50]>\n        change [xv2 v] by (-0.8)\n    end\n    set [yv2 v] to [13]\n    wait (1) seconds\n    broadcast (wave from boss jump v)\nend\nif <(x position) < [0]> then\n    repeat until <(x position) > [-50]>\n        change [xv2 v] by (0.8)\n    end\n    set [yv2 v] to [13]\n    wait (1) seconds\n    broadcast (wave from boss jump v)\nend\n\nwhen I receive [follow player v]\nrepeat until <(stop) = [1]>\n    if <(dead) = [1]> then\n        change [xv2 v] by (0.7)\n    else\n        if <(player x) > (x position)> then\n            change [xv2 v] by (0.7)\n        end\n        if <(player x) < (x position)> then\n            change [xv2 v] by (-0.7)\n        end\n    end\nend\nset [next attack v] to [1]\n\nwhen I receive [follow player v]\nset [stop v] to [0]\nwait (pick random (3) to (5)) seconds\nset [stop v] to [1]\nwait (0.1) seconds\nset [stop v] to [0]\n\nwhen I receive [zoom attack v]\nset [safe? v] to [no]\nif <(player x) > (x position)> then\n    point in direction (90)\n    set y to (-52)\nend\nif <(player x) < (x position)> then\n    point in direction (-90)\n    set y to (-52)\nend\nswitch costume to (costume2 v)\nwait () seconds\nset y to (-52)\nrepeat until <touching (platforms v)?>\n    move (8) steps\nend\nset [safe? v] to [yes]\nswitch costume to (costume3 v)\npoint in direction (90)\ngo to x: (x position) y: (-52)\nif <(x position) < [0]> then\n    change [xv2 v] by (10)\nend\nif <(x position) > [0]> then\n    change [xv2 v] by (-10)\nend\nwait until <touching (player v)?>\nchange [boss hp v] by (-1)\nif <(player x) > (x position)> then\n    change [xv2 v] by (-10)\nend\nif <(player x) < (x position)> then\n    change [xv2 v] by (10)\nend\nwait (1) seconds\nset [safe? v] to [no]\nset [next attack v] to [1]\nswitch costume to (costume1 v)\n\nwhen I receive [bossfight v]\nwait until <(start boss) = [1]>\nrepeat until <(boss is dead?) = [yes]>\n    set [next attack v] to [0]\n    wait (1) seconds\n    set [boss attack v] to (pick random (1) to (3))\n    if <(boss attack) = [1]> then\n        broadcast (jump attack v)\n        wait until <(next attack) = [1]>\n    end\n    if <(boss attack) = [2]> then\n        broadcast (Follow player v)\n        wait until <(next attack) = [1]>\n    end\n    if <(boss attack) = [3]> then\n        broadcast (zoom attack v)\n        wait until <(next attack) = [1]>\n    end\nend\n\n@Toasters\n\nwhen I receive [start v]\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [start v]\nforever\n    if <touching (player v)?> then\n        switch costume to (costume1 v)\n        repeat (6)\n            next costume\n        end\n    end\n    if <(Level) = [1]> then\n        hide\n    end\n    if <(Level) = [2]> then\n        hide\n    end\n    if <(Level) = [3]> then\n        hide\n    end\n    if <(Level) = [4]> then\n        hide\n    end\n    if <(Level) = [5]> then\n        hide\n    end\n    if <(Level) = [6]> then\n        show\n        go to x: (-80) y: (-22)\n    end\n    if <(Level) = [7]> then\n        hide\n    end\n    if <(Level) = [8]> then\n        show\n        go to x: (-70) y: (-22)\n    end\n    if <(Level) = [9]> then\n        hide\n    end\n    if <(Level) = [10]> then\n        hide\n    end\n    if <(Level) = [11]> then\n        show\n        go to x: (-140) y: (-22)\n    end\n    if <(Level) = [12]> then\n        show\n        go to x: (-50) y: (-22)\n    end\n    if <(Level) = [13]> then\n        hide\n    end\n    if <(Level) = [14]> then\n        show\n        go to x: (230) y: (-22)\n    end\n    if <(Level) = [15]> then\n        show\n        go to x: (-110) y: (-17)\n    end\n    if <(Level) = [16]> then\n        hide\n    end\n    if <(Level) = [17]> then\n        hide\n    end\n    if <(Level) = [18]> then\n        hide\n    end\n    if <(Level) = [19]> then\n        hide\n    end\n    if <(Level) = [20]> then\n        show\n        go to x: (-10) y: (80)\n    end\n    if <(Level) = [21]> then\n        show\n        go to x: (-120) y: (-17)\n    end\n    if <(Level) = [22]> then\n        show\n        go to x: (50) y: (-17)\n    end\n    if <(Level) = [23]> then\n        hide\n    end\n    if <(Level) = [24]> then\n        hide\n    end\n    if <(Level) = [25]> then\n        hide\n    end\n    if <(Level) = [26]> then\n        show\n        go to x: (190) y: (-17)\n    end\nend\n\n@Saws\n\nwhen I receive [start v]\ngo to [back v] layer\nhide\nswitch costume to (1 v)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        show\n        go to x: (52) y: (-110)\n        set size to (85) %\n    else\n        if <(Level) = [14]> then\n            show\n            go to x: (-80) y: (-110)\n            set size to (85) %\n        else\n            if <(Level) = [19]> then\n                show\n                go to x: (52) y: (-110)\n                set size to (85) %\n            else\n                if <(Level) = [22]> then\n                    show\n                    go to x: (-40) y: (-110)\n                    set size to (85) %\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nforever\n    turn right (10) degrees\nend\n\n@platforms\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [bossfight v]\ncreate clone of (_myself_ v)\nwait (1) seconds\nchange [start boss v] by (1)\n\nif <(Level) = [25]> then\n\nwhen I start as a clone\nset [yv3 v] to [0]\ngo to x: (0) y: (274)\nswitch costume to (costume25 v)\nrepeat until <<(Yv3) = [0]> and <(y position) = [0]>>\n    change [yv3 v] by (-0.8)\n    change y by (Yv3)\n    if <<touching (platforms v)?> or <touching (platforms v)?>> then\n        change y by ((Yv3) * (-1))\n        set [yv3 v] to [0]\n    end\n    if <(boss is dead?) = [yes]> then\n        glide (1) secs to x: (0) y: (274)\n        delete this clone\n    end\nend\n\nwhen I receive [jump attack v]\nwait (1) seconds\nwait until <touching (boss v)?>\nbroadcast (wave from boss jump v)\n\n@Danger\n\nwhen I receive [start v]\ngo to [front v] layer\nshow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Boss hp bar\n\nwhen flag clicked\nhide\nset [boss timer v] to [0]\nforever\n    if <(boss is dead?) = [no]> then\n        if <(Level) = [25]> then\n            show\n            switch costume to ((Boss hp) + (1))\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [le boss is dead v]\nhide\n\n@liquids \n\nwhen flag clicked\nset [whoosh! v] to [0]\ngo [backward v] (3) layers\ngo to x: (0) y: (0)\nshow\nforever\n    show\n    if <not <(Level) = [25]>> then\n        show\n        switch costume to (Level)\n        set y to (([sin v] of ((timer) * (100)) ) * (5))\n    else\n        hide\n        set y to (-9)\n        wait until <(whoosh!) = [1]>\n        show\n        reset timer\n        repeat until <(y position) < [-9]>\n            switch costume to (Level)\n            set y to (([sin v] of ((timer) * (200)) ) * (10))\n        end\n        set [whoosh! v] to [0]\n        set [next attack v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    go to [back v] layer\nend\n\nwhen I receive [wave from boss jump v]\nset [whoosh! v] to [1]\n\nwhen flag clicked\nhide variable [boss timer v]\nwait until <(Level) = [25]>\nshow variable [boss timer v]\nrepeat until <not <(Level) = [25]>>\n    wait (1) seconds\n    change [boss timer v] by (1)\nend\nset [time v] to ((Time) + (Boss timer))\nhide variable [boss timer v]\n\n