function Create(self) -- Find the closest actor within 50 pixels. local curdist = 50; for actor in MovableMan.Actors do local avgx = actor.Pos.X - self.Pos.X; local avgy = actor.Pos.Y - self.Pos.Y; local dist = math.sqrt(avgx ^ 2 + avgy ^ 2); if dist < curdist then curdist = dist; self.parent = actor; end end if self.parent then self.parent.Health = self.parent.Health - 3; end end function Update(self) for actor in MovableMan.Actors do if actor.Health <= 1 and actor.Team ~= self.Team then local Shotz = CreateMOSParticle("Headshot"); Shotz.Pos = actor.AboveHUDPos + Vector(0,4); MovableMan:AddParticle(Shotz); actor:GibThis(); end end end