How can i do if the mob gets killed wait 5 sec and then respawn

Discussion in 'Skript' started by DeTrollers, Mar 26, 2021.

  1. Code (Text):
    on chunk load:
        if world is "Mine":
            loop blocks within event-chunk:
                if loop-block is structure_block:
                    add location of loop-block to {_spawning::mobspawn}
                    set {_spawn} to random element of {_spawning::mobspawn}
                    spawn zombie at location 1 above {_spawn}
                    stop
                   
    every 25 seconds:
        spawn a zombie at {zombie.spawn}
        set {_entity} to last spawned entity

    command /setzombie:
        trigger:
            player is op
            set {zombie.spawn} to location of player
           
    on death:
        if victim is a zombie:
            if name of victim is "&6Spawned Zombie":
                clear drops