function main(self)
	if self.State == 0 then
		self.MoveRect = {-60,-8,64,32}
		self.AttackRect = {-60,-8,64,32}
		self.HitRect = {-60,-8,64,32}
		self.ObjectTypeFlags = ObjectType.Special
		self.Flags.AlwaysActive = true
		self:SetImage("CUSTOM_ELEVATORLONG")
		self.startingX, self.startingY = self.X, self.Y
		self.startingSpeedX, self.startingSpeedY = self.SpeedX, self.SpeedY
		self.attempts = Attempt()
		self.State = 1
	end

	if self.State == 1 and not self:IsBelow(GetClaw()) then
		self.X = self.X + self.SpeedX
		self.MoveClawX = self.SpeedX
		if self.SpeedX ~= 0 and (self.X > self.XMax or self.X < self.XMin) then
			self.SpeedX = -self.SpeedX
		end
		self.Y = self.Y + self.SpeedY
		self.MoveClawY = self.SpeedY
		if self.SpeedY ~= 0 and (self.Y > self.YMax or self.Y < self.YMin) then
			self.SpeedY = -self.SpeedY
		end
	end

	-- Stop (triggered by the Link logic):
	if self.State == 201 then
		self.MoveClawX, self.MoveClawY = 0,0
	end

	-- Reset (if Claw dies):
	if self.State > 0 and Attempt() > self.attempts then
		self.X, self.Y = self.startingX, self.startingY
		self.SpeedX, self.SpeedY = self.startingSpeedX, self.startingSpeedY
		self.attempts = Attempt()
		self.State = 1
	end
end