In minecraft I want to do it so that you have to defeat 4 zombies and 2 slimes in a radius of 5 blocks so that you can be teleported.
How does that work? Oh yes and that's the MC version 1.15.2
This is not so straightforward, in EVERY case. But you can use @e [type = zombie, distance = .5] to check the zombies and thus their number within a radius of 5 blocks. So you could see if their numbers decrease and then teleport.
Ok thanks