Boomerang

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

could u show me like how I would do it? I know its spoon feeding :/ but personally I learn from examples so...
 
Python:
on right click holding stick:
    set {_loc} to location of player
    add 1.5 to y-coord of {_loc}

    summon arrow at {_loc}
    set {_e} to last spawned entity

    set gravity of {_e} to false
    set {_vector} to vector from yaw yaw of player and pitch pitch of player


    set {_time} to 2 # seconds
    set {_time} to {_time} * 20

    set {_t} to {_time}

    while {_t} >= 0:
        set {_velocity} to {_vector} * ({_t} / {_time})
        if vector length of {_velocity} < 0.2:
            set velocity of {_e} to vector(0,0,0)
            stop loop

        set velocity of {_e} to {_velocity}

        remove 1 from {_t}
        wait a tick


    set {_vector} to {_vector} * -1
    set {_t} to {_time}
    while {_t} >= 0:
        set {_velocity} to {_vector} * ({_t} / {_time})
        if vector length of {_velocity} < 0.2:
            set velocity of {_e} to vector(0,0,0)
            stop loop

        set velocity of {_e} to {_velocity}

        remove 1 from {_t}
        wait a tick

    kill {_e}

I didn't want to make it so good because it's an example code.

You can change arrow to anything. Boomerang logic will be keeped.