Physic platformer ball maker v1.0
@Stage\n\nwhen flag clicked\nforever\n    play sound [music1 v] until done\nend\n\n@game\n\ndefine play (nambers) (homer)\nif <not <touching color (#000000)?>> then\n    change [y v] by (-1)\nend\nchange y by (y)\nif <touching color (#000000)?> then\n    repeat ([abs v] of ([ceiling v] of (y) ) )\n        change y by ((([abs v] of (y) ) / (y)) * (-1))\n    end\n    set [y v] to [1]\nend\nchange x by (x)\nif <touching color (#000000)?> then\n    set [render v] to [0]\n    repeat until <<(render) = [-8]> or <not <touching color (#000000)?>>>\n        change [physics v] by (-1)\n        change y by (1)\n    end\n    if <(render) = [-8]> then\n        change y by (render)\n        repeat ([abs v] of ([ceiling v] of (x) ) )\n            change x by ((([abs v] of (x) ) / (x)) * (-1))\n        end\n        set [x v] to [0]\n    end\nend\nturn right (physics) degrees\nset [physics v] to ((physics) * (homer))\nset [x v] to ((x) * (nambers))\nrender\n\ndefine render\nchange x by (10)\nif <not <touching color (#000000)?>> then\n    change [physics v] by (3)\n    change [x v] by (3)\nend\nchange x by (-20)\nif <not <touching color (#000000)?>> then\n    change [physics v] by (-3)\n    change [x v] by (-3)\nend\nchange x by (10)\nturn right (2) degrees\nif <not <touching color (#000000)?>> then\n    change [physics v] by (1)\nend\nturn left (4) degrees\nif <not <touching color (#000000)?>> then\n    change [physics v] by (-1)\nend\nturn right (2) degrees\nturn right (10) degrees\nif <not <touching color (#000000)?>> then\n    change [physics v] by (2)\nend\nturn left (20) degrees\nif <not <touching color (#000000)?>> then\n    change [physics v] by (-2)\nend\nturn right (10) degrees\n\nwhen flag clicked\nerase all\nhide\n\nwhen I start as a clone\nset pen size to (5)\nset pen color to (#000000)\ngo to x: (-60) y: (0)\npen down\ngo to x: (60) y: (0)\npen down\npen up\nwait (0.1) seconds\npoint in direction (90)\nswitch costume to (1 v)\nforever\n    if <(tool) = [pencil]> then\n        set pen size to (5)\n        set pen color to (#000000)\n        if <mouse down?> then\n            pen down\n        else\n            pen up\n        end\n    else\n        if <(tool) = [gum]> then\n            set pen size to (15)\n            set pen color to (#ffffff)\n            if <mouse down?> then\n                pen down\n            else\n                pen up\n            end\n        else\n            pen up\n        end\n    end\n    go to (mouse-pointer v)\n    if <(tool) = [flag]> then\n        hide\n    else\n        if <(tool) = [money]> then\n            hide\n        else\n            show\n        end\n    end\nend\n\ndefine costume\nif <key (1 v) pressed?> then\n    switch costume to (2 v)\nend\nif <key (2 v) pressed?> then\n    switch costume to (1 v)\nend\nif <key (3 v) pressed?> then\n    switch costume to (3 v)\nend\n\ndefine maker\nif <key (up arrow v) pressed?> then\n    change [y v] by (3)\nend\nif <key (down arrow v) pressed?> then\n    change [y v] by (-3)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (3)\nend\nif <key (left arrow v) pressed?> then\n    change [x v] by (-3)\nend\n\ndefine list\nadd (x position) to [x v]\nadd (y position) to [y v]\nset [time v] to ((timer) + (1))\n\ndefine init\nset [$ v] to [0]\nset [maker v] to [1]\nset [i v] to [0]\nset [physics v] to [0]\nset [x v] to [0]\ndelete all of [x v]\ndelete all of [y v]\n\nwhen I receive [play v]\nshow\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\ninit\nstart x [0] y [40]\nset [y v] to [0]\nforever\n    if <(maker) = [2]> then\n        play [.95] [.6]\n    end\n    costume\n    if <(maker) = [1]> then\n        start x [0] y [40]\n        maker\n    end\n    list\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [tool v] to []\n    end\n    die\nend\n\ndefine start x (x) y (y)\ngo to x: (x) y: (y)\n\ndefine die\nif <(y position) < [-175]> then\n    pen up\n    start x [0] y [40]\nend\n\n@tools\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\nforever\n    if <(id) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (110) %\n        else\n            set size to (100) %\n        end\n    end\n    if <(id) = [2]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (110) %\n        else\n            set size to (100) %\n        end\n    end\n    if <(id) = [3]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (110) %\n        else\n            set size to (100) %\n        end\n    end\n    if <(id) = [4]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (110) %\n        else\n            set size to (100) %\n        end\n    end\nend\n\nwhen this sprite clicked\nif <(id) = [2]> then\n    set [tool v] to [pencil]\nend\nif <(id) = [1]> then\n    set [tool v] to [gum]\nend\nif <(id) = [3]> then\n    set [tool v] to [money]\nend\nif <(id) = [4]> then\n    set [tool v] to [flag]\nend\n\nwhen I receive [play v]\nbroadcast (clones v)\n\ndefine clone\nswitch costume to (gum v)\ngo to x: (-212) y: (-126)\nchange y by (40)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nnext costume\nchange y by (40)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nnext costume\nchange y by (40)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nnext costume\nchange y by (40)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [clones v]\nset [id v] to [0]\nwait (1) seconds\nshow\nclone\n\nforever\n    hide\nend\n\nif <(maker) = [1]> then\n    change [id v] by (-1)\n    delete this clone\nend\n\n@1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    go to x: ((mouse x) / (10)) y: ((mouse y) / (10))\nend\n\nwhen I receive [play v]\nshow variable [$ v]\nshow variable [tool v]\nstop [other scripts in sprite v]\nhide\n\nglide (1) secs to x: (pick random (-10) to (10)) y: (pick random (-10) to (10))\n\n@button play\n\nwhen flag clicked\nshow\ngo to x: (0) y: (30)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (110) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nstart sound [pop v]\nbroadcast (play v)\n\nwhen I receive [play v]\nhide\n\n@button edit\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nshow\ngo to x: (-208) y: (163)\nforever\n    if <(maker) = [2]> then\n        switch costume to (2 v)\n        go to x: (208) y: (163)\n    end\n    if <(maker) = [1]> then\n        switch costume to (1 v)\n        go to x: (-208) y: (163)\n    end\nend\n\nwhen this sprite clicked\nwait (0.5) seconds\nchange [maker v] by (1)\nif <(maker) > [2]> then\n    broadcast (clones v)\n    set [maker v] to [1]\nend\n\nswitch costume to (maker)\n\nif <(maker) = [2]> then\n    set [maker v] to [1]\nend\n\n@game2\n\nwhen I receive [play v]\nwait (1) seconds\nforever\n    go to (mouse-pointer v)\n    if <(maker) = [1]> then\n        if <(tool) = [flag]> then\n            switch costume to (5 v)\n            show\n            if <mouse down?> then\n                if <(1) = [0]> then\n                    create clone of (_myself_ v)\n                end\n            end\n        else\n            if <(tool) = [money]> then\n                switch costume to (4 v)\n                show\n                if <mouse down?> then\n                    if <(1) = [0]> then\n                        create clone of (_myself_ v)\n                    end\n                end\n            else\n                hide\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\nif <(tool) = [flag]> then\n    switch costume to (5 v)\n    show\n    forever\n        if <touching (game v)?> then\n            start sound [Coin v]\n            broadcast (victory v)\n            delete this clone\n        end\n    end\nend\nif <(tool) = [money]> then\n    switch costume to (4 v)\n    show\n    forever\n        if <touching (game v)?> then\n            start sound [Coin v]\n            change [$ v] by (1)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nif <(tool) = [flag]> then\n    wait (1) seconds\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            delete this clone\n        end\n    end\nend\nif <(tool) = [money]> then\n    wait (1) seconds\n    forever\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            delete this clone\n        end\n    end\nend\n\n@victory\n\nwhen I receive [victory v]\nshow\ngo to [front v] layer\nwait (1) seconds\nhide\nset [maker v] to [1]\n\nwhen flag clicked\nhide\n\n@2\n\nwhen flag clicked\nset [1 v] to [0]\nshow\nforever\n    go to x: (0) y: (0)\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen [timer v] > (time)\nhide variable [$ v]\nhide variable [tool v]\n\n